Skip to content

Commit

Permalink
Remove PSSM Fade
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjustaguy committed Oct 13, 2023
1 parent ee118e7 commit 09a2a7c
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/gles3/shaders/scene.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -1615,15 +1615,13 @@ void main() {
float directional_shadow = 1.0;

if (depth_z < light_split_offsets.y) {
float pssm_fade = 0.0;

#ifdef LIGHT_USE_PSSM_BLEND
float directional_shadow2 = 1.0;
float pssm_blend = 0.0;
bool use_blend = true;
#endif
if (depth_z < light_split_offsets.x) {
float pssm_fade = 0.0;
directional_shadow = shadow1;

#ifdef LIGHT_USE_PSSM_BLEND
Expand All @@ -1632,7 +1630,6 @@ void main() {
#endif
} else {
directional_shadow = shadow2;
pssm_fade = smoothstep(light_split_offsets.x, light_split_offsets.y, depth_z);
#ifdef LIGHT_USE_PSSM_BLEND
use_blend = false;
#endif
Expand All @@ -1642,7 +1639,6 @@ void main() {
directional_shadow = mix(directional_shadow, directional_shadow2, pssm_blend);
}
#endif
directional_shadow = mix(directional_shadow, 1.0, pssm_fade);
}

#endif //LIGHT_USE_PSSM2
Expand All @@ -1658,7 +1654,6 @@ void main() {
float directional_shadow = 1.0;

if (depth_z < light_split_offsets.w) {
float pssm_fade = 0.0;

#ifdef LIGHT_USE_PSSM_BLEND
float directional_shadow2 = 1.0;
Expand Down Expand Up @@ -1694,7 +1689,6 @@ void main() {

} else {
directional_shadow = shadow4;
pssm_fade = smoothstep(light_split_offsets.z, light_split_offsets.w, depth_z);

#if defined(LIGHT_USE_PSSM_BLEND)
use_blend = false;
Expand All @@ -1706,7 +1700,6 @@ void main() {
directional_shadow = mix(directional_shadow, directional_shadow2, pssm_blend);
}
#endif
directional_shadow = mix(directional_shadow, 1.0, pssm_fade);
}

#endif //LIGHT_USE_PSSM4
Expand Down

0 comments on commit 09a2a7c

Please sign in to comment.