mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Correct clamped depth offset.
Oops, forgot to fix this when I fixed the scale. It's already for a [-1, 1] range, and needs to be corrected for accordingly. Fixes #8425, other depth issues in Phantasy Star Portable 2.
This commit is contained in:
parent
4a337f7fdf
commit
00b57f6a16
2 changed files with 2 additions and 2 deletions
|
@ -260,7 +260,7 @@ static void ConvertProjMatrixToD3D(Matrix4x4 &in, bool invertedX, bool invertedY
|
|||
if (invertedY)
|
||||
yoff = -yoff;
|
||||
|
||||
const Vec3 trans(xoff, yoff, gstate_c.vpZOffset + 0.5f);
|
||||
const Vec3 trans(xoff, yoff, gstate_c.vpZOffset * 0.5f + 0.5f);
|
||||
const Vec3 scale(gstate_c.vpWidthScale, gstate_c.vpHeightScale, gstate_c.vpDepthScale * 0.5f);
|
||||
in.translateAndScale(trans, scale);
|
||||
}
|
||||
|
|
|
@ -378,7 +378,7 @@ static inline void ScaleProjMatrix(Matrix4x4 &in) {
|
|||
// GL upside down is a pain as usual.
|
||||
yOffset = -yOffset;
|
||||
}
|
||||
const Vec3 trans(gstate_c.vpXOffset, yOffset, gstate_c.vpZOffset * 2.0f);
|
||||
const Vec3 trans(gstate_c.vpXOffset, yOffset, gstate_c.vpZOffset);
|
||||
const Vec3 scale(gstate_c.vpWidthScale, gstate_c.vpHeightScale, gstate_c.vpDepthScale);
|
||||
in.translateAndScale(trans, scale);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue