1
Fork 0
mirror of https://github.com/Steffo99/pineapple-surf.git synced 2024-11-25 09:14:18 +00:00
pineapple-surf/island/Sea.gdshader

15 lines
340 B
Text
Raw Normal View History

shader_type spatial;
uniform float speed_x;
uniform float speed_y;
uniform float size;
2023-01-08 21:02:04 +00:00
uniform sampler2D sea: filter_nearest;
void fragment() {
float x = fract(UV.x * size + sin(TIME) * speed_x);
float y = fract(UV.y * size - TIME * 2.0 * speed_y);
vec4 color = texture(sea, vec2(x, y));
ALBEDO = vec3(color.r, color.g, color.b);
}