Skip to content

Commit 276f240

Browse files
committed
client: render: fixed calculation errors in R_SetupProjectionMatrix
1 parent 24e29a9 commit 276f240

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/render/gl_rmain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,8 +819,8 @@ void R_SetupProjectionMatrix( float fov_x, float fov_y, matrix4x4 &m, float z_ne
819819
GLdouble xMax, yMax, zFar;
820820

821821
zFar = Q_max( 256.0, RI->view.farClip );
822-
xMax = Z_NEAR * tan( fov_x * M_PI / 360.0 );
823-
yMax = Z_NEAR * tan( fov_y * M_PI / 360.0 );
822+
xMax = z_near * tan( fov_x * M_PI / 360.0 );
823+
yMax = z_near * tan( fov_y * M_PI / 360.0 );
824824

825825
m.CreateProjection( xMax, -xMax, yMax, -yMax, z_near, zFar );
826826
}

0 commit comments

Comments
 (0)