mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Improve documentation.
This commit is contained in:
@ -578,7 +578,10 @@ 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, D3D11_MIN_DEPTH, 16777215.0f / 16777216.0f);
|
||||
// We do depth clipping and depth range in the vertex shader instead of relying
|
||||
// on the graphics API. However we still need to ensure depth values don't exceed
|
||||
// the maximum value supported by the console GPU.
|
||||
D3D11_VIEWPORT vp = CD3D11_VIEWPORT(X, Y, Wd, Ht, D3D11_MIN_DEPTH, GX_MAX_DEPTH);
|
||||
D3D::context->RSSetViewports(1, &vp);
|
||||
}
|
||||
|
||||
|
@ -482,8 +482,10 @@ void Renderer::SetViewport()
|
||||
width = (x + width <= GetTargetWidth()) ? width : (GetTargetWidth() - x);
|
||||
height = (y + height <= GetTargetHeight()) ? height : (GetTargetHeight() - y);
|
||||
|
||||
D3D12_VIEWPORT vp = {x, y, width, height, D3D12_MIN_DEPTH, 16777215.0f / 16777216.0f};
|
||||
|
||||
// We do depth clipping and depth range in the vertex shader instead of relying
|
||||
// on the graphics API. However we still need to ensure depth values don't exceed
|
||||
// the maximum value supported by the console GPU.
|
||||
D3D12_VIEWPORT vp = {x, y, width, height, D3D12_MIN_DEPTH, GX_MAX_DEPTH};
|
||||
D3D::current_command_list->RSSetViewports(1, &vp);
|
||||
}
|
||||
|
||||
|
@ -1159,8 +1159,12 @@ void Renderer::SetViewport()
|
||||
glViewport(iceilf(X), iceilf(Y), iceilf(Width), iceilf(Height));
|
||||
}
|
||||
|
||||
// Set the reversed depth range. If we do depth clipping and depth range in the
|
||||
// vertex shader we only need to ensure depth values don't exceed the maximum
|
||||
// value supported by the console GPU. If not, we simply clamp the near/far values
|
||||
// themselves to the maximum value as done above.
|
||||
if (g_ActiveConfig.backend_info.bSupportsDepthClamp)
|
||||
glDepthRangef(16777215.0f / 16777216.0f, 0.0f);
|
||||
glDepthRangef(GX_MAX_DEPTH, 0.0f);
|
||||
else
|
||||
glDepthRangef(GLFar, GLNear);
|
||||
}
|
||||
|
Reference in New Issue
Block a user