Skip to content

Commit

Permalink
feat: linear space ssao (#518)
Browse files Browse the repository at this point in the history
* feat: linear space ssao

* style: 🎨 apply clang-format changes

---------

Co-authored-by: doodlum <doodlum@users.noreply.github.com>
  • Loading branch information
doodlum and doodlum authored Sep 11, 2024
1 parent 2efc36b commit 8c8c2d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions package/Shaders/ISSAOComposite.hlsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "Common/Color.hlsli"
#include "Common/DummyVSTexCoord.hlsl"
#include "Common/FrameBuffer.hlsli"

Expand Down Expand Up @@ -160,7 +161,9 @@ PS_OUTPUT main(PS_INPUT input)
if (EyePosition.w != 0 && 1e-5 < snowMask) {
ao = min(1, SparklesParameters3.x + ao);
}
composedColor.xyz = GammaToLinear(composedColor.xyz);
composedColor.xyz *= ao;
composedColor.xyz = LinearToGamma(composedColor.xyz);
# endif

float depth = depthTex.SampleLevel(depthSampler, screenPosition, 0).x;
Expand Down

0 comments on commit 8c8c2d1

Please sign in to comment.