Explorar o código

Fix some replacing when injecting bumpFragment.fx

Popov72 %!s(int64=5) %!d(string=hai) anos
pai
achega
1e59fe95e9
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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
             ]