Cast shadow through alpha masked mesh & customDepthMaterial

I am trying to cast shadows through a plane with an alpha mask with the shadow catching the alpha shape.

Based on the sample of the simple cloth simulation https://threejs.org/examples/webgl_animation_cloth.html and other solutions to the same problem here, I’ve done this fiddle: https://jsfiddle.net/truji7/gj7az9eo/69/

But the cast shadow is still the whole solid mesh’s plane. I must be missing something. Any ideas?

1 Like

Got the solution somewhere else, but for the case it’s useful to anyone: I am using a PointLight and PointLight needs a MeshDistanceMaterial as the customDistanceMaterial (rather than a MeshDepthMaterial)

2 Likes