mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 01:03:41 +01:00
Remove a baffling depth offset I don't quite get
This commit is contained in:
1 parent
241f8e75bc
commit
99e6fd62f7
2 files changed
+2
-5
No files matched your search
@@ -254,9 +254,7 @@ void BaseUpdateUniforms(UB_VS_FS_Base *ub, uint64_t dirtyUniforms, bool flipView
|
||||
float halfActualZRange = gstate_c.vpDepthScale != 0.0f ? vpZScale / gstate_c.vpDepthScale : 0.0f;
|
||||
float minz = -((gstate_c.vpZOffset * halfActualZRange) - vpZCenter) - halfActualZRange;
|
||||
float viewZScale = halfActualZRange * 2.0f;
|
||||
// Account for the half pixel offset.
|
||||
float halfDepthPixel = (DepthSliceFactor(gstate_c.UseFlags()) / 256.0f) * 0.5f;
|
||||
float viewZCenter = minz + halfDepthPixel;
|
||||
float viewZCenter = minz;
|
||||
|
||||
ub->depthRange[0] = viewZScale;
|
||||
ub->depthRange[1] = viewZCenter;
|
||||
|
||||
@@ -465,8 +465,7 @@ void ShaderManagerDX9::VSUpdateUniforms(u64 dirtyUniforms) {
|
||||
float halfActualZRange = gstate_c.vpDepthScale != 0.0f ? vpZScale / gstate_c.vpDepthScale : 0.0f;
|
||||
float minz = -((gstate_c.vpZOffset * halfActualZRange) - vpZCenter) - halfActualZRange;
|
||||
float viewZScale = halfActualZRange * 2.0f;
|
||||
// Account for the half pixel offset.
|
||||
float viewZCenter = minz + (DepthSliceFactor(gstate_c.UseFlags()) / 256.0f) * 0.5f;
|
||||
float viewZCenter = minz;
|
||||
float reverseScale = 2.0f * (1.0f / gstate_c.vpDepthScale);
|
||||
float reverseTranslate = gstate_c.vpZOffset * 0.5f + 0.5f;
|
||||
|
||||
|
||||
Reference in new issue
Block a user