Symptoms:
- I cannot find built-in shaders to modify
- I want to know how to override built-in shaders
Cause:
This issue occurs because Unity hides built-in shaders if you use the Built-In Render Pipeline. In Universal Render Pipeline (URP) or High Definition Render Pipeline (HDRP), you can find the shaders but Unity automatically rolls back any changes for packages in the Library folder.
Resolution:
Although there is no perfect way to override built-in shaders, there are two options:
- If you use URP or HDRP, move the render pipeline package from “Library/PackageCache/” to the “Packages/” directory in your project folder. For more information, please see the article, ‘How can I modify built-in packages?’.
- Download the built-in shaders and customize them using different names.
For the Built-In Render Pipeline, you can only use the second option to modify built-in shaders. Unity provides built-in shaders for every Editor version. The shaders can be found at the link below.
Important: If you use the first option, you can simply modify the package directly. However, you must manually modify it every time you upgrade the URP/HDRP package. If you use the second option, you can keep your original source (shaders) but you must switch the GameObject’s material to the new material using a new shader. |