Przeglądaj źródła

Fix fresnel computation

David Catuhe 6 lat temu
rodzic
commit
656b0b90d3
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/Materials/Node/Blocks/fresnelBlock.ts

+ 1 - 1
src/Materials/Node/Blocks/fresnelBlock.ts

@@ -91,7 +91,7 @@ export class FresnelBlock extends NodeMaterialBlock {
 
         state._emitFunctionFromInclude("fresnelFunction", comments, {removeIfDef: true});
 
-        state.compilationString += this._declareOutput(this.fresnel, state) + ` = computeFresnelTerm(${this.viewDirection.associatedVariableName}, ${this.worldNormal.associatedVariableName}, ${this.bias.associatedVariableName}, ${this.power.associatedVariableName});\r\n`;
+        state.compilationString += this._declareOutput(this.fresnel, state) + ` = computeFresnelTerm(${this.viewDirection.associatedVariableName}.xyz, ${this.worldNormal.associatedVariableName}.xyz, ${this.bias.associatedVariableName}, ${this.power.associatedVariableName});\r\n`;
 
         return this;
     }