Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > acd30aff1fef52f2be0a089ae33cd62e > files > 185

lib64sfml-devel-2.2-1.mga5.x86_64.rpm

uniform sampler2D texture;
uniform float pixel_threshold;

void main()
{
    float factor = 1.0 / (pixel_threshold + 0.001);
	vec2 pos = floor(gl_TexCoord[0].xy * factor + 0.5) / factor;
	gl_FragColor = texture2D(texture, pos) * gl_Color;	
}