Copyright © 2026 Unity Technologies
Steps to reproduce:
1. Make sure Additional Debug info is enabled in the Visual Effects preferences (see [Internal link] )
2. Create a new VFX Graph
3. Add a Custom Hlsl block in the Update context
4. Write down the following code in the custom hlsl node
void Test(inout VFXAttributes attributes, in float value, in float altSize) { if (attributes.position.y >= value) { attributes.size = altSize; } }
5. Select the Custom HLSL node
6. Notice in the inspector that the position attribute is not detected
7. With the following code instead, it works as expected
void Test(inout VFXAttributes attributes, in float value, in float altSize) { float3 position = attributes.position; if (position.y >= value) { attributes.size = altSize; } }
Actual results:
When looking in the inspector, the position attribute is not listed at all (see [Internal link] )
Expected results:
When looking in the inspector, the position attribute should be listed in read mode
Using the same piece of code, when changing the formatting to the following, the function's parameters are not properly identified:
void Test(inout VFXAttributes attributes , in float value , in float altSize ) { if (attributes.position.y >= value) { attributes.size = altSize; } }
Actual results:
The Custom HLSL block has many error feedback displayed and the input port are not present.
Expected results:
The two ports are available and no error feedback is displayed
Reproducible with versions:
6000.0.17f1 (but most probably any 2023.2 or later version)
Not reproducible with versions:
Can’t test with versions:
Tested on (OS):
Windows 10
Notes:
In the provided scenario it makes no harm because anyway, position attribute is used by other nodes, but in a more complex scenario it can lead to compilation issue.
Issues you vote on will appear here