Search Issue Tracker
Won't Fix
Won't Fix in 2023.3.X
Votes
0
Found in
2021.3.6f1
2022.1.9f1
2022.2.0b2
2023.1.0a6
2023.2.0a1
2023.3.0a3
Issue ID
UUM-12516
Regression
No
[BiRP SG] Can't build due to unclear shader compilation errors and warnings when Built-In Target is used in Shader Graph
How to reproduce:
- Open the user’s attached project “SGBugs.zip”
- Build the project
- Observe the Console window
Expected results: Project successfully builds
Actual results: Project fails to build and errors with warnings occur
Reproducible with: 12.1.7 (2021.3.6f1), 13.1.8 (2022.1.9f1), 14.0.3 (2022.2.0b2), 15.0.0 (2023.1.0a6)
Could not test with: 10.10.0 (2020.3.38f1) (“Cannot find the code for this Target, a package may be missing”)
Reproducible on: Windows 10
Notes:
- Removing the include shouldn't be necessary since that "guards" against multiple imports with an ifdef anyways, and without it types/autocomplete don't work properly anymore when working on the cginc file
- Can successfully build and run after commenting out the 19th line in “PBRHelpers.cginc” or removing the Built-in target from "MyShaderGraph"
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
Resolution Note:
You are including a URP specific file and then compiling with BiRP which is not supported. The include guards do not work because they are separate files. You must conditionally remove the include you want based upon the active target. One example would be:
#ifndef BUILTIN_TARGET_API
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#endif
Resolution Note (2023.3.X):
You are including a URP specific file and then compiling with BiRP which is not supported. The include guards do not work because they are separate files. You must conditionally remove the include you want based upon the active target. One example would be:
#ifndef BUILTIN_TARGET_API
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#endif