ThreeJS disable rendering of faces behind the Camera

前端 未结 2 1859
生来不讨喜
生来不讨喜 2021-01-27 14:26

I am Writing a Panorama Viewer. The Image is Displayed in a Sphere with a variable amount of faces. I want it only to render the faces in the camera direction (

2条回答
  •  别那么骄傲
    2021-01-27 15:17

    This process is called viewing frustum culling and ThreeJS takes care of this.

    ThreeJS also takes care of font and/or backface culling depending on your material settings. Meaning that only the visible side of the faces are rendered.

    Here in the documentation you can find the ThreeJS Frustum.

    And if the frustumCulled property on THREE.Object3D manages frustum culling and is by default set to true.

提交回复
热议问题