From cb1ccdc8353b0d4dde63fef510323c224f8342b3 Mon Sep 17 00:00:00 2001 From: doodlum <15017472+doodlum@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:31:47 +0000 Subject: [PATCH] chore: pb shadow improvements (#789) * chore: pb shadow improvements * chore: more cleanup --- package/Shaders/Utility.hlsl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/package/Shaders/Utility.hlsl b/package/Shaders/Utility.hlsl index ff75d34ee..6edce9a8d 100644 --- a/package/Shaders/Utility.hlsl +++ b/package/Shaders/Utility.hlsl @@ -381,12 +381,10 @@ float GetPoissonDiskFilteredShadowVisibility(float noise, float2x2 rotationMatri float visibility = 0; for (int sampleIndex = 0; sampleIndex < sampleCount; ++sampleIndex) { float2 sampleOffset = mul(Random::SpiralSampleOffsets8[sampleIndex], rotationMatrix); - sampleOffset *= 1.5; # if defined(RENDER_SHADOWMASKDPB) - float2 sampleUV = sampleOffset + baseUV.xy; - - baseUV.z += noise; + float2 sampleUV = baseUV.xy + sampleOffset * ShadowSampleParam.z; + baseUV.z += noise * ShadowSampleParam.z; bool lowerHalf = baseUV.z * 0.5 + 0.5 < 0; float3 normalizedPositionLS = normalize(float3(sampleUV.xy, baseUV.z));