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

Package: Shader Graph

-

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

Comments (2)

  1. creativedrive

    Dec 06, 2019 17:07

    Same error here, but this time using transform node inSubshader using absolute world position as input.

  2. 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).

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.