Add project files

This commit is contained in:
ChaoticByte 2024-09-25 21:18:58 +02:00
commit ab339c8a2c
No known key found for this signature in database
81 changed files with 2567 additions and 0 deletions

View file

@ -0,0 +1,22 @@
shader_type canvas_item;
uniform float threshold = 0.8;
uniform vec4 water_color: source_color = vec4(0.12,0.24,0.45,0.65);
uniform vec4 test_color: source_color = vec4(1,0,1,1);
uniform float speed = 0.1; // Speed of movement
uniform float amplitude = 0.1; // Amplitude of movement
uniform sampler2D water_texture;
void fragment(){
float displacement = sin(TIME * speed) * amplitude;
vec4 screen_tex = texture(TEXTURE, SCREEN_UV).rgba;
float color_distance = screen_tex.r;
if (color_distance > threshold) {
COLOR = texture(water_texture, SCREEN_UV + displacement).rgba * water_color;
} else {
COLOR = vec4(0.0);
}
}