Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

I need to replace one shader include, will I need a complete fork of URP for that?

Discussion in 'Universal Render Pipeline' started by burningmime, Oct 20, 2021.

  1. burningmime

    burningmime

    Joined:
    Jan 25, 2014
    Posts:
    845
    I need to change the file
    com.unity.render-pipelines.universal\ShaderLibrary\Shadows.hlsl
    . This file is included by a ton of other files, including shader graph generated ones. Is the best solution to fork URP completely, or is there a different way to inject it into the package?
     
  2. Matt-Cranktrain

    Matt-Cranktrain

    Joined:
    Sep 10, 2013
    Posts:
    129
    I've made some changes to
    RealtimeLights.hlsl
    and I had to fork URP, by copying the whole
    com.unity.render-pipelines.universal
    to the
    /Packages/
    folder, otherwise Unity undoes any changes made. It's a pain when you upgrade to a new version of Unity which has a newer URP because you've got to do the same thing all over again, but I don't believe there's any other way.
     
    burningmime likes this.
  3. burningmime

    burningmime

    Joined:
    Jan 25, 2014
    Posts:
    845
    Sigh... All right; thanks! Would be cool if Unity offered a way to inject these, especially for Asset Store extensions.