- Home /
Unlit/Transparent shader that casts shadows?
Hello,
I am building a mobile game, and have some 2D trees I want to put in the scene and have them cast shadows.
The solution I thought of is to have a Quad, and assign the tree as a texture to it.
Is there a shader that would be Unlit/Transparent and have it cast a shadow as well?
Is the solution I thought of any good?
Any help is appreciated!
Answer by FortisVenaliter · Aug 09, 2016 at 05:16 PM
Well, if it's unlit, then it won't use lighting... but if you want it to cast shadows, it needs to interact with the lighting. So, no, as far as I know, there's no shader that will do both.
What you can do instead, would be to render twice. Once with an unlit shader, and once with a transparent standard shader set up in the meshrenderer to do shadows only.
Your answer
Follow this Question
Related Questions
iOS shader scale issue 2 Answers
Creating a Masking Object with Variable Pass Through 0 Answers
Cutting hole in water plane using stencil buffer.Help making it visible from both sides. 0 Answers
Why CYAN is default object color (with default materials & shaders) 0 Answers
How to not have custom node variables be global across all material instances 0 Answers