FIX: EEVEE Next Non-shadowing directional light hang

Resolves GPU hang caused by erroneous processing of
directional lights which should not cast shadows.
Resolves GPU hang with the Tree Creature asset and
could possibly resolve #120038.

Authored by Apple: Michael Parkin-White

Co-authored-by: Michael Parkin-White <mparkinwhite@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/120696
This commit is contained in:
Jason Fielder
2024-04-16 14:57:07 +02:00
committed by Clément Foucault
parent f789619e65
commit 05cd235f90
2 changed files with 8 additions and 0 deletions

View File

@@ -32,6 +32,10 @@ void main()
if (light.type != LIGHT_SUN) {
break;
}
if (light.tilemap_index == LIGHT_NO_SHADOW) {
continue;
}
ivec2 base_offset_neg = light_sun_data_get(light).clipmap_base_offset_neg;
ivec2 base_offset_pos = light_sun_data_get(light).clipmap_base_offset_pos;
/* LOD relative max with respect to clipmap_lod_min. */

View File

@@ -44,6 +44,10 @@ void main()
LIGHT_FOREACH_BEGIN_DIRECTIONAL (light_cull_buf, l_idx) {
LightData light = light_buf[l_idx];
if (light.tilemap_index == LIGHT_NO_SHADOW) {
continue;
}
float local_min = FLT_MAX;
float local_max = -FLT_MAX;
for (int i = 0; i < 8; i++) {