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
Christian Schlinkmann edited this page Mar 31, 2016
·
5 revisions
Clipping Planes of the Camera
The near and far planes of the camera are set dynamically according to the scene dimensions. Other frustum planes are derived from the position, orientation and fieldOfView (horizontal) of the active <view> and the aspect ratio of the <xml3d> element.
Frustum Culling
Objects in the scene are culled based on their axis-aligned bounding box. The box is calculated from the positions of the vertices, however a bounding box can also be supplied manually:
The bounding box should be given in object space. This can be useful for large objects with changing mesh data, since the bounding box would be re-calculated each time the mesh changes.
It's also useful for meshes that are deformed by a vertex shader (eg. a shader that extrudes the vertices of a mesh some distance along an axis) because the bounding box that XML3D generates would no longer match the rendered object. This can lead to improper frustum culling and broken mouse interaction.
If Frustum Culling is not desired it can be deactivated globally via the options interface: