mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
VideoCommon: Implement depth range equation in vertex shader.
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user