Browse Source

NodeMaterial: add .customProgramCacheKey() (#24096)

sunag 3 năm trước cách đây
mục cha
commit
bc7a37ceb5
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      examples/jsm/nodes/materials/NodeMaterial.js

+ 6 - 0
examples/jsm/nodes/materials/NodeMaterial.js

@@ -31,6 +31,12 @@ class NodeMaterial extends ShaderMaterial {
 
 	}
 
+	customProgramCacheKey() {
+
+		return this.uuid + '-' + this.version;
+
+	}
+
 	generateMain( builder ) {
 
 		const object = builder.object;