Improved shader algorithm in blit-scaled-glsl.cpp