diff --git a/src/r_poly.cpp b/src/r_poly.cpp index dd2df0ee4..0c05a590a 100644 --- a/src/r_poly.cpp +++ b/src/r_poly.cpp @@ -92,10 +92,10 @@ void RenderPolyScene::SetupPerspectiveMatrix() float fovratio = (WidescreenRatio >= 1.3f) ? 1.333333f : ratio; float fovy = (float)(2 * DAngle::ToDegrees(atan(tan(FieldOfView.Radians() / 2) / fovratio)).Degrees); TriMatrix worldToView = + TriMatrix::scale(1.0f, glset.pixelstretch, 1.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::swapYZ() * - TriMatrix::scale(1.0f, 1.0f, glset.pixelstretch) * TriMatrix::translate((float)-ViewPos.X, (float)-ViewPos.Y, (float)-ViewPos.Z); WorldToClip = TriMatrix::perspective(fovy, ratio, 5.0f, 65535.0f) * worldToView; }