diff --git a/examples/jsm/utils/SceneOptimizer.js b/examples/jsm/utils/SceneOptimizer.js index 14e56c35a78977..84c4854c8ce84f 100644 --- a/examples/jsm/utils/SceneOptimizer.js +++ b/examples/jsm/utils/SceneOptimizer.js @@ -46,6 +46,7 @@ class SceneOptimizer { getMaterialPropertiesHash( material ) { const mapProps = [ + 'map', 'alphaMap', 'aoMap', 'bumpMap', @@ -237,7 +238,15 @@ class SceneOptimizer { 0 ); - const batchedMaterial = new THREE.MeshPhysicalMaterial( group.materialProps ); + const batchedMaterial = new group.materialProps.constructor( group.materialProps ); + + if ( batchedMaterial.color !== undefined ) { + + // Reset color to white, color will be set per instance + batchedMaterial.color.set( 1, 1, 1 ); + + } + const batchedMesh = new THREE.BatchedMesh( maxGeometries, maxVertices,