mirror of
https://github.com/AntoineHX/LivingMachine.git
synced 2025-05-05 06:10:45 +02:00
9 lines
247 B
GLSL
9 lines
247 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;
|
|
}
|