mirror of
https://github.com/Relintai/pandemonium_demo_projects.git
synced 2024-12-21 13:56:50 +01:00
15 lines
331 B
GLSL
15 lines
331 B
GLSL
shader_type canvas_item;
|
|
render_mode blend_mix;
|
|
|
|
uniform vec2 offset = vec2(8.0, 8.0);
|
|
uniform vec4 modulate : hint_color;
|
|
|
|
void fragment() {
|
|
vec2 ps = TEXTURE_PIXEL_SIZE;
|
|
|
|
vec4 shadow = vec4(modulate.rgb, texture(TEXTURE, UV - offset * ps).a * modulate.a);
|
|
vec4 col = texture(TEXTURE, UV);
|
|
|
|
COLOR = mix(shadow, col, col.a);
|
|
}
|