Casting shadows on an invisible plane.
UPDATE 2022/09/27:
- Now support multiple lightings
- Now support directional, point and spot lights
Unity version: 2019.4.29f1
(It might work on any version of Unity.)
- Only works for Built-in Rendering Pipeline
- Does not work for
Skybox
. change your camera background toSolid Color
.
Set the Cast Shadows
option to Off
of your model that only draw shadows, then attach the TransparentShadow
Material/Shader to it.
Don't forget to enable the Shadow Type
option of the lights.