diff options
| author | lbavoil <[email protected]> | 2018-03-15 11:08:34 +0100 |
|---|---|---|
| committer | lbavoil <[email protected]> | 2018-03-15 11:08:34 +0100 |
| commit | 636807e68a85a978473764d171ed0c7cc36f9be6 (patch) | |
| tree | 784a3d4fa8f48b4c085dd959678505b2af12f425 /src/ConstantBuffers.cpp | |
| parent | Remove test folder (diff) | |
| download | hbaoplus-636807e68a85a978473764d171ed0c7cc36f9be6.tar.xz hbaoplus-636807e68a85a978473764d171ed0c7cc36f9be6.zip | |
HBAO+ 4.0.0.23740451
Diffstat (limited to 'src/ConstantBuffers.cpp')
| -rw-r--r-- | src/ConstantBuffers.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ConstantBuffers.cpp b/src/ConstantBuffers.cpp index 7e2aa66..5ba355d 100644 --- a/src/ConstantBuffers.cpp +++ b/src/ConstantBuffers.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2018, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation @@ -44,7 +44,7 @@ void GFSDK::SSAO::GlobalConstants::SetDepthThresholdConstants(const GFSDK_SSAO_D else { m_Data.fViewDepthThresholdNegInv = 0.f; - m_Data.fViewDepthThresholdSharpness = 1.f; + m_Data.fViewDepthThresholdSharpness = -1.f; } } @@ -60,10 +60,10 @@ void GFSDK::SSAO::GlobalConstants::SetAORadiusConstants(const GFSDK_SSAO_Paramet m_Data.fRadiusToScreen = R * 0.5f / TanHalfFovy * InputDepth.Viewport.Height; const float BackgroundViewDepth = Max(Params.BackgroundAO.BackgroundViewDepth, EPSILON); - m_Data.fBackgroundAORadiusPixels = m_Data.fRadiusToScreen / BackgroundViewDepth; + m_Data.fBackgroundAORadiusPixels = Params.BackgroundAO.Enable ? (m_Data.fRadiusToScreen / BackgroundViewDepth) : -1.f; const float ForegroundViewDepth = Max(Params.ForegroundAO.ForegroundViewDepth, EPSILON); - m_Data.fForegroundAORadiusPixels = m_Data.fRadiusToScreen / ForegroundViewDepth; + m_Data.fForegroundAORadiusPixels = Params.ForegroundAO.Enable ? (m_Data.fRadiusToScreen / ForegroundViewDepth) : -1.f; } //-------------------------------------------------------------------------------- |