File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -948,19 +948,15 @@ class BatchedMesh extends Mesh {
948948
949949 if ( visibility [ i ] ) {
950950
951+ // get the bounds in world space
951952 this . getMatrixAt ( i , _matrix ) ;
952953 this . getBoundingSphereAt ( i , _sphere ) . applyMatrix4 ( _matrix ) ;
953954
954955 // determine whether the batched geometry is within the frustum
955956 let culled = false ;
956957 if ( perObjectFrustumCulled ) {
957958
958- // get the bounds in camera space
959- this . getMatrixAt ( i , _matrix ) ;
960-
961- // get the bounds
962- this . getBoundingBoxAt ( i , _box ) . applyMatrix4 ( _matrix ) ;
963- culled = ! _frustum . intersectsBox ( _box ) || ! _frustum . intersectsSphere ( _sphere ) ;
959+ culled = ! _frustum . intersectsSphere ( _sphere ) ;
964960
965961 }
966962
@@ -1001,13 +997,10 @@ class BatchedMesh extends Mesh {
1001997 let culled = false ;
1002998 if ( perObjectFrustumCulled ) {
1003999
1004- // get the bounds in camera space
1000+ // get the bounds in world space
10051001 this . getMatrixAt ( i , _matrix ) ;
1006-
1007- // get the bounds
1008- this . getBoundingBoxAt ( i , _box ) . applyMatrix4 ( _matrix ) ;
10091002 this . getBoundingSphereAt ( i , _sphere ) . applyMatrix4 ( _matrix ) ;
1010- culled = ! _frustum . intersectsBox ( _box ) || ! _frustum . intersectsSphere ( _sphere ) ;
1003+ culled = ! _frustum . intersectsSphere ( _sphere ) ;
10111004
10121005 }
10131006
You can’t perform that action at this time.
0 commit comments