Adjusts the lightbin manager to be a regular bin, and shifts ownership of both lighting targets to the deferred manager. Probes now render ahead of lights to make the additive order jive.

Also reordered the probe targets used so they match lights for consistency.
This commit is contained in:
Areloch 2018-10-24 23:43:12 -05:00
parent 1b8549b146
commit e72f04648a
9 changed files with 108 additions and 48 deletions

View file

@ -940,15 +940,22 @@ void GFXD3D11Device::clear(U32 flags, const LinearColorF& color, F32 z, U32 sten
UINT depthstencilFlag = 0;
ID3D11RenderTargetView* rtView = NULL;
//TODO: current support is 5 render targets, clean this up
ID3D11RenderTargetView* rtView[5] = { NULL };
ID3D11DepthStencilView* dsView = NULL;
mD3DDeviceContext->OMGetRenderTargets(1, &rtView, &dsView);
mD3DDeviceContext->OMGetRenderTargets(5, rtView, &dsView);
const FLOAT clearColor[4] = { color.red, color.green, color.blue, color.alpha };
if (flags & GFXClearTarget && rtView)
mD3DDeviceContext->ClearRenderTargetView(rtView, clearColor);
{
for (U32 i = 0; i < 5; i++)
{
if (rtView[i])
mD3DDeviceContext->ClearRenderTargetView(rtView[i], clearColor);
}
}
if (flags & GFXClearZBuffer)
depthstencilFlag |= D3D11_CLEAR_DEPTH;
@ -959,7 +966,8 @@ void GFXD3D11Device::clear(U32 flags, const LinearColorF& color, F32 z, U32 sten
if (depthstencilFlag && dsView)
mD3DDeviceContext->ClearDepthStencilView(dsView, depthstencilFlag, z, stencil);
SAFE_RELEASE(rtView);
for (U32 i = 0; i < 5; i++)
SAFE_RELEASE(rtView[i]);
SAFE_RELEASE(dsView);
}