mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-07 07:21:01 +00:00
Moved scale back to be after pitch - otherwise the the bullets don't end up where you point
This commit is contained in:
parent
eac9367ace
commit
6be80efa51
1 changed files with 1 additions and 1 deletions
|
@ -92,10 +92,10 @@ void RenderPolyScene::SetupPerspectiveMatrix()
|
||||||
float fovratio = (WidescreenRatio >= 1.3f) ? 1.333333f : ratio;
|
float fovratio = (WidescreenRatio >= 1.3f) ? 1.333333f : ratio;
|
||||||
float fovy = (float)(2 * DAngle::ToDegrees(atan(tan(FieldOfView.Radians() / 2) / fovratio)).Degrees);
|
float fovy = (float)(2 * DAngle::ToDegrees(atan(tan(FieldOfView.Radians() / 2) / fovratio)).Degrees);
|
||||||
TriMatrix worldToView =
|
TriMatrix worldToView =
|
||||||
|
TriMatrix::scale(1.0f, glset.pixelstretch, 1.0f) *
|
||||||
TriMatrix::rotate((float)ViewPitch.Radians(), 1.0f, 0.0f, 0.0f) *
|
TriMatrix::rotate((float)ViewPitch.Radians(), 1.0f, 0.0f, 0.0f) *
|
||||||
TriMatrix::rotate((float)(ViewAngle - 90).Radians(), 0.0f, -1.0f, 0.0f) *
|
TriMatrix::rotate((float)(ViewAngle - 90).Radians(), 0.0f, -1.0f, 0.0f) *
|
||||||
TriMatrix::swapYZ() *
|
TriMatrix::swapYZ() *
|
||||||
TriMatrix::scale(1.0f, 1.0f, glset.pixelstretch) *
|
|
||||||
TriMatrix::translate((float)-ViewPos.X, (float)-ViewPos.Y, (float)-ViewPos.Z);
|
TriMatrix::translate((float)-ViewPos.X, (float)-ViewPos.Y, (float)-ViewPos.Z);
|
||||||
WorldToClip = TriMatrix::perspective(fovy, ratio, 5.0f, 65535.0f) * worldToView;
|
WorldToClip = TriMatrix::perspective(fovy, ratio, 5.0f, 65535.0f) * worldToView;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue