-
Bug
-
Resolution: Fixed
-
P3
-
8
This found by Kevin while reviewing the code:
The following code culls geometry outside the front / back clipping plane:
+ if (isPerspective && (bounds.getMinZ() > camera.getFarClip()
+ || bounds.getMaxZ() < camera.getNearClip())) {
+ return 0;
+ }
The idea is right, but it compares the bounds in the local coordinates of the particular node in question with a clip distance that is in eye coordinates. They need to be in the same coordinate system before they can be compared.
The following code culls geometry outside the front / back clipping plane:
+ if (isPerspective && (bounds.getMinZ() > camera.getFarClip()
+ || bounds.getMaxZ() < camera.getNearClip())) {
+ return 0;
+ }
The idea is right, but it compares the bounds in the local coordinates of the particular node in question with a clip distance that is in eye coordinates. They need to be in the same coordinate system before they can be compared.