Browse Source

Fix some replacing when injecting bumpFragment.fx

Popov72 5 năm trước cách đây
mục cha
commit
1e59fe95e9
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      src/Materials/Node/Blocks/Fragment/perturbNormalBlock.ts

+ 1 - 0
src/Materials/Node/Blocks/Fragment/perturbNormalBlock.ts

@@ -186,6 +186,7 @@ export class PerturbNormalBlock extends NodeMaterialBlock {
                 { search: /vBumpUV/g, replace: uv.associatedVariableName},
                 { search: /vPositionW/g, replace: worldPosition.associatedVariableName + ".xyz"},
                 { search: /normalW=/g, replace: this.output.associatedVariableName + ".xyz = " },
+                { search: /mat3\(normalMatrix\)\*normalW/g, replace: "mat3(normalMatrix) * " + this.output.associatedVariableName + ".xyz" },
                 { search: /normalW/g, replace: worldNormal.associatedVariableName + ".xyz" },
                 tangentReplaceString
             ]