@@ -61,12 +61,12 @@ void Frustum::ConstructOrthographicFrustum( float Left, float Right, float Top,
61
61
m_FrustumCorners[ kFarUpperRight ] = Vector3 (Right, Top, -Back); // Far upper right
62
62
63
63
// Define the bounding planes
64
- m_FrustumPlanes[kNearPlane ] = BoundingPlane ( 0 .0f , 0 .0f , - 1 .0f , -Front );
65
- m_FrustumPlanes[kFarPlane ] = BoundingPlane ( 0 .0f , 0 .0f , 1 .0f , Back );
66
- m_FrustumPlanes[kLeftPlane ] = BoundingPlane ( 1 .0f , 0 .0f , 0 .0f , -Left );
67
- m_FrustumPlanes[kRightPlane ] = BoundingPlane ( -1 .0f , 0 .0f , 0 .0f , Right );
68
- m_FrustumPlanes[kTopPlane ] = BoundingPlane ( 0 .0f , - 1 .0f , 0 .0f , Bottom );
69
- m_FrustumPlanes[kBottomPlane ] = BoundingPlane ( 0 .0f , 1 .0f , 0 .0f , - Top );
64
+ m_FrustumPlanes[kNearPlane ] = BoundingPlane ( 0 .0f , 0 .0f , 1 .0f , -Front );
65
+ m_FrustumPlanes[kFarPlane ] = BoundingPlane ( 0 .0f , 0 .0f , - 1 .0f , Back );
66
+ m_FrustumPlanes[kLeftPlane ] = BoundingPlane ( 1 .0f , 0 .0f , 0 .0f , -Left );
67
+ m_FrustumPlanes[kRightPlane ] = BoundingPlane ( -1 .0f , 0 .0f , 0 .0f , Right );
68
+ m_FrustumPlanes[kBottomPlane ] = BoundingPlane ( 0 .0f , 1 .0f , 0 .0f , - Bottom );
69
+ m_FrustumPlanes[kTopPlane ] = BoundingPlane ( 0 .0f , - 1 .0f , 0 .0f , Top );
70
70
}
71
71
72
72
@@ -82,11 +82,11 @@ Frustum::Frustum( const Matrix4& ProjMat )
82
82
if (ProjMatF[3 ] == 0 .0f && ProjMatF[7 ] == 0 .0f && ProjMatF[11 ] == 0 .0f && ProjMatF[15 ] == 1 .0f )
83
83
{
84
84
// Orthographic
85
- float Left = (-1 .0f - ProjMatF[12 ]) * RcpXX;
86
- float Right = ( 1 .0f - ProjMatF[12 ]) * RcpXX;
87
- float Top = ( 1 .0f - ProjMatF[13 ]) * RcpYY;
85
+ float Left = (-1 .0f - ProjMatF[12 ]) * RcpXX;
86
+ float Right = ( 1 .0f - ProjMatF[12 ]) * RcpXX;
87
+ float Top = ( 1 .0f - ProjMatF[13 ]) * RcpYY;
88
88
float Bottom = (-1 .0f - ProjMatF[13 ]) * RcpYY;
89
- float Front = ( 0 .0f - ProjMatF[14 ]) * RcpZZ;
89
+ float Front = ( 0 .0f - ProjMatF[14 ]) * RcpZZ;
90
90
float Back = ( 1 .0f - ProjMatF[14 ]) * RcpZZ;
91
91
92
92
// Check for reverse Z here. The bounding planes need to point into the frustum.
0 commit comments