- 編集済み
Unity URP - Receive Shadows from 3D Objects
Sorry to bother for this but I've tried to follow some of the other posts about receiving shadows but to no avail.
I'm trying to receive cast shadows onto the spine animations from 3D Objects in the scene but my spine objects are refusing to receive them.
I've tried to use the URP Sprite shader with "Add Normals" and "Fixed Normals" both enabled, as well as changing the color space between Gamma and Linear but it still doesn't work. One thing I did notice is that the "Receive Shadows" option in the Sprite shader is always grayed out for me.
I was hoping to get a similar effect to that in this video, where the shadows from the surrounding environment interact with the sprites
You have to enable Write to Depth
at the shader.
Your active RenderPipelineAsset
/ RendererAsset
under Quality Settings
also need to allow for receiving shadows, but usually this is not the problem.
It works now! Thank you very much for the help, I didn't realise I was missing such a simple thing D:
There is another thing that I noticed it doesn't work and was curious to figure out why, when I try to change to vertex or pixel lit as the lighting mode, the texture seems to break, but I can't figure out why that is.
Glad to hear that the shadows are working now!
Regarding the Vertex Lit
and Pixel Lit
shader variants: you have to use Lit Universal
when using URP, the other shaders are for the normal forward renderer pipeline. They are incompatible with URP (URP requires different shader passes than the normal pipeline).
Oooh I see, thank you very much for explaining it to me!
You're welcome.