Renamed DEPTHPARAMS to PIXELCENTERCORRECTION

This shader constant was previously used for depth remapping in D3D and for pixel center correction. Now it only serves one purpose and the new name makes it clear.
This commit is contained in:
Yuriy O'Donnell
2014-10-25 02:59:02 +02:00
parent 1fe3d07cbd
commit a886d8a8ee
4 changed files with 6 additions and 8 deletions

View File

@ -359,8 +359,6 @@ void VertexShaderManager::SetConstants()
if (bViewportChanged)
{
bViewportChanged = false;
constants.depthparams[0] = xfmem.viewport.farZ / 16777216.0f;
constants.depthparams[1] = xfmem.viewport.zRange / 16777216.0f;
// The console GPU places the pixel center at 7/12 unless antialiasing
// is enabled, while D3D and OpenGL place it at 0.5. See the comment
@ -370,8 +368,8 @@ void VertexShaderManager::SetConstants()
const float pixel_center_correction = 7.0f / 12.0f - 0.5f;
const float pixel_size_x = 2.f / Renderer::EFBToScaledXf(2.f * xfmem.viewport.wd);
const float pixel_size_y = 2.f / Renderer::EFBToScaledXf(2.f * xfmem.viewport.ht);
constants.depthparams[2] = pixel_center_correction * pixel_size_x;
constants.depthparams[3] = pixel_center_correction * pixel_size_y;
constants.pixelcentercorrection[0] = pixel_center_correction * pixel_size_x;
constants.pixelcentercorrection[1] = pixel_center_correction * pixel_size_y;
dirty = true;
// This is so implementation-dependent that we can't have it here.
g_renderer->SetViewport();