Files
gamedev-the-steward/world/jajce/materials/wind_stroke.gdshader
T
2026-07-09 23:47:46 +02:00

15 lines
449 B
Plaintext

shader_type spatial;
render_mode blend_mix, depth_draw_never, cull_disabled, unshaded;
uniform float softness : hint_range(0.0, 1.0) = 0.45;
uniform vec3 tint : source_color = vec3(0.95, 0.93, 0.88);
void fragment() {
float edge_dist = abs(UV.y - 0.5) * 2.0;
float alpha = 1.0 - smoothstep(0.0, 1.0, edge_dist);
alpha *= smoothstep(0.0, 0.2, UV.x) * smoothstep(0.0, 0.2, 1.0 - UV.x);
alpha *= softness * 0.1;
ALBEDO = tint;
ALPHA = alpha;
}