#PointLight2D is below my shader. How to fix this ?
8 messages · Page 1 of 1 (latest)
shader_type canvas_item;
render_mode unshaded;
uniform vec4 color : source_color;
uniform float margin :hint_range(0.0,20.00,0.5)=10;
uniform float darkness :hint_range(0.1, 0.8, 0.05)=0.3;
void fragment() {
vec2 at = screen_uv_to_sdf(SCREEN_UV);
float da = texture_sdf(at);
vec2 backtouv = -margin*sdf_to_screen_uv(vec2(da,0));
COLOR = vec4(color.rgb,min(darkness,backtouv.x));
}
So , how should i fix this ? Thanks for your help .
PointLight2D is below my shader. How to fix this ?
Shameless bump .