Is occlusion culling enabled in threejs by default or there is any setting in threejs where I can enable it ?
Asked
Active
Viewed 2,892 times
1 Answers
4
A form of occlusion culling is enabled by default in three.js.
WebGLRenderer
has a property renderer.sortObjects
, which defaults to true
.
When true
, opaque objects (those having material.transparent
equal to false
) are sorted based on distance from the camera, and the opaque objects closest to the camera are rendered first.
If renderer.sortObjects
is set to false
, then opaque objects are rendered in the order they appear in the scene graph.
In addition, Object3D.renderOrder
can also be used to control the rendering order.
three.js r.75

WestLangley
- 102,557
- 10
- 276
- 276
-
1with custom occlusion culling can I get enhanced performance ?? – kishore Mar 31 '16 at 05:33
-
1In theory you can, but whether such improvement is measurable depends on the nature of your scene. – WestLangley Mar 31 '16 at 06:13