diff options
36 files changed, 41 insertions, 43 deletions
diff --git a/build/platforms/vs2015/GFSDK_SSAO_D3D11.vcxproj b/build/platforms/vs2015/GFSDK_SSAO_D3D11.vcxproj index 291200b..5a15919 100644 --- a/build/platforms/vs2015/GFSDK_SSAO_D3D11.vcxproj +++ b/build/platforms/vs2015/GFSDK_SSAO_D3D11.vcxproj @@ -50,7 +50,7 @@ <ProjectGuid>{94E21C5D-95F5-4096-AEE0-C7C51F7FE02A}</ProjectGuid> <RootNamespace>NVUT</RootNamespace> <Keyword>Win32Proj</Keyword> - <WindowsTargetPlatformVersion>10.0.10240.0</WindowsTargetPlatformVersion> + <WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_MT|Win32'" Label="Configuration"> diff --git a/build/platforms/vs2015/GFSDK_SSAO_D3D11_UWP.vcxproj b/build/platforms/vs2015/GFSDK_SSAO_D3D11_UWP.vcxproj index 57cac75..c8e1180 100644 --- a/build/platforms/vs2015/GFSDK_SSAO_D3D11_UWP.vcxproj +++ b/build/platforms/vs2015/GFSDK_SSAO_D3D11_UWP.vcxproj @@ -52,7 +52,7 @@ <AppContainerApplication>true</AppContainerApplication> <ApplicationType>Windows Store</ApplicationType> <WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion> - <WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion> + <WindowsTargetPlatformMinVersion>10.0.10586.0</WindowsTargetPlatformMinVersion> <ApplicationTypeRevision>10.0</ApplicationTypeRevision> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> diff --git a/build/platforms/vs2015/GFSDK_SSAO_D3D12.vcxproj b/build/platforms/vs2015/GFSDK_SSAO_D3D12.vcxproj index 48496b3..0bb4cd4 100644 --- a/build/platforms/vs2015/GFSDK_SSAO_D3D12.vcxproj +++ b/build/platforms/vs2015/GFSDK_SSAO_D3D12.vcxproj @@ -52,7 +52,7 @@ <ProjectGuid>{9E9A59CE-F50F-454A-A922-17324373A3A5}</ProjectGuid> <RootNamespace>NVUT</RootNamespace> <Keyword>Win32Proj</Keyword> - <WindowsTargetPlatformVersion>10.0.10240.0</WindowsTargetPlatformVersion> + <WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_MT|Win32'" Label="Configuration"> diff --git a/build/platforms/vs2015/GFSDK_SSAO_D3D12_UWP.vcxproj b/build/platforms/vs2015/GFSDK_SSAO_D3D12_UWP.vcxproj index fd007cd..2dcfb44 100644 --- a/build/platforms/vs2015/GFSDK_SSAO_D3D12_UWP.vcxproj +++ b/build/platforms/vs2015/GFSDK_SSAO_D3D12_UWP.vcxproj @@ -53,7 +53,7 @@ <AppContainerApplication>true</AppContainerApplication> <ApplicationType>Windows Store</ApplicationType> <WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion> - <WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion> + <WindowsTargetPlatformMinVersion>10.0.10586.0</WindowsTargetPlatformMinVersion> <ApplicationTypeRevision>10.0</ApplicationTypeRevision> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> diff --git a/include/GFSDK_SSAO.h b/include/GFSDK_SSAO.h index d6ad05e..373f6c0 100644 --- a/include/GFSDK_SSAO.h +++ b/include/GFSDK_SSAO.h @@ -198,7 +198,7 @@ struct GFSDK_SSAO_Version : Major(3) , Minor(0) , Branch(0) - , Revision(20666007) + , Revision(20735892) { } @@ -634,15 +634,15 @@ struct GFSDK_SSAO_BlurParameters //--------------------------------------------------------------------------------------------------- // Remarks: -// * The final occlusion is a weighted sum of 2 occlusion contributions. The NearAO and FarAO parameters are the weights. +// * The final occlusion is a weighted sum of 2 occlusion contributions. The SmallScaleAO and LargeScaleAO parameters are the weights. // * Setting the DepthStorage parameter to FP16_VIEW_DEPTHS is fastest but may introduce minor false-occlusion artifacts for large depths. //--------------------------------------------------------------------------------------------------- struct GFSDK_SSAO_Parameters { GFSDK_SSAO_FLOAT Radius; // The AO radius in meters GFSDK_SSAO_FLOAT Bias; // To hide low-tessellation artifacts // 0.0~0.5 - GFSDK_SSAO_FLOAT NearAO; // Scale factor for the near-range AO, the greater the darker // 0.0~4.0 - GFSDK_SSAO_FLOAT FarAO; // Scale factor for the far-range AO, the greater the darker // 0.0~4.0 + GFSDK_SSAO_FLOAT SmallScaleAO; // Scale factor for the small-scale AO, the greater the darker // 0.0~4.0 + GFSDK_SSAO_FLOAT LargeScaleAO; // Scale factor for the large-scale AO, the greater the darker // 0.0~4.0 GFSDK_SSAO_FLOAT PowerExponent; // The final AO output is pow(AO, powerExponent) // 1.0~8.0 GFSDK_SSAO_ForegroundAO ForegroundAO; // To limit the occlusion scale in the foreground GFSDK_SSAO_BackgroundAO BackgroundAO; // To add larger-scale occlusion in the distance @@ -654,8 +654,8 @@ struct GFSDK_SSAO_Parameters GFSDK_SSAO_Parameters() : Radius(1.f) , Bias(0.1f) - , NearAO(1.f) - , FarAO(1.f) + , SmallScaleAO(1.f) + , LargeScaleAO(1.f) , PowerExponent(2.f) , DepthStorage(GFSDK_SSAO_FP16_VIEW_DEPTHS) , DepthClampMode(GFSDK_SSAO_CLAMP_TO_EDGE) diff --git a/lib/GFSDK_SSAO_D3D11.win32.dll b/lib/GFSDK_SSAO_D3D11.win32.dll Binary files differindex dc47323..a010927 100644 --- a/lib/GFSDK_SSAO_D3D11.win32.dll +++ b/lib/GFSDK_SSAO_D3D11.win32.dll diff --git a/lib/GFSDK_SSAO_D3D11.win32.lib b/lib/GFSDK_SSAO_D3D11.win32.lib Binary files differindex 6ad6ab1..24def47 100644 --- a/lib/GFSDK_SSAO_D3D11.win32.lib +++ b/lib/GFSDK_SSAO_D3D11.win32.lib diff --git a/lib/GFSDK_SSAO_D3D11.win64.dll b/lib/GFSDK_SSAO_D3D11.win64.dll Binary files differindex 8a9d16a..dc8de25 100644 --- a/lib/GFSDK_SSAO_D3D11.win64.dll +++ b/lib/GFSDK_SSAO_D3D11.win64.dll diff --git a/lib/GFSDK_SSAO_D3D11.win64.lib b/lib/GFSDK_SSAO_D3D11.win64.lib Binary files differindex 5767605..9cccf51 100644 --- a/lib/GFSDK_SSAO_D3D11.win64.lib +++ b/lib/GFSDK_SSAO_D3D11.win64.lib diff --git a/lib/GFSDK_SSAO_D3D11_UWP.win32.dll b/lib/GFSDK_SSAO_D3D11_UWP.win32.dll Binary files differindex fa8444a..dd6e72d 100644 --- a/lib/GFSDK_SSAO_D3D11_UWP.win32.dll +++ b/lib/GFSDK_SSAO_D3D11_UWP.win32.dll diff --git a/lib/GFSDK_SSAO_D3D11_UWP.win32.lib b/lib/GFSDK_SSAO_D3D11_UWP.win32.lib Binary files differindex e347479..c898cb5 100644 --- a/lib/GFSDK_SSAO_D3D11_UWP.win32.lib +++ b/lib/GFSDK_SSAO_D3D11_UWP.win32.lib diff --git a/lib/GFSDK_SSAO_D3D11_UWP.win64.dll b/lib/GFSDK_SSAO_D3D11_UWP.win64.dll Binary files differindex d887fbe..ac84ebc 100644 --- a/lib/GFSDK_SSAO_D3D11_UWP.win64.dll +++ b/lib/GFSDK_SSAO_D3D11_UWP.win64.dll diff --git a/lib/GFSDK_SSAO_D3D11_UWP.win64.lib b/lib/GFSDK_SSAO_D3D11_UWP.win64.lib Binary files differindex 12aea49..42b1e02 100644 --- a/lib/GFSDK_SSAO_D3D11_UWP.win64.lib +++ b/lib/GFSDK_SSAO_D3D11_UWP.win64.lib diff --git a/lib/GFSDK_SSAO_D3D12.win32.dll b/lib/GFSDK_SSAO_D3D12.win32.dll Binary files differindex ac8fe40..c072ef8 100644 --- a/lib/GFSDK_SSAO_D3D12.win32.dll +++ b/lib/GFSDK_SSAO_D3D12.win32.dll diff --git a/lib/GFSDK_SSAO_D3D12.win32.lib b/lib/GFSDK_SSAO_D3D12.win32.lib Binary files differindex 141ed14..991c4d5 100644 --- a/lib/GFSDK_SSAO_D3D12.win32.lib +++ b/lib/GFSDK_SSAO_D3D12.win32.lib diff --git a/lib/GFSDK_SSAO_D3D12.win64.dll b/lib/GFSDK_SSAO_D3D12.win64.dll Binary files differindex 9190a3e..54536c4 100644 --- a/lib/GFSDK_SSAO_D3D12.win64.dll +++ b/lib/GFSDK_SSAO_D3D12.win64.dll diff --git a/lib/GFSDK_SSAO_D3D12.win64.lib b/lib/GFSDK_SSAO_D3D12.win64.lib Binary files differindex 9799b95..1e9bb55 100644 --- a/lib/GFSDK_SSAO_D3D12.win64.lib +++ b/lib/GFSDK_SSAO_D3D12.win64.lib diff --git a/lib/GFSDK_SSAO_D3D12_UWP.win32.dll b/lib/GFSDK_SSAO_D3D12_UWP.win32.dll Binary files differindex f1ebd9f..bc95ed7 100644 --- a/lib/GFSDK_SSAO_D3D12_UWP.win32.dll +++ b/lib/GFSDK_SSAO_D3D12_UWP.win32.dll diff --git a/lib/GFSDK_SSAO_D3D12_UWP.win32.lib b/lib/GFSDK_SSAO_D3D12_UWP.win32.lib Binary files differindex 0153d50..b10cb16 100644 --- a/lib/GFSDK_SSAO_D3D12_UWP.win32.lib +++ b/lib/GFSDK_SSAO_D3D12_UWP.win32.lib diff --git a/lib/GFSDK_SSAO_D3D12_UWP.win64.dll b/lib/GFSDK_SSAO_D3D12_UWP.win64.dll Binary files differindex 66175f5..585f4fa 100644 --- a/lib/GFSDK_SSAO_D3D12_UWP.win64.dll +++ b/lib/GFSDK_SSAO_D3D12_UWP.win64.dll diff --git a/lib/GFSDK_SSAO_D3D12_UWP.win64.lib b/lib/GFSDK_SSAO_D3D12_UWP.win64.lib Binary files differindex e481c8e..fecc22d 100644 --- a/lib/GFSDK_SSAO_D3D12_UWP.win64.lib +++ b/lib/GFSDK_SSAO_D3D12_UWP.win64.lib diff --git a/lib/GFSDK_SSAO_GL.osx.dylib b/lib/GFSDK_SSAO_GL.osx.dylib Binary files differindex 2340f28..756e63b 100644 --- a/lib/GFSDK_SSAO_GL.osx.dylib +++ b/lib/GFSDK_SSAO_GL.osx.dylib diff --git a/lib/GFSDK_SSAO_GL.win32.dll b/lib/GFSDK_SSAO_GL.win32.dll Binary files differindex e87c3b2..92e186f 100644 --- a/lib/GFSDK_SSAO_GL.win32.dll +++ b/lib/GFSDK_SSAO_GL.win32.dll diff --git a/lib/GFSDK_SSAO_GL.win32.lib b/lib/GFSDK_SSAO_GL.win32.lib Binary files differindex 3d7c646..c6e0f85 100644 --- a/lib/GFSDK_SSAO_GL.win32.lib +++ b/lib/GFSDK_SSAO_GL.win32.lib diff --git a/lib/GFSDK_SSAO_GL.win64.dll b/lib/GFSDK_SSAO_GL.win64.dll Binary files differindex 1ca4664..b68fdca 100644 --- a/lib/GFSDK_SSAO_GL.win64.dll +++ b/lib/GFSDK_SSAO_GL.win64.dll diff --git a/lib/GFSDK_SSAO_GL.win64.lib b/lib/GFSDK_SSAO_GL.win64.lib Binary files differindex 163937d..dc3589a 100644 --- a/lib/GFSDK_SSAO_GL.win64.lib +++ b/lib/GFSDK_SSAO_GL.win64.lib diff --git a/lib/GFSDK_SSAO_GL.x86_64-linux-gnu.so b/lib/GFSDK_SSAO_GL.x86_64-linux-gnu.so Binary files differindex b04b9d9..ebd9a4a 100644 --- a/lib/GFSDK_SSAO_GL.x86_64-linux-gnu.so +++ b/lib/GFSDK_SSAO_GL.x86_64-linux-gnu.so diff --git a/samples/D3D11/src/SSAO11.cpp b/samples/D3D11/src/SSAO11.cpp index 4f43ee4..e44fa51 100644 --- a/samples/D3D11/src/SSAO11.cpp +++ b/samples/D3D11/src/SSAO11.cpp @@ -67,7 +67,8 @@ public: , m_BlurAO(true) , m_BlurSharpness(32.f) , m_PowerExponent(2.f) - , m_NearAO(1.f) + , m_SmallScaleAO(1.f) + , m_LargeScaleAO(1.f) , m_pVB(NULL) , m_pIB(NULL) , m_pConstantBuffer(NULL) @@ -208,7 +209,8 @@ private: TwAddVarRW(bar, "Radius", TW_TYPE_FLOAT, &m_AORadius, "min=1.0 max=8.0 group=AO"); TwAddVarRW(bar, "Bias", TW_TYPE_FLOAT, &m_AOBias, "min=0.0 max=0.5 group=AO"); - TwAddVarRW(bar, "NearAO", TW_TYPE_FLOAT, &m_NearAO, "min=1.0 max=4.0 group=AO"); + TwAddVarRW(bar, "SmallScaleAO", TW_TYPE_FLOAT, &m_SmallScaleAO, "min=0.0 max=2.0 group=AO"); + TwAddVarRW(bar, "LargeScaleAO", TW_TYPE_FLOAT, &m_LargeScaleAO, "min=0.0 max=2.0 group=AO"); TwAddVarRW(bar, "Power Exponent", TW_TYPE_FLOAT, &m_PowerExponent, "min=0.0 max=4.0 group=AO"); TwAddVarRW(bar, "Enable Blur", TW_TYPE_BOOLCPP, &m_BlurAO, "group=Blur"); TwAddVarRW(bar, "Blur Sharpness", TW_TYPE_FLOAT, &m_BlurSharpness, "group=Blur min=0.0 max=100.0"); @@ -219,7 +221,7 @@ private: void UpdateUI() { const int barWidth = 200; - const int barHeight = 200; + const int barHeight = 220; const int border = 20; char buffer[2048]; @@ -497,8 +499,8 @@ private: GFSDK_SSAO_Parameters AOParams; AOParams.Radius = m_AORadius; AOParams.Bias = m_AOBias; - AOParams.NearAO = m_NearAO; - AOParams.FarAO = 1.f; + AOParams.SmallScaleAO = m_SmallScaleAO; + AOParams.LargeScaleAO = m_LargeScaleAO; AOParams.PowerExponent = m_PowerExponent; AOParams.Blur.Enable = m_BlurAO; AOParams.Blur.Sharpness = m_BlurSharpness; @@ -537,7 +539,8 @@ private: bool m_BlurAO; float m_BlurSharpness; float m_PowerExponent; - float m_NearAO; + float m_SmallScaleAO; + float m_LargeScaleAO; Mesh m_Mesh; ID3D11Buffer* m_pVB; diff --git a/samples/D3D11/src/SSAO11_2015.vcxproj b/samples/D3D11/src/SSAO11_2015.vcxproj index ce0d4f7..f1b50a0 100644 --- a/samples/D3D11/src/SSAO11_2015.vcxproj +++ b/samples/D3D11/src/SSAO11_2015.vcxproj @@ -175,8 +175,7 @@ <TargetMachine>MachineX86</TargetMachine> </Link> <PreBuildEvent> - <Command>copy /Y ..\..\..\lib\GFSDK_SSAO_D3D11.win32.dll ..\Bin -copy /Y ..\external\AntTweakBar\1.16\lib\win32\AntTweakBar.dll ..\Bin</Command> + <Command>copy /Y ..\..\..\lib\GFSDK_SSAO_D3D11.win32.dll ..\Bin</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> @@ -213,8 +212,7 @@ copy /Y ..\external\AntTweakBar\1.16\lib\win32\AntTweakBar.dll ..\Bin</Command> </DataExecutionPrevention> </Link> <PreBuildEvent> - <Command>copy /Y ..\..\..\lib\GFSDK_SSAO_D3D11.win64.dll ..\Bin -copy /Y ..\external\AntTweakBar\1.16\lib\win64\AntTweakBar64.dll ..\Bin</Command> + <Command>copy /Y ..\..\..\lib\GFSDK_SSAO_D3D11.win64.dll ..\Bin</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> @@ -286,8 +284,7 @@ copy /Y ..\external\AntTweakBar\1.16\lib\win64\AntTweakBar64.dll ..\Bin</Command <TargetMachine>MachineX86</TargetMachine> </Link> <PreBuildEvent> - <Command>copy /Y ..\..\..\lib\GFSDK_SSAO_D3D11.win32.dll ..\Bin -copy /Y ..\external\AntTweakBar\1.16\lib\win32\AntTweakBar.dll ..\Bin</Command> + <Command>copy /Y ..\..\..\lib\GFSDK_SSAO_D3D11.win32.dll ..\Bin</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -330,8 +327,7 @@ copy /Y ..\external\AntTweakBar\1.16\lib\win32\AntTweakBar.dll ..\Bin</Command> </DataExecutionPrevention> </Link> <PreBuildEvent> - <Command>copy /Y ..\..\..\lib\GFSDK_SSAO_D3D11.win64.dll ..\Bin -copy /Y ..\external\AntTweakBar\1.16\lib\win64\AntTweakBar64.dll ..\Bin</Command> + <Command>copy /Y ..\..\..\lib\GFSDK_SSAO_D3D11.win64.dll ..\Bin</Command> </PreBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> diff --git a/samples/D3D12/src/Viewer.cpp b/samples/D3D12/src/Viewer.cpp index e445ffd..2ad4761 100644 --- a/samples/D3D12/src/Viewer.cpp +++ b/samples/D3D12/src/Viewer.cpp @@ -952,8 +952,8 @@ public: ImGui::DragFloat("PowerExponent", &mAOParams.PowerExponent, 0.05f, 1.f, 8.f); ImGui::DragFloat("Bias", &mAOParams.Bias, 0.001f, 0, 0.5f); - ImGui::DragFloat("NearAO", &mAOParams.NearAO, 0.01f, 1.f, 2.f); - ImGui::DragFloat("FarAO", &mAOParams.FarAO, 0.01f, 1.f, 2.f); + ImGui::DragFloat("SmallScaleAO", &mAOParams.SmallScaleAO, 0.01f, 0.f, 2.f); + ImGui::DragFloat("LargeScaleAO", &mAOParams.LargeScaleAO, 0.01f, 0.f, 2.f); bool BlurEnabled = mAOParams.Blur.Enable ? true : false; ImGui::Checkbox("Blur.Enable", &BlurEnabled); diff --git a/samples/D3D12/src/Viewer.vcxproj b/samples/D3D12/src/Viewer.vcxproj index c67ff59..2bb2dfe 100644 --- a/samples/D3D12/src/Viewer.vcxproj +++ b/samples/D3D12/src/Viewer.vcxproj @@ -22,7 +22,7 @@ <ProjectGuid>{CFEEDBA7-74CF-4AF1-9A14-0E890CE94DF8}</ProjectGuid> <Keyword>Win32Proj</Keyword> <RootNamespace>hbaop_dx12</RootNamespace> - <WindowsTargetPlatformVersion>10.0.10240.0</WindowsTargetPlatformVersion> + <WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion> <ProjectName>SampleApp_D3D12</ProjectName> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> diff --git a/src/ConstantBuffers.cpp b/src/ConstantBuffers.cpp index 1d9235b..0232cd0 100644 --- a/src/ConstantBuffers.cpp +++ b/src/ConstantBuffers.cpp @@ -77,8 +77,8 @@ void GFSDK::SSAO::GlobalConstants::SetAOParameters(const GFSDK_SSAO_Parameters& m_Data.fNDotVBias = Clamp(Params.Bias, 0.0f, 0.5f); const float AOAmountScaleFactor = 1.f / (1.f - m_Data.fNDotVBias); - m_Data.fNearAOAmount = Clamp(Params.NearAO, 0.f, 4.f) * AOAmountScaleFactor * 2.f; - m_Data.fFarAOAmount = Clamp(Params.FarAO, 0.f, 4.f) * AOAmountScaleFactor; + m_Data.fSmallScaleAOAmount = Clamp(Params.SmallScaleAO, 0.f, 4.f) * AOAmountScaleFactor * 2.f; + m_Data.fLargeScaleAOAmount = Clamp(Params.LargeScaleAO, 0.f, 4.f) * AOAmountScaleFactor; } //-------------------------------------------------------------------------------- diff --git a/src/ConstantBuffers.h b/src/ConstantBuffers.h index 7fd9955..2bf3e07 100644 --- a/src/ConstantBuffers.h +++ b/src/ConstantBuffers.h @@ -27,7 +27,6 @@ public: GlobalConstants() { ZERO_STRUCT(m_Data); - m_Data.iTrue = 1; // Can be useful for figuring out the HBAO+ version from an APIC or NSight capture m_Data.u4BuildVersion = GFSDK_SSAO_Version(); diff --git a/src/shaders/src/CoarseAO_PS.hlsl b/src/shaders/src/CoarseAO_PS.hlsl index b15736a..ffcd14c 100644 --- a/src/shaders/src/CoarseAO_PS.hlsl +++ b/src/shaders/src/CoarseAO_PS.hlsl @@ -143,8 +143,8 @@ float ComputeCoarseAO(float2 FullResUV, float3 ViewPosition, float3 ViewNormal, #endif const float Alpha = 2.0 * GFSDK_PI / NUM_DIRECTIONS; - float NearAO = 0; - float FarAO = 0; + float SmallScaleAO = 0; + float LargeScaleAO = 0; [unroll] for (float DirectionIndex = 0; DirectionIndex < NUM_DIRECTIONS; ++DirectionIndex) @@ -167,7 +167,7 @@ float ComputeCoarseAO(float2 FullResUV, float3 ViewPosition, float3 ViewNormal, float3 S = FetchQuarterResViewPos(SnappedUV); RayPixels += StepSizePixels; - NearAO += ComputeAO(ViewPosition, ViewNormal, S, Params); + SmallScaleAO += ComputeAO(ViewPosition, ViewNormal, S, Params); } [unroll] @@ -177,11 +177,11 @@ float ComputeCoarseAO(float2 FullResUV, float3 ViewPosition, float3 ViewNormal, float3 S = FetchQuarterResViewPos(SnappedUV); RayPixels += StepSizePixels; - FarAO += ComputeAO(ViewPosition, ViewNormal, S, Params); + LargeScaleAO += ComputeAO(ViewPosition, ViewNormal, S, Params); } } - float AO = (NearAO * g_fNearAOAmount) + (FarAO * g_fFarAOAmount); + float AO = (SmallScaleAO * g_fSmallScaleAOAmount) + (LargeScaleAO * g_fLargeScaleAOAmount); AO /= (NUM_DIRECTIONS * NUM_STEPS); diff --git a/src/shaders/src/ConstantBuffers.hlsl b/src/shaders/src/ConstantBuffers.hlsl index 4bcd0b1..d55ed32 100644 --- a/src/shaders/src/ConstantBuffers.hlsl +++ b/src/shaders/src/ConstantBuffers.hlsl @@ -56,10 +56,10 @@ CBUFFER GlobalConstantBuffer REGISTER(b0) DECLARE_CONSTANT(float, fNegInvR2); DECLARE_CONSTANT(float, fNDotVBias); - DECLARE_CONSTANT(float, fNearAOAmount); - DECLARE_CONSTANT(float, fFarAOAmount); + DECLARE_CONSTANT(float, fSmallScaleAOAmount); + DECLARE_CONSTANT(float, fLargeScaleAOAmount); DECLARE_CONSTANT(float, fPowExponent); - DECLARE_CONSTANT(int, iTrue); + DECLARE_CONSTANT(int, iUnused); DECLARE_CONSTANT(float, fBlurViewDepth0); DECLARE_CONSTANT(float, fBlurViewDepth1); diff --git a/src/shaders/src/DebugAO_PS.hlsl b/src/shaders/src/DebugAO_PS.hlsl index 4421f00..80c8ae7 100644 --- a/src/shaders/src/DebugAO_PS.hlsl +++ b/src/shaders/src/DebugAO_PS.hlsl @@ -121,8 +121,8 @@ float4 DebugAO_PS(PostProc_VSOut IN) : SV_TARGET float3 N = normalize(cross(MinDiff(P, Pr, Pl), MinDiff(P, Pt, Pb))); const float Alpha = 2.0 * GFSDK_PI / NUM_DIRECTIONS; - float NearAO = 0; - float FarAO = 0; + float SmallScaleAO = 0; + float LargeScaleAO = 0; [unroll] for (float DirectionIndex = 0; DirectionIndex < NUM_DIRECTIONS; ++DirectionIndex) @@ -148,16 +148,16 @@ float4 DebugAO_PS(PostProc_VSOut IN) : SV_TARGET if (StepIndex == 0) { - NearAO += ComputeAO(P, N, S); + SmallScaleAO += ComputeAO(P, N, S); } else { - FarAO += ComputeAO(P, N, S); + LargeScaleAO += ComputeAO(P, N, S); } } } - float AO = (NearAO * g_fNearAOAmount) + (FarAO * g_fFarAOAmount); + float AO = (SmallScaleAO * g_fSmallScaleAOAmount) + (LargeScaleAO * g_fLargeScaleAOAmount); AO /= (NUM_DIRECTIONS * NUM_STEPS); AO = saturate(1.0 - AO * 2.0); |