mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
VideoBackends: Enable depth clamping.
This commit is contained in:
@ -440,7 +440,7 @@ ID3D11RasterizerState* StateCache::Get(RasterizerState state)
|
||||
return it->second;
|
||||
|
||||
D3D11_RASTERIZER_DESC rastdc = CD3D11_RASTERIZER_DESC(D3D11_FILL_SOLID, state.cull_mode, false, 0,
|
||||
0.f, 0, true, true, false, false);
|
||||
0.f, 0, false, true, false, false);
|
||||
|
||||
ID3D11RasterizerState* res = nullptr;
|
||||
|
||||
|
@ -578,14 +578,7 @@ void Renderer::SetViewport()
|
||||
Wd = (X + Wd <= GetTargetWidth()) ? Wd : (GetTargetWidth() - X);
|
||||
Ht = (Y + Ht <= GetTargetHeight()) ? Ht : (GetTargetHeight() - Y);
|
||||
|
||||
D3D11_VIEWPORT vp = CD3D11_VIEWPORT(
|
||||
X, Y, Wd, Ht,
|
||||
1.0f - MathUtil::Clamp<float>(xfmem.viewport.farZ, 0.0f, 16777215.0f) / 16777216.0f,
|
||||
1.0f -
|
||||
MathUtil::Clamp<float>(xfmem.viewport.farZ - MathUtil::Clamp<float>(xfmem.viewport.zRange,
|
||||
0.0f, 16777216.0f),
|
||||
0.0f, 16777215.0f) /
|
||||
16777216.0f);
|
||||
D3D11_VIEWPORT vp = CD3D11_VIEWPORT(X, Y, Wd, Ht, D3D11_MIN_DEPTH, 16777215.0f / 16777216.0f);
|
||||
D3D::context->RSSetViewports(1, &vp);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user