Re-enable CSM cascades filter width adjustment

This commit is contained in:
Wojtek Figat
2024-05-23 14:34:26 +02:00
parent 206ff89587
commit 681c473e7a
2 changed files with 4 additions and 2 deletions

View File

@@ -66,7 +66,9 @@ private:
{
_psShadowDir.Release();
_psShadowPoint.Release();
_psShadowPointInside.Release();
_psShadowSpot.Release();
_psShadowSpotInside.Release();
invalidateResources();
}
#endif

View File

@@ -266,8 +266,8 @@ ShadowSample SampleDirectionalLightShadow(LightData light, Buffer<float4> shadow
result.SurfaceShadow = SampleShadowMapOptimizedPCF(shadowMap, shadowMapUV, shadowPosition.z);
// Increase the sharpness for higher cascades to match the filter radius
//const float SharpnessScale[MaxNumCascades] = { 1.0f, 1.5f, 3.0f, 3.5f };
//shadow.Sharpness *= SharpnessScale[cascadeIndex];
const float SharpnessScale[MaxNumCascades] = { 1.0f, 1.5f, 3.0f, 3.5f };
shadow.Sharpness *= SharpnessScale[cascadeIndex];
#if defined(USE_GBUFFER_CUSTOM_DATA)
// Subsurface shadowing