Hello,
i am trying to implement Nvidia HBAO+ into urho3D and i got some questions
Here is the official online documentaiton: docs.nvidia.com/gameworks/conten … ng-started (slightly outdated)
First i am initializing the library like that:
[code]GFSDK_SSAO_CustomHeap _HBAOCustomHeap;
HBAOCustomHeap.new = ::operator new;
HBAOCustomHeap.delete = ::operator delete;
GFSDK_SSAO_Status _HBAOInitStatus;
_HBAOInitStatus = GFSDK_SSAO_CreateContext_D3D11(m_pGraphics->GetImpl()->GetDevice(), &m_pHBAOContext, &_HBAOCustomHeap);[/code]
Everything is fine and the library is initialized correctly. Then depth input information is asked.
GFSDK_SSAO_InputData_D3D11 Input;
Input.DepthData.DepthTextureType = GFSDK_SSAO_VIEW_DEPTHS;
Input.DepthData.pFullResDepthTextureSRV = ???
Input.DepthData.ProjectionMatrix.Data = GFSDK_SSAO_Float4x4(this->GetMainCamera()->GetProjection().Transpose().Data());
Input.DepthData.ProjectionMatrix.Layout = GFSDK_SSAO_ROW_MAJOR_ORDER;
Input.DepthData.MetersToViewSpaceUnits = 1.0f;
Input.DepthData.DepthTextureType can be:
GFSDK_SSAO_HARDWARE_DEPTHS, // Non-linear depths in the range [0.f,1.f]
GFSDK_SSAO_HARDWARE_DEPTHS_SUB_RANGE, // Non-linear depths in the range [Viewport.MinDepth,Viewport.MaxDepth]
GFSDK_SSAO_VIEW_DEPTHS, // Linear depths in the range [ZNear,ZFar]
Input.DepthData.pFullResDepthTextureSRV is expecting a ID3D11ShaderResourceView*. My question is how to get it from Urho3D ?
Notes: I am using standard DX11 deferred renderpath and not deferred hardware depth renderpath.
Thank you for you help ! If i get this to work i will post the whole code in this forum.