David Catuhe 5 年之前
父节点
当前提交
37a3089a2e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Materials/Node/nodeMaterial.ts

+ 1 - 1
src/Materials/Node/nodeMaterial.ts

@@ -882,7 +882,7 @@ export class NodeMaterial extends PushMaterial {
 
 
         if (mustRebind) {
         if (mustRebind) {
             let sharedData = this._sharedData;
             let sharedData = this._sharedData;
-            if (effect && scene.getCachedMaterial() !== this) {
+            if (effect && scene.getCachedEffect() !== effect) {
                 // Bindable blocks
                 // Bindable blocks
                 for (var block of sharedData.bindableBlocks) {
                 for (var block of sharedData.bindableBlocks) {
                     block.bind(effect, this, mesh);
                     block.bind(effect, this, mesh);