mirror of
https://github.com/godotengine/godot.git
synced 2024-11-26 22:23:04 +00:00
Revert back to ignoring LIGHT_VEC for 2D shadows
This commit is contained in:
parent
16934c7411
commit
32e7641667
@ -440,6 +440,10 @@ FRAGMENT_SHADER_CODE
|
||||
color *= light;
|
||||
|
||||
#ifdef USE_SHADOWS
|
||||
// Reset light_vec to compute shadows, the shadow map is created from the light origin, so it only
|
||||
// makes sense to compute shadows from there.
|
||||
light_vec = light_uv_interp.zw;
|
||||
|
||||
float angle_to_light = -atan(light_vec.x, light_vec.y);
|
||||
float PI = 3.14159265358979323846264;
|
||||
/*int i = int(mod(floor((angle_to_light+7.0*PI/6.0)/(4.0*PI/6.0))+1.0, 3.0)); // +1 pq os indices estao em ordem 2,0,1 nos arrays
|
||||
|
@ -549,6 +549,10 @@ FRAGMENT_SHADER_CODE
|
||||
color *= light;
|
||||
|
||||
#ifdef USE_SHADOWS
|
||||
// Reset light_vec to compute shadows, the shadow map is created from the light origin, so it only
|
||||
// makes sense to compute shadows from there.
|
||||
light_vec = light_uv_interp.zw;
|
||||
|
||||
float angle_to_light = -atan(light_vec.x, light_vec.y);
|
||||
float PI = 3.14159265358979323846264;
|
||||
/*int i = int(mod(floor((angle_to_light+7.0*PI/6.0)/(4.0*PI/6.0))+1.0, 3.0)); // +1 pq os indices estao em ordem 2,0,1 nos arrays
|
||||
|
Loading…
Reference in New Issue
Block a user