|
@@ -190,6 +190,10 @@ export class OutlineRenderer implements ISceneComponent {
|
|
|
this._effect.setMatrices("mBones", renderingMesh.skeleton.getTransformMatrices(renderingMesh));
|
|
|
}
|
|
|
|
|
|
+ if (renderingMesh.morphTargetManager && renderingMesh.morphTargetManager.isUsingTextureForTargets) {
|
|
|
+ renderingMesh.morphTargetManager._bind(this._effect);
|
|
|
+ }
|
|
|
+
|
|
|
// Morph targets
|
|
|
MaterialHelper.BindMorphTargetParameters(renderingMesh, this._effect);
|
|
|
|
|
@@ -267,6 +271,10 @@ export class OutlineRenderer implements ISceneComponent {
|
|
|
defines.push("#define MORPHTARGETS");
|
|
|
defines.push("#define NUM_MORPH_INFLUENCERS " + numMorphInfluencers);
|
|
|
|
|
|
+ if (morphTargetManager.isUsingTextureForTargets) {
|
|
|
+ defines.push("#define MORPHTARGETS_TEXTURE");
|
|
|
+ };
|
|
|
+
|
|
|
MaterialHelper.PrepareAttributesForMorphTargetsInfluencers(attribs, mesh, numMorphInfluencers);
|
|
|
}
|
|
|
}
|
|
@@ -286,8 +294,9 @@ export class OutlineRenderer implements ISceneComponent {
|
|
|
this._cachedDefines = join;
|
|
|
this._effect = this.scene.getEngine().createEffect("outline",
|
|
|
attribs,
|
|
|
- ["world", "mBones", "viewProjection", "diffuseMatrix", "offset", "color", "logarithmicDepthConstant", "morphTargetInfluences"],
|
|
|
- ["diffuseSampler"], join,
|
|
|
+ ["world", "mBones", "viewProjection", "diffuseMatrix", "offset", "color", "logarithmicDepthConstant",
|
|
|
+ "morphTargetInfluences", "morphTargetTextureInfo"],
|
|
|
+ ["diffuseSampler", "morphTargets"], join,
|
|
|
undefined, undefined, undefined,
|
|
|
{ maxSimultaneousMorphTargets: numMorphInfluencers });
|
|
|
}
|