mirror of https://github.com/AxioDL/boo.git
D3D depth range
This commit is contained in:
parent
4cec163804
commit
dc7da6aa21
|
@ -923,9 +923,10 @@ struct D3D11CommandQueue : IGraphicsCommandQueue
|
|||
m_boundTarget = ctarget;
|
||||
}
|
||||
|
||||
void setViewport(const SWindowRect& rect)
|
||||
void setViewport(const SWindowRect& rect, float znear, float zfar)
|
||||
{
|
||||
D3D11_VIEWPORT vp = {FLOAT(rect.location[0]), FLOAT(rect.location[1]), FLOAT(rect.size[0]), FLOAT(rect.size[1]), 0.0, 1.0};
|
||||
D3D11_VIEWPORT vp = {FLOAT(rect.location[0]), FLOAT(m_boundTarget->m_height - rect.location[1] - rect.size[1]),
|
||||
FLOAT(rect.size[0]), FLOAT(rect.size[1]), znear, zfar};
|
||||
m_deferredCtx->RSSetViewports(1, &vp);
|
||||
}
|
||||
|
||||
|
|
|
@ -1149,10 +1149,10 @@ struct D3D12CommandQueue : IGraphicsCommandQueue
|
|||
m_boundTarget = ctarget;
|
||||
}
|
||||
|
||||
void setViewport(const SWindowRect& rect)
|
||||
void setViewport(const SWindowRect& rect, float znear, float zfar)
|
||||
{
|
||||
D3D12_VIEWPORT vp = {FLOAT(rect.location[0]), FLOAT(rect.location[1]),
|
||||
FLOAT(rect.size[0]), FLOAT(rect.size[1]), 0.0f, 1.0f};
|
||||
D3D12_VIEWPORT vp = {FLOAT(rect.location[0]), FLOAT(m_boundTarget->m_height - rect.location[1] - rect.size[1]),
|
||||
FLOAT(rect.size[0]), FLOAT(rect.size[1]), znear, zfar};
|
||||
m_cmdList->RSSetViewports(1, &vp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue