From 05e141c5e1cd6a527c1ac8a46b98fe0f2c94f3bd Mon Sep 17 00:00:00 2001 From: lbavoil Date: Tue, 10 May 2016 10:00:32 +0200 Subject: HBAO+ 3.0.0.20735892 --- README.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index f217d78..a450657 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,8 @@ samples/—source for sample applications demonstrating NVIDIA HBAO+. Getting Started --------------- -### INITIALIZE THE LIBRARY: - +#### INITIALIZE THE LIBRARY: +``` GFSDK_SSAO_CustomHeap CustomHeap; CustomHeap.new_ = ::operator new; CustomHeap.delete_ = ::operator delete; @@ -38,18 +38,20 @@ GFSDK_SSAO_Status status; GFSDK_SSAO_Context_D3D11* pAOContext; status = GFSDK_SSAO_CreateContext_D3D11(pD3D11Device, &pAOContext, &CustomHeap); assert(status == GFSDK_SSAO_OK); // HBAO+ requires feature level 11_0 or above +``` -### SET INPUT DEPTHS: - +#### SET INPUT DEPTHS: +``` GFSDK_SSAO_InputData_D3D11 Input; Input.DepthData.DepthTextureType = GFSDK_SSAO_HARDWARE_DEPTHS; Input.DepthData.pFullResDepthTextureSRV = pDepthStencilTextureSRV; Input.DepthData.ProjectionMatrix.Data = GFSDK_SSAO_Float4x4(pProjectionMatrix); Input.DepthData.ProjectionMatrix.Layout = GFSDK_SSAO_ROW_MAJOR_ORDER; Input.DepthData.MetersToViewSpaceUnits = SceneScale; +``` -### SET AO PARAMETERS: - +#### SET AO PARAMETERS: +``` GFSDK_SSAO_Parameters Params; Params.Radius = 2.f; Params.Bias = 0.1f; @@ -57,17 +59,20 @@ Params.PowerExponent = 2.f; Params.Blur.Enable = true; Params.Blur.Radius = GFSDK_SSAO_BLUR_RADIUS_4; Params.Blur.Sharpness = 16.f; +``` -### SET RENDER TARGET: - +#### SET RENDER TARGET: +``` GFSDK_SSAO_Output_D3D11 Output; Output.pRenderTargetView = pOutputColorRTV; Output.Blend.Mode = GFSDK_SSAO_OVERWRITE_RGB; +``` -### RENDER AO: - +#### RENDER AO: +``` status = pAOContext->RenderAO(pD3D11Context, Input, Params, Output); assert(status == GFSDK_SSAO_OK); +``` Data Flow --------- -- cgit v1.2.3