rendering: tune main light shadow bias defaults

This commit is contained in:
2026-04-13 02:24:14 +08:00
parent b7428b0ef1
commit 00875e0c90
3 changed files with 13 additions and 9 deletions

View File

@@ -6,14 +6,18 @@ namespace XCEngine {
namespace Rendering {
struct DirectionalShadowSamplingSettings {
float receiverDepthBias = 0.0015f;
float normalBiasScale = 1.5f;
// Keep receiver bias modest and rely more on caster / normal bias so
// contact shadows do not detach too aggressively.
float receiverDepthBias = 0.0010f;
float normalBiasScale = 2.0f;
float shadowStrength = 0.85f;
};
struct DirectionalShadowCasterBiasSettings {
float depthBiasFactor = 1.0f;
int32_t depthBiasUnits = 2;
// Single-map directional shadows need a stronger raster bias baseline than
// the previous placeholder values to keep acne under control.
float depthBiasFactor = 2.5f;
int32_t depthBiasUnits = 4;
};
} // namespace Rendering