From 62c49ae51313ff8e3dd07918c72ab14ae427fa03 Mon Sep 17 00:00:00 2001 From: 0b5vr <0b5vr@0b5vr.com> Date: Fri, 30 Aug 2024 17:55:46 +0900 Subject: [PATCH] fix: Fix MToonNodeMaterial for r168 `normalMap` is no longer a node element, we use this as an individual node instead This should work also in r167 See: https://github.com/mrdoob/three.js/pull/29187 --- .../three-vrm-materials-mtoon/src/nodes/MToonNodeMaterial.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/three-vrm-materials-mtoon/src/nodes/MToonNodeMaterial.ts b/packages/three-vrm-materials-mtoon/src/nodes/MToonNodeMaterial.ts index a6e6a35d3..eefceba7a 100644 --- a/packages/three-vrm-materials-mtoon/src/nodes/MToonNodeMaterial.ts +++ b/packages/three-vrm-materials-mtoon/src/nodes/MToonNodeMaterial.ts @@ -262,7 +262,7 @@ export class MToonNodeMaterial extends THREE.NodeMaterial { if (this.normalMap && this.normalMap.isTexture === true) { const map = refNormalMap.context({ getUV: () => this._animatedUVNode }); - this.normalNode = map.normalMap(refNormalScale); + this.normalNode = THREE.normalMap(map, refNormalScale); } if (this.isOutline) {