You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
outputs 0x + 0y + 0.000999z - 0.999999 = 0 for the far plane, i.e. z=1000, when in fact the plane should be z=-1000.
I think this is because Plane::from_vector4 uses the vector's fourth component as D, but the way from_matrix4 uses it, it should be -D. For example, the left clipping plane should have the equation v . (row(3) + row(0)) = 0 (taking the rows from the projection matrix), but since planes are represented with equations of the form A_x + B_y + C*z - D = 0, the D is negated.
I'm not sure whether Plane::from_vector4 is doing what's intended, but either it needs to negate D, or Frustum::from_matrix4 needs to be fixed somehow.
The text was updated successfully, but these errors were encountered:
For example,
outputs
0x + 0y + 0.000999z - 0.999999 = 0
for the far plane, i.e. z=1000, when in fact the plane should be z=-1000.I think this is because Plane::from_vector4 uses the vector's fourth component as D, but the way from_matrix4 uses it, it should be -D. For example, the left clipping plane should have the equation v . (row(3) + row(0)) = 0 (taking the rows from the projection matrix), but since planes are represented with equations of the form A_x + B_y + C*z - D = 0, the D is negated.
I'm not sure whether Plane::from_vector4 is doing what's intended, but either it needs to negate D, or Frustum::from_matrix4 needs to be fixed somehow.
The text was updated successfully, but these errors were encountered: