diff options
author | iamn1ck <iamn1ck@yahoo.com> | 2020-03-14 12:47:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-14 12:47:15 -0500 |
commit | 3d5ce1be0a75c863e3a0bccde823fb802ba7c085 (patch) | |
tree | 5749f383d82b1bedb6f3ba8b06987f96136f8462 /src/shaders/wave-fs.glsl | |
parent | 9a491d5f7221c23e75268226844bf5ffd4d8f086 (diff) | |
parent | e249ab72ad4550a02bdd3081335485e03e4553bc (diff) |
Added my stuff
Diffstat (limited to 'src/shaders/wave-fs.glsl')
-rw-r--r-- | src/shaders/wave-fs.glsl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/shaders/wave-fs.glsl b/src/shaders/wave-fs.glsl new file mode 100644 index 0000000..4923f97 --- /dev/null +++ b/src/shaders/wave-fs.glsl @@ -0,0 +1,16 @@ +in vec2 v_uv; +out vec4 frag; + +uniform sampler2D tex; +uniform vec2 position; +uniform float intensity; +uniform float time; + +void main() { + vec2 p =-1.+2.*v_uv / vec2(1,1)-position; + float cLength=length(p); + vec2 uv=v_uv+(p/cLength)*cos(cLength*32.0-time*4.0)*intensity; + vec3 col=smoothstep(0.1,.91,texture(tex,uv).xyz); + + frag = texture(tex,uv); +}
\ No newline at end of file |