Fixed rendering of helpers in deferred mode

This commit is contained in:
dexy 2019-12-07 00:02:24 +11:00
parent 43d6bf1068
commit 5fb8d25770

View File

@ -621,7 +621,14 @@ namespace CodeWalker.Rendering
if (RenderBoundGeoms.Count > 0) //collision meshes pass if (RenderBoundGeoms.Count > 0) //collision meshes pass
{ {
ClearDepth(context); //draw over everything else if (DefScene != null)
{
DefScene.ClearDepth(context);
}
else
{
ClearDepth(context); //draw over everything else
}
context.OutputMerger.BlendState = bsDefault; context.OutputMerger.BlendState = bsDefault;
context.OutputMerger.DepthStencilState = dsEnabled; context.OutputMerger.DepthStencilState = dsEnabled;
@ -643,6 +650,7 @@ namespace CodeWalker.Rendering
} }
context.OutputMerger.BlendState = bsDefault;
RenderedGeometries = GeometryCount; RenderedGeometries = GeometryCount;