Remove PSSM Fade
This commit is contained in:
parent
ee118e7ffd
commit
09a2a7c54e
@ -1615,7 +1615,6 @@ void main() {
|
|||||||
float directional_shadow = 1.0;
|
float directional_shadow = 1.0;
|
||||||
|
|
||||||
if (depth_z < light_split_offsets.y) {
|
if (depth_z < light_split_offsets.y) {
|
||||||
float pssm_fade = 0.0;
|
|
||||||
|
|
||||||
#ifdef LIGHT_USE_PSSM_BLEND
|
#ifdef LIGHT_USE_PSSM_BLEND
|
||||||
float directional_shadow2 = 1.0;
|
float directional_shadow2 = 1.0;
|
||||||
@ -1623,7 +1622,6 @@ void main() {
|
|||||||
bool use_blend = true;
|
bool use_blend = true;
|
||||||
#endif
|
#endif
|
||||||
if (depth_z < light_split_offsets.x) {
|
if (depth_z < light_split_offsets.x) {
|
||||||
float pssm_fade = 0.0;
|
|
||||||
directional_shadow = shadow1;
|
directional_shadow = shadow1;
|
||||||
|
|
||||||
#ifdef LIGHT_USE_PSSM_BLEND
|
#ifdef LIGHT_USE_PSSM_BLEND
|
||||||
@ -1632,7 +1630,6 @@ void main() {
|
|||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
directional_shadow = shadow2;
|
directional_shadow = shadow2;
|
||||||
pssm_fade = smoothstep(light_split_offsets.x, light_split_offsets.y, depth_z);
|
|
||||||
#ifdef LIGHT_USE_PSSM_BLEND
|
#ifdef LIGHT_USE_PSSM_BLEND
|
||||||
use_blend = false;
|
use_blend = false;
|
||||||
#endif
|
#endif
|
||||||
@ -1642,7 +1639,6 @@ void main() {
|
|||||||
directional_shadow = mix(directional_shadow, directional_shadow2, pssm_blend);
|
directional_shadow = mix(directional_shadow, directional_shadow2, pssm_blend);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
directional_shadow = mix(directional_shadow, 1.0, pssm_fade);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //LIGHT_USE_PSSM2
|
#endif //LIGHT_USE_PSSM2
|
||||||
@ -1658,7 +1654,6 @@ void main() {
|
|||||||
float directional_shadow = 1.0;
|
float directional_shadow = 1.0;
|
||||||
|
|
||||||
if (depth_z < light_split_offsets.w) {
|
if (depth_z < light_split_offsets.w) {
|
||||||
float pssm_fade = 0.0;
|
|
||||||
|
|
||||||
#ifdef LIGHT_USE_PSSM_BLEND
|
#ifdef LIGHT_USE_PSSM_BLEND
|
||||||
float directional_shadow2 = 1.0;
|
float directional_shadow2 = 1.0;
|
||||||
@ -1694,7 +1689,6 @@ void main() {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
directional_shadow = shadow4;
|
directional_shadow = shadow4;
|
||||||
pssm_fade = smoothstep(light_split_offsets.z, light_split_offsets.w, depth_z);
|
|
||||||
|
|
||||||
#if defined(LIGHT_USE_PSSM_BLEND)
|
#if defined(LIGHT_USE_PSSM_BLEND)
|
||||||
use_blend = false;
|
use_blend = false;
|
||||||
@ -1706,7 +1700,6 @@ void main() {
|
|||||||
directional_shadow = mix(directional_shadow, directional_shadow2, pssm_blend);
|
directional_shadow = mix(directional_shadow, directional_shadow2, pssm_blend);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
directional_shadow = mix(directional_shadow, 1.0, pssm_fade);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //LIGHT_USE_PSSM4
|
#endif //LIGHT_USE_PSSM4
|
||||||
|
Loading…
Reference in New Issue
Block a user