mirage.shader 274 B

1234567891011121314
  1. shader_type canvas_item;
  2. uniform float frequency = 60;
  3. uniform float depth = 0.005;
  4. void fragment() {
  5. vec2 uv = SCREEN_UV;
  6. uv.x += sin(uv.y * frequency + TIME) * depth;
  7. uv.x = clamp(uv.x, 0.0, 1.0);
  8. vec3 c = textureLod(SCREEN_TEXTURE, uv, 0.0).rgb;
  9. COLOR.rgb = c;
  10. }