Last active
October 2, 2018 23:52
-
-
Save cwervo/fcc5a6e653e12b82aac780ee5169fa90 to your computer and use it in GitHub Desktop.
A wavy, warbly fragment shader.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision highp float; | |
#endif | |
uniform float u_time; | |
uniform vec2 u_resolution; | |
uniform sampler2DRect u_texture; | |
uniform vec3 u_color_text; | |
uniform vec3 u_color_bg; | |
void main() { | |
vec2 coord = vec2(gl_FragCoord.x, u_resolution.y - gl_FragCoord.y); | |
vec2 uv = gl_FragCoord.xy / u_resolution; | |
coord.x *= fract(sin(gl_FragCoord.x * u_time * 0.04) * 0.05); | |
coord.y *= fract(sin(gl_FragCoord.y * u_time * 0.04) * 0.05); | |
vec4 color = texture2DRect(u_texture, coord); | |
gl_FragColor = color; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment