Fix: EEVEE-Next: Broken sun soft shadows

The soft shadows were only getting blurred up to a radius
of 1 unit.
This commit is contained in:
Clément Foucault
2024-05-24 18:31:20 +02:00
parent 4c75babf03
commit fb85ea535f

View File

@@ -173,7 +173,7 @@ ShadowRayDirectional shadow_ray_generate_directional(
direction = shadow_ray_above_horizon_ensure(direction, lNg, max_tracing_distance);
/* It only make sense to trace where there can be occluder. Clamp by distance to near plane. */
direction *= saturate(dist_to_near_plane / direction.z) + 0.0001;
direction *= max(texel_radius, dist_to_near_plane / direction.z);
ShadowRayDirectional ray;
ray.origin = lP;