What is the best way to receive and cast shadows on ShaderMaterial

Hello, good afternoon.

What’s the best approach to cast and receive shadow on different meshes with the same geometry that has a ShaderMaterial?

Thanks in advance