aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorlbavoil <[email protected]>2016-05-10 10:00:32 +0200
committerlbavoil <[email protected]>2016-05-10 10:00:32 +0200
commit05e141c5e1cd6a527c1ac8a46b98fe0f2c94f3bd (patch)
treeceff4e852503f728f7d86927b89f400e5e4eabf9 /README.md
parentHBAO+ 3.0.0.20735892 (diff)
downloadhbaoplus-05e141c5e1cd6a527c1ac8a46b98fe0f2c94f3bd.tar.xz
hbaoplus-05e141c5e1cd6a527c1ac8a46b98fe0f2c94f3bd.zip
HBAO+ 3.0.0.20735892
Diffstat (limited to 'README.md')
-rw-r--r--README.md25
1 files changed, 15 insertions, 10 deletions
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
---------