Randoloot/resources/effects/cloud_mist.gdshader
2026-10-18 14:46:34 +02:00

11 lines
327 B
Plaintext

shader_type canvas_item;
render_mode unshaded;
varying vec4 tint;
void vertex() { tint=COLOR; }
void fragment() {
vec4 mist=texture(TEXTURE,UV);
vec2 border=min(UV,vec2(1.0)-UV);
float feather=smoothstep(0.025,0.15,border.x)*smoothstep(0.025,0.15,border.y);
COLOR=vec4(mist.rgb*tint.rgb,pow(mist.a,1.35)*tint.a*feather);
}