#version 410 uniform sampler2D texture1; in vec2 uvV; out vec4 fragColor; float fr(float x) { return x - floor(x); } void main (void) { vec4 c = texture(texture1, uvV); // c.g = fr(c.r * 1000.0); // c.b = fr(c.r * 1000000.0); float z = fr(c.r * 1500.0); z = (z < 0.5) ? 0.2 : 0.8; if(c.r < 0.999) c.rgb = vec3(z,z,z); fragColor = c; }