Skip to content

Commit

Permalink
chore: add shadow bias to skylighting
Browse files Browse the repository at this point in the history
  • Loading branch information
doodlum committed Feb 19, 2025
1 parent 587a1fb commit 302bf5b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SamplerComparisonState comparisonSampler : register(s0);
if (all(occlusionUV > 0) && all(occlusionUV < 1)) {
uint accumFrames = isValid ? (outAccumFramesArray[dtid] + 1) : 1;
float occlusionDepth = srcOcclusionDepth.SampleCmpLevelZero(comparisonSampler, occlusionUV, 0);
float visibility = srcOcclusionDepth.SampleCmpLevelZero(comparisonSampler, occlusionUV, cellCentreOS.z);
float visibility = srcOcclusionDepth.SampleCmpLevelZero(comparisonSampler, occlusionUV, cellCentreOS.z + 0.001);

sh2 occlusionSH = SphericalHarmonics::Scale(SphericalHarmonics::Evaluate(settings.OcclusionDir.xyz), visibility * 4.0 * Math::PI); // 4 pi from monte carlo
if (isValid) {
Expand Down

0 comments on commit 302bf5b

Please sign in to comment.