Search Issue Tracker

Fixed in 12.0.0

Votes

6

Found in [Package]

2020.2

2020.2.1f1

2021.1

2021.2

Issue ID

1307728

Regression

No

SRP Batcher with HDRP and Universal Shader Graph is not compatible when Scriptable Render Pipeline is set to URP

Package: Shader Graph

-

How to reproduce:
1. Create a new HDRP Project with the HDRP template
2. Install Universal RP package
3. Create a new URP Pipeline Asset (Create->Rendering->URP Asset)
4. Assign the new URP pipeline asset (Edit->Project Settings...->Graphics)
5. Create a new Quality Setting level
6. Assign the URP Pipeline asset to this quality setting
7. Select that quality setting level (at this point the game view will be rendered using URP)
8. Create a new HDRP Lit Shader Graph
9. Double-click on that ShaderGraph to open it
10. In the Graph Inspector, add Universal to the Active Targets and save the Shader Graph
11. In the Project window select that newly created Shader Graph

Expected results: The Shader Graph is SRP Batcher compatible
Actual results: The Shader Graph is not SRP Batcher compatible

Reproducible with: 10.1.0 (2020.2.0b12), 10.3.1 (2020.2.3f1) 11.0.0 (2021.1.0b5) 12.0.0 (2021.2.0a17)
Could not test with: 4.10.0-preview (2018.4.31f1), 7.5.3 (2019.4.19f1), 8.3.1 (2020.1.17f1) because the Active Targets in the Shader Graph was not yet available

Notes:
- The project was created using URP Template and the HDRP package was installed afterward, if you create a project using HDRP Template and install the URP Package afterward the issue will not be reproducible

  1. Resolution Note (fix version 12.0.0):

    Fixed in Unity 2022.1.0a7

  2. Resolution Note (fix version 12.0.0):

    Fixed in Shader Graph 12.1.3 Unity 2021.2.8f1

  3. Resolution Note:

    Fixed in 2021.2.6f1

Comments (4)

  1. goran_okomotive

    Jul 16, 2021 09:40

    We also need this fixed.
    I found a work-around, just delete the HDRP target in the graphs before building a URP build, but this is super un-convenient for a build pipeline workflow and in general.

    Is there maybe a way to open a shadergraph in the editor and to remove targets via script? This would be easy to add to the build-pipeline procedure.

  2. alexvector

    Feb 15, 2021 13:12

    This can be reproduced even when installing URP after HDRP. I was able to reproduce this one using these steps.

    - Create a new HDRP Project with the HDRP template
    - Add Universal RP package
    - Create a new URP Pipeline Asset. (Create->Rendering->Universal Render Pipeline->Pipeline Asset (Forward Renderer)
    - In Project Settings->Graphics, assign the new URP pipeline asset
    - Create a new Quality Setting level
    - Assign the URP Pipeline asset to this quality setting
    - Select that quality setting level (at this point the game view will be rendered using URP)
    - Create a new HDRP Lit Shader Graph
    - Open that graph in the editor
    - In the graph inspector, add Universal to the active targets of that shader
    - Select that shader in the project to see the properties in the inspector.

    Observed: SRP Batcher reports "not compatible" with the message "Not Initialized".
    Expected: SRP Batcher should be compatible

  3. Camarent

    Feb 04, 2021 13:20

    I also confirm that this bug exists in HDRP 11.0.

  4. Camarent

    Feb 01, 2021 11:36

    Hi! I tested the case so it is not correct description of it. Only reason it works when you install HDRP first because it use HDRP asset from Quality settings and not from Graphics tab. So if you create project with hdrp then urp to reproduce this bug you also need to set URP asset in current Quality preset. Compilation is failing only when URP asset is used.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.