wave.glsl 332 B

123456789
  1. extern number time;
  2. extern vec2 strength;
  3. vec4 effect(vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords) {
  4. texture_coords.x += sin(texture_coords.y * 20 + time) * strength.x;
  5. texture_coords.y += cos(texture_coords.x * 20 + time) * strength.y;
  6. vec4 result = Texel(texture, texture_coords);
  7. return result;
  8. }