mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
f24ca9a840
* Changed newlines to \n. * Removed whitespace before colons. * Fixed several alignments.
10 lines
242 B
GLSL
10 lines
242 B
GLSL
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;
|
|
}
|