Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question How to (completely) remove HDRP?

Discussion in 'High Definition Render Pipeline' started by Qleenie, Sep 22, 2022.

  1. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    522
    Hi,

    I want to have a branch of our project running on URP, but facing (after removing HDRP) VERY long build times due to some compilation of HDRP shader variants, which should not exist anymore; These are HDRP/Lit TransparentBackface and HDRP/Lit Forward.

    , so I started migrating with the following steps:
    - installing URP
    - configuring URP as Assets in project settings
    - removing HDRP from package manager
    - upgrading materials / shader graphs.

    As I don't need all shaders of the project, I only migrated the needed once to URP. I removed all traces of HDRP shaders from the build scene and from the StreamingAssets directory. Still it takes hours to compile some "ghost" HDRP shaders.

    How to get rid of this?
     
  2. Tomas-Kiniulis

    Tomas-Kiniulis

    Unity Technologies

    Joined:
    Apr 27, 2017
    Posts:
    55
    Hey,

    To understand a bit more where the issue comes from I'm curious, has the project been built before when only HDRP was in use in the project or both HDRP and URP? I would suggest trying to clear out the Library folder with your HDRP package removed and try to build again to see if that helps.

    If that does not help, to be completely sure HDRP package has been removed be sure to:
    • Check that Project Settings -> Graphics render pipeline asset has URP asset assigned and none of the quality settings have HDRP asset in use
    • Check project Packages -> manifest.json file and check there is certainly no paths that have
      "com.unity.render-pipelines.high-definition" entry
    • Check that Packages folder have no local High Definition Render Pipeline package folder
    With upcoming 2023.1 version of Unity stripping has improved a bit in cases where two pipelines are in use on the same project, which should also address the issues you face performing a build after making a switch to URP with HDRP package removed.
     
    Qleenie and unity_avazquez like this.
  3. Tomas-Kiniulis

    Tomas-Kiniulis

    Unity Technologies

    Joined:
    Apr 27, 2017
    Posts:
    55
    If Library clear does not help, could you share your Temp/shader-stripping and Temp/compute-shader-stripping files after the long build has been performed? The shaders that end up problematic and you are sure you do not need, you could try implementing your own shader preprocessor to skip them: https://docs.unity3d.com/ScriptReference/Build.IPreprocessShaders.html.
     
    unity_avazquez likes this.
  4. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    522
    Thanks,

    I finally managed to remove HDRP completely. I had another package installed (digital human), which had a dependency to HDRP, thus HDRP was still present in the Library folder, not visible in the package manager nor manifest. Now I get proper errors when I reference HDRP stuff, and no more shader compilation of unused HDRP shader ;)
     
    Tomas-Kiniulis likes this.
  5. Tomas-Kiniulis

    Tomas-Kiniulis

    Unity Technologies

    Joined:
    Apr 27, 2017
    Posts:
    55
    Ah I see, that's good to know, glad that worked out!
     
    Qleenie likes this.
unityunity