Created
February 3, 2018 15:42
-
-
Save rmichaluszek/456f141c974c30a2ef1c664a54997a20 to your computer and use it in GitHub Desktop.
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
shader_type canvas_item; | |
uniform float frequency=5; | |
uniform float depth = 0.01; | |
uniform float speed_multiplier = 2.0; | |
void fragment() { | |
float multiplier = 1.0-(UV.y+0.3); | |
if(multiplier <= 0.0) { | |
multiplier = 0.0; | |
} | |
vec2 uv = UV; | |
uv.x += sin(uv.y*frequency+(TIME*speed_multiplier))*depth*multiplier; | |
uv.x = clamp(uv.x,0,1); | |
vec4 c = textureLod(TEXTURE,uv,0.0).rgba; | |
COLOR.rgba=c; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment