2023-07-05 21:17:08 +00:00
|
|
|
shader_type spatial;
|
2025-09-25 13:55:00 +00:00
|
|
|
render_mode blend_mix, depth_draw_opaque, diffuse_lambert, specular_schlick_ggx;
|
2023-07-05 21:17:08 +00:00
|
|
|
|
2025-09-25 13:55:00 +00:00
|
|
|
uniform sampler2D gradient: repeat_disable;
|
|
|
|
|
uniform float drop_size = 0.015;
|
|
|
|
|
uniform float stretch_compensatioon = 40;
|
|
|
|
|
uniform float fill = 0.65;
|
|
|
|
|
uniform float speed = 0.015;
|
|
|
|
|
uniform float brightness = 2;
|
2023-07-05 21:17:08 +00:00
|
|
|
|
|
|
|
|
void fragment() {
|
2024-09-15 10:39:47 +00:00
|
|
|
|
2023-07-05 21:17:08 +00:00
|
|
|
float fresnel = 1.0/(1.0-abs(NORMAL.x));
|
2024-09-15 10:39:47 +00:00
|
|
|
|
2023-07-05 21:17:08 +00:00
|
|
|
float dist = 1.0 / distance(vec2(NORMAL.x/stretch_compensatioon, UV.y), vec2(0.0, mod(-TIME*speed*UV.x, 1.0)));
|
|
|
|
|
dist += 1.0 / distance(vec2(NORMAL.x/stretch_compensatioon, UV.y), vec2(0.0, mod(-TIME*speed*UV.x+0.3, 1.0)));
|
|
|
|
|
//dist = 0.0;
|
|
|
|
|
dist += 1.5 / distance(vec2(NORMAL.x/stretch_compensatioon, UV.y), vec2(0.0, fill));
|
2023-07-17 12:10:23 +00:00
|
|
|
dist += 1.5 / distance(vec2(NORMAL.x/stretch_compensatioon, UV2.x), vec2(0.0, 1.1));
|
2023-07-05 21:17:08 +00:00
|
|
|
|
2025-09-25 13:55:00 +00:00
|
|
|
ALBEDO = texture(gradient, UV2).xyz * .3;
|
|
|
|
|
//ALBEDO = vec3(0.0);
|
2023-07-05 21:17:08 +00:00
|
|
|
ALPHA = float(int(dist > 1.0/drop_size));
|
2025-09-25 13:55:00 +00:00
|
|
|
EMISSION = texture(gradient, UV2).xyz * brightness;
|
2023-07-05 21:17:08 +00:00
|
|
|
}
|