From 0b97399336ea8892418fcbaadcde311900396ce6 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sat, 1 Dec 2018 11:49:01 -0800 Subject: Added explicit state transition control flags to CLEAR_DEPTH_STENCIL_FLAGS --- unityplugin/GhostCubeScene/src/GhostCubeScene.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unityplugin/GhostCubeScene/src') diff --git a/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp b/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp index 49dd3a1..8022172 100644 --- a/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp +++ b/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp @@ -159,7 +159,7 @@ void GhostCubeScene::Render(UnityRenderingEvent RenderEventFunc) pCtx->SetRenderTargets(1, pRTVs, pDSV, SET_RENDER_TARGETS_FLAG_TRANSITION_ALL); const float ClearColor[] = { 0.f, 0.2f, 0.5f, 1.0f }; pCtx->ClearRenderTarget(pRTVs[0], ClearColor, CLEAR_RENDER_TARGET_TRANSITION_STATE); - pCtx->ClearDepthStencil(pDSV, CLEAR_DEPTH_FLAG, ReverseZ ? 0.f : 1.f, 0); + pCtx->ClearDepthStencil(pDSV, CLEAR_DEPTH_FLAG | CLEAR_DEPTH_STENCIL_TRANSITION_STATE_FLAG, ReverseZ ? 0.f : 1.f, 0); if (DeviceCaps.DevType == DeviceType::D3D12) { -- cgit v1.2.3