- Home /
Foliage shader advice/Soft Edge Unlit shader help
Hi there fellow devs.
I am stuck at this problem of mine for a quite a long time now, so even though I am used to solve my issues myself (as that's the most rewarding way), I decided to ask for a help around here. Maybe someone elses experience will be helpful. Please note that I have only brief understanding of shaders.
Problem
I have really nice assets for desert foliage, bushes, grass/plants groups, etc. I have been using them in HDRP projects, where the standard Lit shader prodives double-sided rendering, decent alpha-cutoff, all combined with better lighting in HD pipeline, the visuals used to match my expectations. However, many missing features in HDRP (mainly the limited terrain layers number) forced me to move my project back into native pipeline. And here I discovered there is no suitable shader for my foliage assets that would give me good visuals.
So this is what the Standard shader gives me. Of course I have used Cutout option. Visuals I have got have three issues I cant really stand:
No double sided texture rendering
Mesh faces not facing the light source (dir. light in this case) are too dark (almost black)
Edges look weird from bigger distance (see picture ->)
While looking for the alternative, I have tested almost every suitable shader provided by Unity itself, and even some modified shaders from unity's wiki page.
Only this one had solved almost all issues listed above - Soft Edge Unlit
It has nice edges and texture is visible on both sides of mesh faces. Problem is, even this shader lacks some features I really need - It is not casting nor receiving shadows (I suppose that's why it's called "Unlit").
Question
And finally, here comes the question: Is there a way to edit this Soft Edge Unlit shader to work with lighting - to cast and receive shadows? If there is no way, what other shader may be suitable for this purpose? What shaders are you guys using for grass/plants meshes?
Thanks in advance for anyone's time.
Your answer
Follow this Question
Related Questions
Extending the Light Class to select Shadow Colour 0 Answers
Minimap with no shadow? 1 Answer
Lighting and shadows for LineRenderer 3 Answers
2D Shadow Help 0 Answers