Impossible to overwrite terrain grass shader in URP

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!

1 Like

pump

Having the same issue! Dev team is probably not going to fix this, does anybody know a good grass replacement that works in URP and has similar/better performance than Terrain grass? And runs on the Quest? (GPU instancing is broken apparently)

i browse the internet for exactly the same problem… I need to know how to replace the default terrain grass shader in URP 10.2.2… seems like i am not the only one having this problem

Same here.
I need to use a custom shader for terrain detail meshes in URP but I can’t find a way to do this.

You still do not understand that unity *RP teams don’t want to allow you to change anything?

2019.2: Overriding shaders of Terrain-Grass page-2#post-6863873