Skip to content

Commit c951125

Browse files
committed
Merge pull request godotengine#107684 from dsnopek/revert-shadow-normal-bias-relative
Revert "Use lower shadow normal bias for distant directional shadow splits"
2 parents 8de08c7 + 4cc1d0b commit c951125

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

servers/rendering/renderer_rd/storage_rd/light_storage.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -714,9 +714,7 @@ void LightStorage::update_light_buffers(RenderDataRD *p_render_data, const Paged
714714
light_data.shadow_split_offsets[j] = split;
715715
float bias_scale = light_instance->shadow_transform[j].bias_scale * light_data.soft_shadow_scale;
716716
light_data.shadow_bias[j] = light->param[RS::LIGHT_PARAM_SHADOW_BIAS] / 100.0 * bias_scale;
717-
// Use lower shadow normal bias for distant splits, relative to the share taken by the split.
718-
// This helps reduce peter-panning at a distance.
719-
light_data.shadow_normal_bias[j] = light->param[RS::LIGHT_PARAM_SHADOW_NORMAL_BIAS] * light_instance->shadow_transform[j].shadow_texel_size * light_data.shadow_split_offsets[0] / split;
717+
light_data.shadow_normal_bias[j] = light->param[RS::LIGHT_PARAM_SHADOW_NORMAL_BIAS] * light_instance->shadow_transform[j].shadow_texel_size;
720718
light_data.shadow_transmittance_bias[j] = light->param[RS::LIGHT_PARAM_TRANSMITTANCE_BIAS] / 100.0 * bias_scale;
721719
light_data.shadow_z_range[j] = light_instance->shadow_transform[j].farplane;
722720
light_data.shadow_range_begin[j] = light_instance->shadow_transform[j].range_begin;

0 commit comments

Comments
 (0)