Browse Source

Fix fresnel computation

David Catuhe 6 năm trước cách đây
mục cha
commit
656b0b90d3
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;
     }