Skip to content

Commit

Permalink
fix: skylighting darkness on some foliage
Browse files Browse the repository at this point in the history
  • Loading branch information
doodlum committed Feb 4, 2025
1 parent 7a809e9 commit f1e292d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion features/Skylighting/Shaders/Features/Skylighting.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Info]
Version = 1-0-2
Version = 1-0-3
4 changes: 4 additions & 0 deletions features/Skylighting/Shaders/Skylighting/Skylighting.hlsli
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ namespace Skylighting
if (SharedData::InInterior)
return scaledUnitSH;

// Fix objects which are too dark
normalWS.z = normalWS.z * 0.5 + 0.5;
normalWS = normalize(normalWS);

positionMS.xyz += normalWS * CELL_SIZE * 0.5; // Receiver normal bias

if (SharedData::FrameCount) { // Check TAA
Expand Down

0 comments on commit f1e292d

Please sign in to comment.