MeshDepthMaterial morph targets
Hi guys
I am rendering the scene to a depth buffer using the override material method. From what I can see in the source code, the depth material does not allow for morphing or skinning. Is something that could be added?
Alternatively, to successfully render an animated scene, would I need to use the depth plugin? (I've had a quick attempt at using it, but was having quite a few issues setting it up and would rather use the override material method if possible. )
From what I can see in the source code, the depth material does not allow for morphing or skinning.
It does, that's how shadow maps work:
https://github.com/mrdoob/three.js/blob/master/src/extras/renderers/plugins/ShadowMapPlugin.js#L22
Alternatively, to successfully render an animated scene, would I need to use the depth plugin?
That's the main idea behind depth plugin, to simplify management of depth materials.
Hmm perhaps I'm doing something wrong then. When I add a depth filter to my scene it works well except when there are morphs. It seems to only draw the morph in its default state, unanimated:

I create the depth material as such:
this.depthMat = new THREE.MeshDepthMaterial( { morphTargets: true, skinning: true } );
...
Then render the scene as such:
//Render the depth
if ( this.depthTarget )
{
// Render depth into texture
this.scene.overrideMaterial = this.depthMat;
this.renderer.render( this.scene, this.camera, this.depthTarget, true );
}
//Render post processes
this.scene.overrideMaterial = null;
this.composer.render(0.02);