Replace world shadows with player blob shadows
This commit is contained in:
parent
0d17921d20
commit
308447d481
8 changed files with 117 additions and 4 deletions
13
player/materials/player_blob_shadow.gdshader
Normal file
13
player/materials/player_blob_shadow.gdshader
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
shader_type spatial;
|
||||
render_mode blend_mix, depth_draw_never, cull_disabled, unshaded;
|
||||
|
||||
uniform vec4 shadow_color : source_color = vec4(0.035, 0.105, 0.125, 0.18);
|
||||
uniform float inner_softness : hint_range(0.0, 0.8, 0.01) = 0.05;
|
||||
|
||||
void fragment() {
|
||||
vec2 centered_uv = (UV - vec2(0.5)) * 2.0;
|
||||
float radial_distance = dot(centered_uv, centered_uv);
|
||||
float falloff = 1.0 - smoothstep(inner_softness, 1.0, radial_distance);
|
||||
ALBEDO = shadow_color.rgb;
|
||||
ALPHA = shadow_color.a * falloff;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue