Skip to content

Commit 6195a7a

Browse files
GLTF Viewer: updated the usage of PostFXContext
1 parent 456d244 commit 6195a7a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Samples/GLTFViewer/src/GLTFViewer.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,13 @@ void GLTFViewer::Render()
10391039
m_ApplyPostFX.Initialize(m_pDevice, m_pSwapChain->GetDesc().ColorBufferFormat, m_FrameAttribsCB);
10401040
}
10411041

1042-
m_SSR->SetBackBufferSize(m_pDevice, m_pImmediateContext, SCDesc.Width, SCDesc.Height);
1042+
PostFXContext::FrameDesc FrameDesc;
1043+
FrameDesc.Index = m_CurrentFrameNumber;
1044+
FrameDesc.Width = SCDesc.Width;
1045+
FrameDesc.Height = SCDesc.Height;
1046+
m_PostFXContext->PrepareResources(FrameDesc);
1047+
1048+
m_SSR->PrepareResources(m_pDevice, m_PostFXContext.get());
10431049

10441050
m_GBuffer->Resize(m_pDevice, SCDesc.Width, SCDesc.Height);
10451051
m_GBuffer->Bind(m_pImmediateContext, GBUFFER_RT_FLAG_ALL, nullptr, GBUFFER_RT_FLAG_ALL);
@@ -1220,8 +1226,7 @@ void GLTFViewer::Render()
12201226
PostFXAttibs.pDevice = m_pDevice;
12211227
PostFXAttibs.pDeviceContext = m_pImmediateContext;
12221228
PostFXAttibs.pCameraAttribsCB = m_FrameAttribsCB;
1223-
PostFXAttibs.FrameIndex = m_CurrentFrameNumber;
1224-
m_PostFXContext->PrepareResources(PostFXAttibs);
1229+
m_PostFXContext->Execute(PostFXAttibs);
12251230
}
12261231

12271232
{

0 commit comments

Comments
 (0)