diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_shadow_tracing_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_shadow_tracing_lib.glsl index 565a60cd0ea..b13ef58182e 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_shadow_tracing_lib.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_shadow_tracing_lib.glsl @@ -365,7 +365,9 @@ ShadowRayPunctual shadow_ray_generate_punctual(LightData light, vec3 local_ray_start = lP + projection_origin; vec3 local_ray_end = local_ray_start + direction; - int face_id = shadow_punctual_face_index_get(local_ray_start); + /* Use an offset in the ray direction to jitter which face is traced. + * This helps hiding some harsh discontinuity. */ + int face_id = shadow_punctual_face_index_get(local_ray_start + direction * 0.5); /* Local Light Space > Face Local (View) Space. */ vec3 view_ray_start = shadow_punctual_local_position_to_face_local(face_id, local_ray_start); vec3 view_ray_end = shadow_punctual_local_position_to_face_local(face_id, local_ray_end);