Ver código fonte

colorTexture is optional, account for this (#28417)

Co-authored-by: aardgoose <[email protected]>
aardgoose 1 ano atrás
pai
commit
0dee424c03
1 arquivos alterados com 6 adições e 1 exclusões
  1. 6 1
      examples/jsm/renderers/common/RenderObject.js

+ 6 - 1
examples/jsm/renderers/common/RenderObject.js

@@ -225,7 +225,12 @@ export default class RenderObject {
 		if ( object.isBatchedMesh ) {
 		if ( object.isBatchedMesh ) {
 
 
 			cacheKey += object._matricesTexture.uuid + ',';
 			cacheKey += object._matricesTexture.uuid + ',';
-			cacheKey += object._colorsTexture.uuid + ',';
+
+			if ( object._colorsTexture !== null ) {
+
+				cacheKey += object._colorsTexture.uuid + ',';
+
+			}
 
 
 		}
 		}