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
- Assets are created in the Package folders when creating assets via custom buttons in the Inspector window or other windows
- “Select” windows are named differently on Windows and macOS
- [Windows] No minimum “Select” window size
- Enabling “Editor Extension Authoring” in UI Builder doesn’t dirty the document and saving with shortcut doesn’t persist the state
- WebRequest.Create() function fails with "URI prefix is not recognized" errors when the project is built for Linux Standalone or Windows Dedicated Server
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.