mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-05 15:48:51 +00:00
VideoCommon: Implement depth range equation in vertex shader.
This commit is contained in:
parent
0015d2e86b
commit
c223bd47b9
3 changed files with 11 additions and 12 deletions
|
@ -386,6 +386,11 @@ void VertexShaderManager::SetConstants()
|
|||
const float pixel_size_y = 2.f / Renderer::EFBToScaledXf(2.f * xfmem.viewport.ht);
|
||||
constants.pixelcentercorrection[0] = pixel_center_correction * pixel_size_x;
|
||||
constants.pixelcentercorrection[1] = pixel_center_correction * pixel_size_y;
|
||||
|
||||
// The depth range is handled in the vertex shader.
|
||||
constants.pixelcentercorrection[2] = (xfmem.viewport.zRange) / 16777216.0f;
|
||||
constants.pixelcentercorrection[3] = (xfmem.viewport.farZ) / 16777216.0f;
|
||||
|
||||
dirty = true;
|
||||
// This is so implementation-dependent that we can't have it here.
|
||||
g_renderer->SetViewport();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue