Hello,
I’m looking for a way to make changes to the billboard shader used by Unity’s terrain for rendering detail. However, despite looking into the matter for several days I still haven’t found a feasible way to achieve this.
I found out that there is an asset called UniversalRenderPipelineEditorResources in the URP package which contains fields for which shaders to use.
I went ahead and made a copy of this asset and referenced the shader I want to use, but was faced with a problem. There’s no way to set my copy of this asset to be used by the active Universal Render Pipeline Asset. By taking a look at the UniversalRenderPipelineAsset.cs source code, I noticed it’s impossible to change it. Any changes I make to this file are reverted by Unity.
I read that Unity overrides any built in shaders as long as you name your custom shader with the same name. However, I tried this and the grass on my terrain wasn’t affected by my custom shader. And I don’t see why this would work when there is a direct reference to the shader to be used in the EditorResources asset.
The only way I’ve found around this is not a feasible solution. I can make a copy of the complete URP Package and make my changes there. However, making a copy of this package is bad idea in terms of future URP Package updates and the fact that I would have to sync this whole package over the collab just to share my modified grass shader with my team.
Any help is appreciated. Thanks for reading!