Forráskód Böngészése

Merge pull request #9599 from Popov72/fix-nme-textureblock-undefined-var

Fix wrong variable shader name for the nme texture block
David Catuhe 4 éve
szülő
commit
47e2ed892b
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      src/Materials/Node/Blocks/Dual/textureBlock.ts

+ 1 - 1
src/Materials/Node/Blocks/Dual/textureBlock.ts

@@ -350,7 +350,7 @@ export class TextureBlock extends NodeMaterialBlock {
     protected _buildBlock(state: NodeMaterialBuildState) {
         super._buildBlock(state);
 
-        if (state.target === NodeMaterialBlockTargets.Vertex || this._fragmentOnly) {
+        if (state.target === NodeMaterialBlockTargets.Vertex || this._fragmentOnly || (state.target === NodeMaterialBlockTargets.Fragment && this._tempTextureRead === undefined)) {
             this._tempTextureRead = state._getFreeVariableName("tempTextureRead");
         }