Started updating the first of many projects today for inclusion in my upcoming reel. Initially I was intending to just re-enable some vertex shader code that didn’t make the cut for the project production release but that led to some camera tweening animation that led to the need for dynamically rendered shadow maps which proved tricky. THREE.js shadow map implementation is really straightforward unless you are transforming mesh vertices at runtime with a vertex shader. In such a scenario the shadow map remains static as it is based on the underlying mesh. Fortunately I chanced upon this blog post by Edan Kwan that highlighted the existence of customDepthMaterial, which, after a fair amount of jiggery-pokery, I managed to get working. Fairly pleased with the result and I think it was worth the extra effort.