소스 검색

colorTexture is optional, account for this (#28417)

Co-authored-by: aardgoose <[email protected]>
aardgoose 1 년 전
부모
커밋
0dee424c03
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  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 + ',';
+
+			}
 
 		}