D3D: Depth range inversion.

Credits go to Galop1n for designing this technique and to BhaaLseN for cleaning up the commit.
This commit is contained in:
galop1n
2015-05-24 14:44:25 +02:00
committed by Jules Blok
parent 308b72d376
commit 2975e53091
6 changed files with 36 additions and 16 deletions

View File

@ -433,7 +433,7 @@ ID3D11DepthStencilState* StateCache::Get(ZMode state)
depthdc.DepthEnable = TRUE;
depthdc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
depthdc.DepthFunc = D3D11_COMPARISON_LESS;
depthdc.DepthFunc = D3D11_COMPARISON_GREATER;
depthdc.StencilEnable = FALSE;
depthdc.StencilReadMask = D3D11_DEFAULT_STENCIL_READ_MASK;
depthdc.StencilWriteMask = D3D11_DEFAULT_STENCIL_WRITE_MASK;
@ -441,12 +441,12 @@ ID3D11DepthStencilState* StateCache::Get(ZMode state)
const D3D11_COMPARISON_FUNC d3dCmpFuncs[8] =
{
D3D11_COMPARISON_NEVER,
D3D11_COMPARISON_LESS,
D3D11_COMPARISON_EQUAL,
D3D11_COMPARISON_LESS_EQUAL,
D3D11_COMPARISON_GREATER,
D3D11_COMPARISON_NOT_EQUAL,
D3D11_COMPARISON_EQUAL,
D3D11_COMPARISON_GREATER_EQUAL,
D3D11_COMPARISON_LESS,
D3D11_COMPARISON_NOT_EQUAL,
D3D11_COMPARISON_LESS_EQUAL,
D3D11_COMPARISON_ALWAYS
};