Closed JacobDuaneJohnson closed 10 years ago
Yea, that will happen if the sprite doesn't write depth.
So one option you have is to make the sprite's shader write depth. If it also writes depth into the shadowmap, it'll get a volumetric shadow.
Another option - if you know the sprite is always completely in front of the light shafts - is to force the sprite the render after light shafts. One way to do that is to render it with a different camera. Or trigger its rendering from LightShafts.cs:OnRenderObject(), but that's not very clean.
Great thanks for the tip!
The light shafts seem to render in front of the sprite renderer, causing any sprite based object to always appear behind the shafts even when the sprite is in front.