Is it necessary to pass itself when creating material's shadow depth wrapper?

For example I want shadow to use alpha test while the sphere itself use alpha blend.
So I clone the material and change the transparency mode.
But the shadow disappear after creating the shadow depth wrapper.
So when creating a material’s shadow depth wrapper, is it necessary to pass itself as shadow depth wrapper’s base material? If so, how can I implement this?

I’m not sure about this one… I will ping @Evgeni_Popov since he probably knows the shadow system way better than me.

It seems that the effect for the sphere shader is not created for some reason, it cause the shadow is disappeared.

You can do it, but you must inform the system (by setting standalone: true in the options object) that the material you pass is not used anywhere else as a regular material for a mesh, because in that case it must do some additional work:

2 Likes