|
@@ -146,9 +146,18 @@ export class MorphTargetsBlock extends NodeMaterialBlock {
|
|
|
}
|
|
|
|
|
|
public prepareDefines(mesh: AbstractMesh, nodeMaterial: NodeMaterial, defines: NodeMaterialDefines) {
|
|
|
+ if ((<Mesh>mesh).morphTargetManager) {
|
|
|
+ const morphTargetManager = (<Mesh>mesh).morphTargetManager;
|
|
|
+
|
|
|
+ if (morphTargetManager?.isUsingTextureForTargets && morphTargetManager.numInfluencers !== defines["NUM_MORPH_INFLUENCERS"]) {
|
|
|
+ defines.markAsAttributesDirty();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (!defines._areAttributesDirty) {
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
MaterialHelper.PrepareDefinesForMorphTargets(mesh, defines);
|
|
|
}
|
|
|
|