Fix #112041: EEVEE-Next: Distant tranparent object shadow tagging

Ensure dist_to_light is >0.
Otherwise the log2 in lod selection falls into undefined behavior.
This commit is contained in:
Miguel Pozo
2024-02-23 18:33:56 +01:00
parent 690cc6e3cb
commit ae3220e62b

View File

@@ -89,7 +89,7 @@ void shadow_tag_usage_tilemap_punctual(
}
vec3 lP = light_world_to_local(light, P - light._position);
float dist_to_light = length(lP) - radius;
float dist_to_light = max(length(lP) - radius, 1e-5);
if (dist_to_light > light.influence_radius_max) {
return;
}