diff options
Diffstat (limited to 'src')
65 files changed, 103 insertions, 102 deletions
diff --git a/src/API.cpp b/src/API.cpp index 350472d..a7163c1 100644 --- a/src/API.cpp +++ b/src/API.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/AppState_DX11.cpp b/src/AppState_DX11.cpp index eb50007..da0d55b 100644 --- a/src/AppState_DX11.cpp +++ b/src/AppState_DX11.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/AppState_DX11.h b/src/AppState_DX11.h index 7de6e6f..15d9903 100644 --- a/src/AppState_DX11.h +++ b/src/AppState_DX11.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/AppState_GL.cpp b/src/AppState_GL.cpp index 85bf40f..7811a5e 100644 --- a/src/AppState_GL.cpp +++ b/src/AppState_GL.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/AppState_GL.h b/src/AppState_GL.h index 6ef03b2..a8ba964 100644 --- a/src/AppState_GL.h +++ b/src/AppState_GL.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/BuildVersion.h b/src/BuildVersion.h index 2cdfb91..48c2993 100644 --- a/src/BuildVersion.h +++ b/src/BuildVersion.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/Common.h b/src/Common.h index ac13b87..fc36052 100644 --- a/src/Common.h +++ b/src/Common.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/Common_DX12.h b/src/Common_DX12.h index f4d7f34..880d283 100644 --- a/src/Common_DX12.h +++ b/src/Common_DX12.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/Common_GL.h b/src/Common_GL.h index aced472..7cead87 100644 --- a/src/Common_GL.h +++ b/src/Common_GL.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/ConstantBuffers.cpp b/src/ConstantBuffers.cpp index 0232cd0..7e2aa66 100644 --- a/src/ConstantBuffers.cpp +++ b/src/ConstantBuffers.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation @@ -73,12 +73,12 @@ void GFSDK::SSAO::GlobalConstants::SetAOParameters(const GFSDK_SSAO_Parameters& SetBlurConstants(Params.Blur, InputDepth); SetDepthThresholdConstants(Params.DepthThreshold); - m_Data.fPowExponent = Clamp(Params.PowerExponent, 1.f, 8.f); + m_Data.fPowExponent = Clamp(Params.PowerExponent, 1.f, 4.f); m_Data.fNDotVBias = Clamp(Params.Bias, 0.0f, 0.5f); const float AOAmountScaleFactor = 1.f / (1.f - m_Data.fNDotVBias); - m_Data.fSmallScaleAOAmount = Clamp(Params.SmallScaleAO, 0.f, 4.f) * AOAmountScaleFactor * 2.f; - m_Data.fLargeScaleAOAmount = Clamp(Params.LargeScaleAO, 0.f, 4.f) * AOAmountScaleFactor; + m_Data.fSmallScaleAOAmount = Clamp(Params.SmallScaleAO, 0.f, 2.f) * AOAmountScaleFactor * 2.f; + m_Data.fLargeScaleAOAmount = Clamp(Params.LargeScaleAO, 0.f, 2.f) * AOAmountScaleFactor; } //-------------------------------------------------------------------------------- diff --git a/src/ConstantBuffers.h b/src/ConstantBuffers.h index 2bf3e07..39a16d8 100644 --- a/src/ConstantBuffers.h +++ b/src/ConstantBuffers.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/GLSLProgram.h b/src/GLSLProgram.h index 7641707..4cedc7b 100644 --- a/src/GLSLProgram.h +++ b/src/GLSLProgram.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/InputDepthInfo.h b/src/InputDepthInfo.h index 3ac19fb..977b53f 100644 --- a/src/InputDepthInfo.h +++ b/src/InputDepthInfo.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/InputNormalInfo.h b/src/InputNormalInfo.h index 28dcf87..4a96262 100644 --- a/src/InputNormalInfo.h +++ b/src/InputNormalInfo.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/InputViewport.h b/src/InputViewport.h index 0f80a44..37b47d2 100644 --- a/src/InputViewport.h +++ b/src/InputViewport.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/MathUtil.h b/src/MathUtil.h index c540b04..54f5084 100644 --- a/src/MathUtil.h +++ b/src/MathUtil.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/MatrixView.h b/src/MatrixView.h index 70ab223..def828c 100644 --- a/src/MatrixView.h +++ b/src/MatrixView.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/OutputInfo.h b/src/OutputInfo.h index 0cb769d..b347225 100644 --- a/src/OutputInfo.h +++ b/src/OutputInfo.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/PerfMarkers.h b/src/PerfMarkers.h index 2d129da..2bf4129 100644 --- a/src/PerfMarkers.h +++ b/src/PerfMarkers.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/PipelineStateObjects_DX12.cpp b/src/PipelineStateObjects_DX12.cpp index f2abe71..e7f4985 100644 --- a/src/PipelineStateObjects_DX12.cpp +++ b/src/PipelineStateObjects_DX12.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation @@ -592,12 +592,14 @@ ID3D12PipelineState* GFSDK::SSAO::D3D12::BlurYPSO::GetPSO( m_EnableSharpnessProfilePermutation != EnableSharpnessProfilePermutation || m_BlurKernelRadiusPermutation != BlurKernelRadiusPermutation || m_RTSampleCount != Output.RenderTarget.SampleCount || - m_RTFormat != Output.RenderTarget.Format) + m_RTFormat != Output.RenderTarget.Format || + m_BlendMode != Output.Blend.Mode) { m_EnableSharpnessProfilePermutation = EnableSharpnessProfilePermutation; m_BlurKernelRadiusPermutation = BlurKernelRadiusPermutation; m_RTSampleCount = Output.RenderTarget.SampleCount; m_RTFormat = Output.RenderTarget.Format; + m_BlendMode = Output.Blend.Mode; m_BlurYPSO.Desc.pRootSignature = m_BlurYRS; m_BlurYPSO.Desc.NumRenderTargets = 1; diff --git a/src/PipelineStateObjects_DX12.h b/src/PipelineStateObjects_DX12.h index 58def6e..509e3f5 100644 --- a/src/PipelineStateObjects_DX12.h +++ b/src/PipelineStateObjects_DX12.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation @@ -548,6 +548,7 @@ private: int m_BlurKernelRadiusPermutation; UINT m_RTSampleCount; DXGI_FORMAT m_RTFormat; + int m_BlendMode; public: BlurYPSO() @@ -556,6 +557,7 @@ public: , m_BlurKernelRadiusPermutation(-1) , m_RTSampleCount(0) , m_RTFormat(DXGI_FORMAT_UNKNOWN) + , m_BlendMode(-1) { } diff --git a/src/ProjectionMatrixInfo.cpp b/src/ProjectionMatrixInfo.cpp index 2a19892..03ee842 100644 --- a/src/ProjectionMatrixInfo.cpp +++ b/src/ProjectionMatrixInfo.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/ProjectionMatrixInfo.h b/src/ProjectionMatrixInfo.h index e4216a2..09eb904 100644 --- a/src/ProjectionMatrixInfo.h +++ b/src/ProjectionMatrixInfo.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/RandomTexture.cpp b/src/RandomTexture.cpp index cf0f357..f3debfb 100644 --- a/src/RandomTexture.cpp +++ b/src/RandomTexture.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/RandomTexture.h b/src/RandomTexture.h index f8afe98..edd1846 100644 --- a/src/RandomTexture.h +++ b/src/RandomTexture.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/RenderOptions.h b/src/RenderOptions.h index bda89e8..3fdebd7 100644 --- a/src/RenderOptions.h +++ b/src/RenderOptions.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/RenderTargets_DX11.h b/src/RenderTargets_DX11.h index 179c086..7676641 100644 --- a/src/RenderTargets_DX11.h +++ b/src/RenderTargets_DX11.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation @@ -14,6 +14,10 @@ #include "Common.h" #include "RenderOptions.h" +#if USE_NVAPI +#include "nvapi.h" +#endif + namespace GFSDK { namespace SSAO @@ -91,6 +95,20 @@ public: THROW_IF_FAILED(pDevice->CreateShaderResourceView(pTexture, NULL, &pSRV)); THROW_IF_FAILED(pDevice->CreateRenderTargetView(pTexture, NULL, &pRTV)); +#if USE_NVAPI + NvAPI_Status Status = NvAPI_Initialize(); + NVDX_ObjectHandle NVHandle = nullptr; + if (Status == NVAPI_OK) + { + Status = NvAPI_D3D_GetObjectHandleForResource(pDevice, pTexture, &NVHandle); + if (NVHandle) + { + NvU32 HintValue = 1; + Status = NvAPI_D3D_SetResourceHint(pDevice, NVHandle, NVAPI_D3D_SRH_CATEGORY_SLI, NVAPI_D3D_SRH_SLI_APP_CONTROLLED_INTERFRAME_CONTENT_SYNC, &HintValue); + } + } +#endif + m_AllocatedSizeInBytes = Width * Height * ArraySize * GetFormatSizeInBytes(Format); } } diff --git a/src/RenderTargets_DX12.h b/src/RenderTargets_DX12.h index 4ba4901..799d024 100644 --- a/src/RenderTargets_DX12.h +++ b/src/RenderTargets_DX12.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/RenderTargets_GL.h b/src/RenderTargets_GL.h index 00661a7..134a472 100644 --- a/src/RenderTargets_GL.h +++ b/src/RenderTargets_GL.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/Renderer_DX11.cpp b/src/Renderer_DX11.cpp index c255f79..bfe150b 100644 --- a/src/Renderer_DX11.cpp +++ b/src/Renderer_DX11.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/Renderer_DX11.h b/src/Renderer_DX11.h index 2e602af..4f2a6db 100644 --- a/src/Renderer_DX11.h +++ b/src/Renderer_DX11.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/Renderer_DX12.cpp b/src/Renderer_DX12.cpp index 3b4cec3..59d94cf 100644 --- a/src/Renderer_DX12.cpp +++ b/src/Renderer_DX12.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation @@ -34,7 +34,6 @@ private: //-------------------------------------------------------------------------------- void GFSDK::SSAO::D3D12::Renderer::CreateResources(GFSDK_D3D12_GraphicsContext* pGraphicsContext) { - m_States.Create(pGraphicsContext); m_Shaders.Create(pGraphicsContext->pDevice); m_GlobalCB.Create(pGraphicsContext, eGlobalCB, 0); @@ -75,7 +74,6 @@ void GFSDK::SSAO::D3D12::Renderer::ReleaseResources() m_BlurXPSO.Release(); m_BlurYPSO.Release(); - m_States.Release(); m_Shaders.Release(); m_RTs.Release(); } @@ -566,6 +564,13 @@ void GFSDK::SSAO::D3D12::Renderer::Render(GFSDK_D3D12_GraphicsContext* pGraphics m_GraphicsContext.pCmdList->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); + D3D12_RECT ScissorRect = {}; + ScissorRect.left = 0; + ScissorRect.top = 0; + ScissorRect.right = 16384; + ScissorRect.bottom = 16384; + m_GraphicsContext.pCmdList->RSSetScissorRects(1, &ScissorRect); + m_GlobalCB.UpdateBuffer(pGraphicsContext, RenderMask); RenderHBAOPlus(pGraphicsContext, RenderMask); diff --git a/src/Renderer_DX12.h b/src/Renderer_DX12.h index c13c52b..724a6e6 100644 --- a/src/Renderer_DX12.h +++ b/src/Renderer_DX12.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/Renderer_GL.cpp b/src/Renderer_GL.cpp index 3594772..d24dd77 100644 --- a/src/Renderer_GL.cpp +++ b/src/Renderer_GL.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/Renderer_GL.h b/src/Renderer_GL.h index d87d754..c9dfc1c 100644 --- a/src/Renderer_GL.h +++ b/src/Renderer_GL.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/Shaders_DX11.cpp b/src/Shaders_DX11.cpp index 7610100..f970023 100644 --- a/src/Shaders_DX11.cpp +++ b/src/Shaders_DX11.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/Shaders_DX11.h b/src/Shaders_DX11.h index cc8664d..d6cdb0b 100644 --- a/src/Shaders_DX11.h +++ b/src/Shaders_DX11.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/Shaders_DX12.cpp b/src/Shaders_DX12.cpp index db6154d..4d79ad7 100644 --- a/src/Shaders_DX12.cpp +++ b/src/Shaders_DX12.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/Shaders_DX12.h b/src/Shaders_DX12.h index 89a6ce3..835d866 100644 --- a/src/Shaders_DX12.h +++ b/src/Shaders_DX12.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/Shaders_GL.cpp b/src/Shaders_GL.cpp index 690eaed..7226dea 100644 --- a/src/Shaders_GL.cpp +++ b/src/Shaders_GL.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/Shaders_GL.h b/src/Shaders_GL.h index a91a1d8..ed0fb95 100644 --- a/src/Shaders_GL.h +++ b/src/Shaders_GL.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/States_DX11.cpp b/src/States_DX11.cpp index 75dab26..23cb899 100644 --- a/src/States_DX11.cpp +++ b/src/States_DX11.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/States_DX11.h b/src/States_DX11.h index 3309d47..911218c 100644 --- a/src/States_DX11.h +++ b/src/States_DX11.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/States_DX12.cpp b/src/States_DX12.cpp index 9ecc623..e3735d8 100644 --- a/src/States_DX12.cpp +++ b/src/States_DX12.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation @@ -30,7 +30,6 @@ void GFSDK::SSAO::D3D12::States::CreateBlendStates() } m_pBlendState_Disabled = BlendStateDesc; - //SAFE_D3D_CALL(pD3DDevice->CreateBlendState(&BlendStateDesc, &m_pBlendState_Disabled)); // // Create BlendState_Multiply_PreserveAlpha @@ -46,7 +45,6 @@ void GFSDK::SSAO::D3D12::States::CreateBlendStates() BlendStateDesc.RenderTarget[0].BlendOpAlpha = D3D12_BLEND_OP_ADD; m_pBlendState_Multiply_PreserveAlpha = BlendStateDesc; - //SAFE_D3D_CALL(pD3DDevice->CreateBlendState(&BlendStateDesc, &m_pBlendState_Multiply_PreserveAlpha)); // // Create BlendState_Disabled_PreserveAlpha @@ -55,7 +53,6 @@ void GFSDK::SSAO::D3D12::States::CreateBlendStates() BlendStateDesc.RenderTarget[0].BlendEnable = FALSE; m_pBlendState_Disabled_PreserveAlpha = BlendStateDesc; - //SAFE_D3D_CALL(pD3DDevice->CreateBlendState(&BlendStateDesc, &m_pBlendState_Disabled_PreserveAlpha)); } //-------------------------------------------------------------------------------- @@ -87,7 +84,6 @@ void GFSDK::SSAO::D3D12::States::CreateDepthStencilStates() }; m_pDepthStencilState_Disabled = DepthStencilDesc; - //SAFE_D3D_CALL(pD3DDevice->CreateDepthStencilState(&DepthStencilDesc, &m_pDepthStencilState_Disabled)); } //-------------------------------------------------------------------------------- @@ -97,7 +93,7 @@ void GFSDK::SSAO::D3D12::States::CreateRasterizerStates() // Create RasterizerState_Fullscreen_NoScissor // - static D3D12_RASTERIZER_DESC D3D12_RASTERIZER_DESC_0 = + static D3D12_RASTERIZER_DESC Desc = { D3D12_FILL_MODE_SOLID, //FillMode D3D12_CULL_MODE_BACK, //CullMode 0x0, //FrontCounterClockwise @@ -110,8 +106,7 @@ void GFSDK::SSAO::D3D12::States::CreateRasterizerStates() 0x0 //AntialiasedLineEnable }; - m_pRasterizerState_Fullscreen_NoScissor = D3D12_RASTERIZER_DESC_0; - //SAFE_D3D_CALL(pD3DDevice->CreateRasterizerState(&D3D12_RASTERIZER_DESC_0, &m_pRasterizerState_Fullscreen_NoScissor)); + m_pRasterizerState_Fullscreen_NoScissor = Desc; } //-------------------------------------------------------------------------------- @@ -135,7 +130,6 @@ void GFSDK::SSAO::D3D12::States::CreateSamplerStates() SamplerDesc.MaxLOD = 0; m_pSamplerState_PointClamp = SamplerDesc; - //SAFE_D3D_CALL(pD3DDevice->CreateSamplerState(&SamplerDesc, &m_pSamplerState_PointClamp)); // // Create SamplerState_PointBorder @@ -145,7 +139,6 @@ void GFSDK::SSAO::D3D12::States::CreateSamplerStates() SamplerDesc.AddressV = D3D12_TEXTURE_ADDRESS_MODE_BORDER; m_pSamplerState_PointBorder = SamplerDesc; - //SAFE_D3D_CALL(pD3DDevice->CreateSamplerState(&SamplerDesc, &m_pSamplerState_PointBorder)); // // Create SamplerState_LinearClamp @@ -156,7 +149,6 @@ void GFSDK::SSAO::D3D12::States::CreateSamplerStates() SamplerDesc.AddressV = D3D12_TEXTURE_ADDRESS_MODE_CLAMP; m_pSamplerState_LinearClamp = SamplerDesc; - //SAFE_D3D_CALL(pD3DDevice->CreateSamplerState(&SamplerDesc, &m_pSamplerState_LinearClamp)); #if ENABLE_DEBUG_MODES // @@ -168,12 +160,11 @@ void GFSDK::SSAO::D3D12::States::CreateSamplerStates() SamplerDesc.AddressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP; m_pSamplerState_PointWrap = SamplerDesc; - //SAFE_D3D_CALL(pD3DDevice->CreateSamplerState(&SamplerDesc, &m_pSamplerState_PointWrap)); #endif } //-------------------------------------------------------------------------------- -void GFSDK::SSAO::D3D12::States::Create(GFSDK_D3D12_GraphicsContext* pD3DDevice) +void GFSDK::SSAO::D3D12::States::Init() { CreateBlendStates(); CreateDepthStencilStates(); @@ -181,20 +172,4 @@ void GFSDK::SSAO::D3D12::States::Create(GFSDK_D3D12_GraphicsContext* pD3DDevice) CreateSamplerStates(); } -//-------------------------------------------------------------------------------- -void GFSDK::SSAO::D3D12::States::Release() -{ - //SAFE_RELEASE(m_pBlendState_Disabled); - //SAFE_RELEASE(m_pBlendState_Multiply_PreserveAlpha); - //SAFE_RELEASE(m_pBlendState_Disabled_PreserveAlpha); - //SAFE_RELEASE(m_pDepthStencilState_Disabled); - //SAFE_RELEASE(m_pRasterizerState_Fullscreen_NoScissor); - //SAFE_RELEASE(m_pSamplerState_PointClamp); - //SAFE_RELEASE(m_pSamplerState_PointBorder); - //SAFE_RELEASE(m_pSamplerState_LinearClamp); -#if ENABLE_DEBUG_MODES - //SAFE_RELEASE(m_pSamplerState_PointWrap); -#endif -} - #endif // SUPPORT_D3D12 diff --git a/src/States_DX12.h b/src/States_DX12.h index adf7bb8..66820c8 100644 --- a/src/States_DX12.h +++ b/src/States_DX12.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation @@ -26,10 +26,10 @@ class States public: States() { + Init(); } - void Create(GFSDK_D3D12_GraphicsContext* pD3DDevice); - void Release(); + void Init(); D3D12_BLEND_DESC* GetBlendStateMultiplyPreserveAlpha() { diff --git a/src/States_GL.cpp b/src/States_GL.cpp index f6e00e9..969859f 100644 --- a/src/States_GL.cpp +++ b/src/States_GL.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/States_GL.h b/src/States_GL.h index 629cf1f..ff25b36 100644 --- a/src/States_GL.h +++ b/src/States_GL.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/TextureUtil.h b/src/TextureUtil.h index 442dcf8..c7a9052 100644 --- a/src/TextureUtil.h +++ b/src/TextureUtil.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/TimestampQueries.h b/src/TimestampQueries.h index 0214975..8cd5dc3 100644 --- a/src/TimestampQueries.h +++ b/src/TimestampQueries.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/UserTexture.h b/src/UserTexture.h index 57a22d5..7aea6c6 100644 --- a/src/UserTexture.h +++ b/src/UserTexture.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/VAO_GL.h b/src/VAO_GL.h index acdd2df..5280fe7 100644 --- a/src/VAO_GL.h +++ b/src/VAO_GL.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/Viewports.h b/src/Viewports.h index c2abc39..27e7bc0 100644 --- a/src/Viewports.h +++ b/src/Viewports.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/shaders/src/BlurX_PS.hlsl b/src/shaders/src/BlurX_PS.hlsl index 7554711..8a0bb9f 100644 --- a/src/shaders/src/BlurX_PS.hlsl +++ b/src/shaders/src/BlurX_PS.hlsl @@ -4,7 +4,7 @@ */ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/shaders/src/BlurY_PS.hlsl b/src/shaders/src/BlurY_PS.hlsl index 77ec810..7e0ea0f 100644 --- a/src/shaders/src/BlurY_PS.hlsl +++ b/src/shaders/src/BlurY_PS.hlsl @@ -4,7 +4,7 @@ */ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/shaders/src/CoarseAO_GS.hlsl b/src/shaders/src/CoarseAO_GS.hlsl index ea898fc..3c9ef0d 100644 --- a/src/shaders/src/CoarseAO_GS.hlsl +++ b/src/shaders/src/CoarseAO_GS.hlsl @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/shaders/src/CoarseAO_PS.hlsl b/src/shaders/src/CoarseAO_PS.hlsl index b884f47..afdc7cf 100644 --- a/src/shaders/src/CoarseAO_PS.hlsl +++ b/src/shaders/src/CoarseAO_PS.hlsl @@ -6,7 +6,7 @@ */ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation @@ -66,7 +66,6 @@ float3 FetchQuarterResViewPos(float2 UV) //---------------------------------------------------------------------------------- float2 RotateDirection(float2 V, float2 RotationCosSin) { - // V is the normalized 2D vector to be rotated // RotationCosSin is (cos(alpha),sin(alpha)) where alpha is the rotation angle // A 2D rotation matrix is applied (see https://en.wikipedia.org/wiki/Rotation_matrix) return float2(V.x*RotationCosSin.x - V.y*RotationCosSin.y, diff --git a/src/shaders/src/CopyDepth_PS.hlsl b/src/shaders/src/CopyDepth_PS.hlsl index 6bba531..832374d 100644 --- a/src/shaders/src/CopyDepth_PS.hlsl +++ b/src/shaders/src/CopyDepth_PS.hlsl @@ -3,7 +3,7 @@ */ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/shaders/src/DebugAO_PS.hlsl b/src/shaders/src/DebugAO_PS.hlsl index 80c8ae7..9c804cc 100644 --- a/src/shaders/src/DebugAO_PS.hlsl +++ b/src/shaders/src/DebugAO_PS.hlsl @@ -3,7 +3,7 @@ */ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/shaders/src/DebugNormals_PS.hlsl b/src/shaders/src/DebugNormals_PS.hlsl index 9df87ac..50d0cc0 100644 --- a/src/shaders/src/DebugNormals_PS.hlsl +++ b/src/shaders/src/DebugNormals_PS.hlsl @@ -3,7 +3,7 @@ */ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/shaders/src/DeinterleaveDepth_PS.hlsl b/src/shaders/src/DeinterleaveDepth_PS.hlsl index fb0e281..2a8efb0 100644 --- a/src/shaders/src/DeinterleaveDepth_PS.hlsl +++ b/src/shaders/src/DeinterleaveDepth_PS.hlsl @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/shaders/src/FullScreenTriangle_VS.hlsl b/src/shaders/src/FullScreenTriangle_VS.hlsl index 973a334..4e24711 100644 --- a/src/shaders/src/FullScreenTriangle_VS.hlsl +++ b/src/shaders/src/FullScreenTriangle_VS.hlsl @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/shaders/src/LinearizeDepth_PS.hlsl b/src/shaders/src/LinearizeDepth_PS.hlsl index d0881db..ceadf7a 100644 --- a/src/shaders/src/LinearizeDepth_PS.hlsl +++ b/src/shaders/src/LinearizeDepth_PS.hlsl @@ -3,7 +3,7 @@ */ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/shaders/src/ReconstructNormal_PS.hlsl b/src/shaders/src/ReconstructNormal_PS.hlsl index 1a15230..a44c6d4 100644 --- a/src/shaders/src/ReconstructNormal_PS.hlsl +++ b/src/shaders/src/ReconstructNormal_PS.hlsl @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/shaders/src/ReinterleaveAO_PS.hlsl b/src/shaders/src/ReinterleaveAO_PS.hlsl index e9cc5f4..d04f109 100644 --- a/src/shaders/src/ReinterleaveAO_PS.hlsl +++ b/src/shaders/src/ReinterleaveAO_PS.hlsl @@ -3,7 +3,7 @@ */ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation diff --git a/src/shaders/src/SharedDefines.h b/src/shaders/src/SharedDefines.h index e912fc7..12298be 100644 --- a/src/shaders/src/SharedDefines.h +++ b/src/shaders/src/SharedDefines.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation |