Custom Terrain Details Shader,Custom Detail Shader In 2019.2

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?

2 Answers

2

(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.

  1. 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.
  2. 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.
  3. 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"

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 :slight_smile: