EEVEE-Next: Jittered Soft Shadows #119753

Closed
Miguel Pozo wants to merge 46 commits from pragma37/blender:pull-eevee-jittered-shoft-shadows into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
3 changed files with 5 additions and 2 deletions
Showing only changes of commit 2b786e87e2 - Show all commits

View File

@ -363,6 +363,7 @@ void ShadowPunctual::end_sync(Light &light, float lod_bias, Sampling &sampling)
float projection_shift = is_area_light(light.type) ? near : 0.0f;
float4x4 obmat_tmp = light.object_mat;
obmat_tmp = obmat_tmp * math::from_location<float4x4>(origin_shift);
/* Clear embedded custom data. */
obmat_tmp[0][3] = obmat_tmp[1][3] = obmat_tmp[2][3] = 0.0f;

View File

@ -108,6 +108,7 @@ void shadow_tag_usage_tilemap_punctual(
}
/* TODO(fclem): 3D shift for jittered soft shadows. */
lP -= light.shadow_origin_shift;
lP.z -= light.shadow_projection_shift;
float footprint_ratio = shadow_punctual_footprint_ratio(

View File

@ -548,8 +548,9 @@ ShadowEvalResult shadow_eval(LightData light,
/* TODO(fclem): Scale based on depth. */
P += Ng * normal_offset;
vec3 lP = is_directional ? light_world_to_local(light, P) :
light_world_to_local(light, P - light._position);
vec3 lP = is_directional ?
light_world_to_local(light, P) :
light_world_to_local(light, P - light._position) - light.shadow_origin_shift;
vec3 lNg = light_world_to_local(light, Ng);
float surface_hit = 0.0;