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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Add comment