EEVEE-Next: Jittered Soft Shadows #119753
|
@ -385,7 +385,7 @@ void ShadowPunctual::end_sync(Light &light, bool is_render_sync)
|
|||
}
|
||||
|
||||
if (is_area_light(light.type)) {
|
||||
/* Shift shadow map origin for area light to avoid clipping nearby geometry. */
|
||||
/* Shift shadow map origin, so the near plane overlaps with the area light plane. */
|
||||
pragma37 marked this conversation as resolved
Outdated
|
||||
origin_shift.z += near;
|
||||
}
|
||||
|
||||
|
|
|
@ -266,7 +266,7 @@ vec3 shadow_punctual_face_local_to_local_position(int face_id, vec3 fL)
|
|||
}
|
||||
}
|
||||
|
||||
/* Turns local light coordinate into shadow region index. Matches eCubeFace order.
|
||||
/* Turns local shadow coordinate into shadow region index. Matches eCubeFace order.
|
||||
* \note lL does not need to be normalized. */
|
||||
int shadow_punctual_face_index_get(vec3 lL)
|
||||
{
|
||||
|
|
|
@ -357,7 +357,7 @@ ShadowRayPunctual shadow_ray_generate_punctual(LightData light, vec2 random_2d,
|
|||
/* 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. */
|
||||
/* Local Shadow 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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
This can be removed. And you can use
light.object_mat
directly as it is junk free now!.