Search Issue Tracker
Fixed in 13.1.3
Votes
0
Found in [Package]
13.1.1
Issue ID
1382007
Regression
No
Decal Shader Graph Throws an "Undeclared identifier" error when using a Custom Function node with a file
Reproduction steps:
1. Open the attached project "Test_decal.zip"
2. Select "Assets/Decalque" Shader Graph
Expected result: No errors in Console
Actual result: Console throws an error "Shader error in 'Shader Graphs/Decalque': undeclared identifier 'Test_float' at line 217"
Reproducible with: 12.1.2 (2021.2.5f1), 13.1.1 (2022.1.0a16)
Not reproducible with: 13.1.3 (2022.1.0b1)
Couldn't test with: 7.7.1 (2019.4.33f1), 10.7.0 (2020.3.23f1), 11.0.0 (2021.2.0a2) (Decal Shader Graph not available)
Note:
- doesn't reproduce with other Shader Graphs with the same setup
-
jtomola
Apr 01, 2022 17:32
I've been running into this issues as well. It's not ideal, but there's a temporary workaround. The problem is that the file with the custom function isn't getting properly included:
- Select the problem shader graph in project window.
- In inspector, select "View generated shader".
- Copy full text to a new .shader file.
- Manually add #include lines pointing to your custom function file.
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
- Audio Mixer does not change volume when lowering volume on an Audio Mixer loaded from AssetBundles
- Error “Value cannot be null. Parameter name: key UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)” thrown and Addressables build fails when "Include in Build" is disabled and using Addressables For Android package
- “error CS0433: The type 'CodeBinaryOperatorType' exists in both 'System.CodeDom and 'System" compilation errors are thrown when opening a specific project
- Metal Vertex Shader warning is being thrown when creating a VR Template Project
- Asset database warning is thrown when declaring font variable in the USS text file
Resolution Note (fix version 13.1.3):
Fixed in 13.1.3 package version available in 2022.1.0b1 and above