Search Issue Tracker
By Design
Votes
0
Found in
2022.3.57f1
6000.0.36f1
6000.1.0b3
6000.2.0a1
Issue ID
UUM-96047
Regression
No
Shader errors are thrown when including Input.hlsl in the custom function
Reproduction steps:
1. Open the attached “ShaderGraphCustomFunctionBug.zip” project
2. Open the “Assets/MyShaderGraph.shadergraph” shader graph and observe the MySubgraph node
3. Open the “Assets/MyInclude.cginc” file
4. Uncomment the 5 line
5. Save the file (CTRL+S)
6. Reimport the “Assets/MyInclude.cginc” file (Right-click > Reimport)
7. Observe the MySubgraph node
8. Save the shader (CTRL+S)
9. Observe the Console window
Expected result: No errors are thrown
Actual result: Shader errors are thrown
Reproducible with: 2022.3.57f1, 6000.0.36f1, 6000.1.0b3, 6000.2.0a1
Reproducible on: Windows 11
Not reproducible on: No other environment tested
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
- Console shows Exception: {"error":"not found","detail":["not found"]} after opening Build History window
- [HDRP] Volumetric cloud shadows disappear when there is no directional light shadows
- “Selector” column names in the Search window are lowercase when added
- Install List Project Counter Panel can be right clicked through and Install Context Menu can be opened disabling Project Counter Panel's buttons
- [MacOS] Scene is marked/flickering as dirty (with asterisk) when dragging a Material on a GameObject in Scene view
Resolution Note:
For the final shader and main preview, Input.hlsl is already included. While including this in a custom function node will cause an error, it's limited to the node's preview shader and not the final shader.
To circumvent situations like these, you can use the "SHADERGRAPH_PREVIEW" define to branch accordingly.