Search Issue Tracker
In Progress
Fixed in 6000.0.22f1
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
- Spot Light with 'Box' Shape stops working when it collides with Mesh
- Accepting Asset Store EULA endless loop in Package Manager window
- “InvalidOperationException: Sequence contains no matching element“ error when reenabling a custom Debug Draw Mode
- Prefab that contains a layout group is marked as changed by the Editor when opened
- Emission animation does not appear when the "Emission Map" parameter is set to black in a Lit material
Add comment