Search Issue Tracker
Fixed in 7.4.0
Votes
2
Found in [Package]
7.0.0
Issue ID
1190813
Regression
No
[ShaderGraph] Invalid Subscript errors are thrown when connecting a Subgraph with Transform Node using Absolute World Space
How to reproduce:
1. Open the attached "case_1190813_reproProject"
2. Open the "TestShaderGraph" in the Project Window
3. Connect the Transform Node with any of the Unlit Master Node points
4. Disconnect the Transform and Unlit Master Nodes
5. Connect the Subgraph Node with any of The Unlit Master Node points
Expected results: No errors are thrown in both cases
Actual results: Invalid Subscript errors are thrown when connecting a Subgraph with an Unlit Master Node
Reproducible with: 2019.3.0a11, 2019.3.0b9, 2020.1.0a11 (package ver. 7.0.0, 7.1.2)
Not reproducible with: 2018.4.12f1, 2019.2.12f1, 2019.3.0a10 (package ver < 7.0.0)
Additional notes:
1. The issue reproduces only when Transform is set to "from Absolute World". This setting has been introduced in ShaderGraph 7.0.0
2. Full error message:
Shader error in 'Shader Graphs/New Shader Graph': invalid subscript 'AbsoluteWorldSpaceNormal' at line 280 (on d3d11)
Compiling Vertex program with UNITY_PASS_SHADOWCASTER
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1
UNITY_SPECCUBE_BOX_PROJECTION
UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME
UNITY_LIGHTMAP_FULL_HDR
3. The issue reproduces with d3d11, d3d12, Metal
4. The issue does not reproduce with OpenGL 4.5
5. The issue does reproduce only with HDRP, No errors are thrown when using URP with ShaderGraph
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
- Red spots appear when Blending Lighting Scenarios using Adaptive Probe Volumes
- [Windows] About Unity Window needs to be opened twice to adapt to resolution
- NullReferenceException and temporary graph corruption after entering playmode if output node connection was changed
- Sprite Renderer with Animation does not reflect Sprite changes in the Scene when switching Mask Interaction
- Error "NullReferenceException: Object reference not set to an instance of an object" is present when loading 3D text mesh in Player from an asset bundle that is built with an older Editor version
creativedrive
Dec 06, 2019 17:07
Same error here, but this time using transform node inSubshader using absolute world position as input.
KevinAnthony
Dec 05, 2019 18:28
I solved this warning by changing the Material's (assigned to the shader graph referenced in the warning) Lightmap Flags value and Shader Keywords value. When I change Lightmap Flags from 2 to 1, and removed the string "_Emission" from the Shader Keywords field, the warning was no longer present.
Due to time constraints, I have not attempted to recreate the issue (or to reduce the issue to a single property).