- Home /
Unity 2D Shader (or mask) to Render Over Sprites of a Certain Layer
I'm trying to do a simple shadow effect (without real lighting) in 2d. I can achieve the effect of having a shadow follow the rotation and position of the objects I want to cast shadow from. However, I would like to now draw the shadow over certain layers (where there is no direct ground), or better put, I would only like to draw the shadow on "ground" layer. Effectively I want to mask everything outside the ground layer. I have only achieved this by using a standard sprite mask, manually placing it, and setting parent to null at start, however, it would require me to create a massive amount of these so I think a shader or better masking technique would make much more sense. Any help is most appreciated.
Your answer
Follow this Question
Related Questions
Select 2D Object By Mouse ? 4 Answers
How to implement "layers" to a 2d tower defense game (c#)? 1 Answer
2D layer grouping 0 Answers
Want opaque sprite over lens flare 1 Answer
Making Sprites Darker / Shadowed? 1 Answer