MeshDepthMaterial & InstancedBufferGeometry

Thank you for your reply and for the references. I have read through them both in the last few days.

I made some progress on this issue last night. I was applying instancing in the vertex shader too late here. I should have been overriding <begin_vertex> and updating the transformed vec3 earlier, so that the instance position is also reflected in worldPosition. That was preventing the shadow.

I love the examples as a show-case, but as documentation or implementation exemplars, they aren’t great. You have to sift out the extraneous ‘we did this to make it pretty’ details and of course, extending shaders is not Three’s strong suit. Anyway, I’ll try to share some more tutorial-friendly examples once I’ve ironed out my shadow issue.