xxxxxxxxxx
45
// Set the precision
precision highp float;
uniform float time;
uniform vec2 mouse;
uniform sampler2D tex;
varying vec2 vTexCoord;
void main() {
vec2 uv = vTexCoord;
// Flip the texture coords
uv.y = 1.0 - uv.y;
vec4 color = texture2D(tex, uv);
float red = color.r;
red = step(0.5, red);
// Invert the colors
// color.rgb = 1.0 - color.rgb;
// color = color * color * color;
// color.rgb = pow(color.rgb, vec3(1.2));
color.rgb += sin(color.rgb * 8.0);
// color.rgb = fract(color.rgb * 3.0);
// color.rgb = color.rrr;
// color.rgb = step(mouse.x, color.rgb);
// color.rgb = smoothstep(mouse.x, mouse.x + 0.2, color.rgb);
// float t = fract(time);
// color.rgb = step(t, color.rgb);
gl_FragColor = color;
gl_FragColor.a = 1.0;
}