Skip to content

Commit

Permalink
Merge pull request #13071 from hrydgard/d3d9-proj-fix
Browse files Browse the repository at this point in the history
D3D9: Fix a sign mistake generating the projection matrix.
  • Loading branch information
unknownbrackets authored Jun 28, 2020
2 parents 8ac4efd + 37b57d9 commit ed9df02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GPU/Directx9/ShaderManagerDX9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ static void ConvertProjMatrixToD3D(Matrix4x4 &in, bool invertedX, bool invertedY

float yoff = -1.0f / gstate_c.curRTRenderHeight;
if (invertedY) {
yoff = gstate_c.vpYOffset - yoff;
} else {
yoff = -gstate_c.vpYOffset - yoff;
} else {
yoff = gstate_c.vpYOffset - yoff;
}

const Vec3 trans(xoff, yoff, gstate_c.vpZOffset * 0.5f + 0.5f);
Expand Down

0 comments on commit ed9df02

Please sign in to comment.