- Home /
Custom Terrain Details Shader,Custom Detail Shader In 2019.2
https://assetstore.unity.com/packages/vfx/shaders/soft-grass-shader-63096
I dislike the default Unity Details shader for Terrain so I usually download this one of the Asset Store, however it doesn't seem to be working with Unity's new terrain system. I've tried any fix I can find but to no avail. I've renamed it to match Unity's default shader and I've downloaded the built in Unity shaders from the archives page. I just want to add a transparency gradient to grass so it's not as harsh. How can I find, edit, or override Unity's default details shader?
Answer by Wappenull · Apr 13, 2020 at 06:20 PM
https://answers.unity.com/questions/1150302/how-can-i-overwrite-the-built-in-grass-shader.html
(Edit2021) Note that this answer is based on default graphics pipeline. Not URP/LWRP/HDRP. Refer to another answer for different pipeline.
Confirmed still working on Unity 2019.
Override "Hidden/TerrainEngine/Details/BillboardWavingDoublePass" shader by having your own version of shader in Assets folder. (Download from shader archive) Name inside shader file must matched. Filename can be any.
When switching back to editor, grass/detail will still not change. You will have to do this trick mentioned in the link. Paint more detail, then Ctrl+Z. Once.
Detail shader will now switched to your own version.
There are 3 reference of detail shader that terrain might use based on your grass setting. Try different one if it does not changed.
Dependency "Details0" = "Hidden/TerrainEngine/Details/Vertexlit"
Dependency "Details1" = "Hidden/TerrainEngine/Details/WavingDoublePass"
Dependency "Details2" = "Hidden/TerrainEngine/Details/BillboardWavingDoublePass"
Answer by Edwige · Feb 22, 2021 at 01:22 PM
After 2019.4, it is not working anymore on URP, I had to use the resources asset of URP to make it work: https://forum.unity.com/threads/2019-2-overriding-shaders-of-terrain-grass.725294/page-2#post-6863873 Hope it helps :)
Your answer
Follow this Question
Related Questions
Detail brush not rendering correctly in game 1 Answer
Hide Grass Details 1 Answer
How Do I Fix My Grass? 2 Answers
Terrain detail transparancy does not seem to work 2 Answers
Terrain Grass Detail Texture Atlas 0 Answers