Browse Source

colorTexture is optional, account for this (#28417)

Co-authored-by: aardgoose <angus.sawyer@email.com>
aardgoose 2 năm trước cách đây
mục cha
commit
0dee424c03
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  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 ) {
 
 			cacheKey += object._matricesTexture.uuid + ',';
-			cacheKey += object._colorsTexture.uuid + ',';
+
+			if ( object._colorsTexture !== null ) {
+
+				cacheKey += object._colorsTexture.uuid + ',';
+
+			}
 
 		}
 

粤ICP备19079148号