#ifdef GL_ES precision mediump float; #endif varying vec4 v_color; varying vec2 v_texCoords; uniform sampler2D u_texture; uniform float u_time; float round(float f, float v){ return float(int(f / v)) * v; } void main(){ vec2 r = v_texCoords.xy; vec4 c = v_color * texture2D(u_texture, v_texCoords.xy); gl_FragColor = c * vec4(vec3(round(1.0 + sin((r.x + r.y) * 404.0 + u_time / 20.0) / 10.0, 0.05)), 1.0); }