Procházet zdrojové kódy

Fix some replacing when injecting bumpFragment.fx

Popov72 před 5 roky
rodič
revize
1e59fe95e9

+ 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
             ]