d3d9: Account for half-pixel z offset.

This commit is contained in:
Unknown W. Brackets 2016-01-20 22:53:47 -08:00
parent 0443fbebd0
commit 79792a3c38

View File

@ -488,7 +488,8 @@ void ShaderManagerDX9::VSUpdateUniforms(int dirtyUniforms) {
float halfActualZRange = vpZScale / gstate_c.vpDepthScale;
float minz = -((gstate_c.vpZOffset * halfActualZRange) - vpZCenter) - halfActualZRange;
float viewZScale = halfActualZRange * 2.0f;
float viewZCenter = minz;
// Account for the half pixel offset.
float viewZCenter = minz + (DepthSliceFactor() / 256.0f) * 0.5f;
float viewZInvScale;
if (viewZScale != 0.0) {