What's the fastest way to use stencil shadows in modern three.js?

shadows
#1

There used to be a ShadowVolume. Is there a replacement now? Is there any open-source solution if not in the core three.js?

#2

Are you referring to this example? https://threejs.org/examples/webgl_shadowmesh

Related issue at github:

#3

I’m looking for the modern version of this:

https://cs.calvin.edu/courses/cs/352/files/three.js/mrdoob-three.js-25dddd2/examples/webgl_stencil.html

ShadowMeshes just work with a planar shadow, but I’m looking for volumetric stencil shadows. Note how in the demo above the shadows of the torus on the cube and vice versa.

It used to be called a “ShadowVolume”, but it looks to have been deprecated some versions ago. Looking for the modern equivalent?