Search Issue Tracker
Fixed
Fixed in 6000.0.22f1, 7000.0.0a5
Votes
0
Found in
6000.0.0f1
Issue ID
UUM-79389
Regression
No
[VFX] Some hlsl code formatting breaks attribute usage detection
h1. First issue
*Steps to reproduce:*
1. Make sure *Additional Debug info* is enabled in the Visual Effects preferences (see !QsqVNTG5mC.png|thumbnail! )
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
{code:c#}
void Test(inout VFXAttributes attributes, in float value, in float altSize)
{
if (attributes.position.y >= value)
{
attributes.size = altSize;
}
}
{code}
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
{code:c#}
void Test(inout VFXAttributes attributes, in float value, in float altSize)
{
float3 position = attributes.position;
if (position.y >= value)
{
attributes.size = altSize;
}
}
{code}
*Actual results:*
When looking in the inspector, the *position* attribute is not listed at all (see !HtZ6FPWDad.png|thumbnail! )
*Expected results:*
When looking in the inspector, the *position* attribute should be listed in *read* mode
h1. Second issue
Using the same piece of code, when changing the formatting to the following, the function's parameters are not properly identified:
{code:c#}
void Test(inout VFXAttributes attributes
, in float value
, in float altSize
)
{
if (attributes.position.y >= value)
{
attributes.size = altSize;
}
}
{code}
*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.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Animation Clip with Legacy enabled does not play when Time.timeScale is set to 0 despite Update mode set to "Unscaled time"
- Rename is enabled on subfolder empty space - "Can't rename to empty name" warning
- SamplerState Property Missing Anisotropic Filtering
- Visual glitches when using Handles API
- The RGBA color values are inconsistent when comparing two identical colors set in the Inspector
Add comment