Search Issue Tracker
By Design
By Design in 6000.4.X
Votes
0
Found in
6000.0.60f1
6000.2.6f1
6000.3.0b5
6000.4.0a3
Issue ID
UUM-121873
Regression
No
Sampling a texture using an HLSL file throws shader errors and the code does not compile
Steps to reproduce:
- Open the attached package
- Open the New VFX.vfx
- Open TexCodeEditor and TexShaderFile and notice that the code is identical
- Plug TexShaderFile into {}Set Color block{}, then check the Scene view and console
Actual results: Code does not compile when it comes from shader file
Expected results: Code does compile when it comes from shader file
Reproducible with versions: 6000.0.47f1, 6000.0.60f1, 6000.2.8f1, 6000.4.0a3
Not reproducible with versions:
Can’t test with versions:
Tested on (OS): macOS
{}Notes:{}{}{}
Shader errors:
- Shader error in '': redefinition of 'VFXSampler2D' at kernel CSMain at Assets/Tex.hlsl(1) (on metal)
- .compute: Kernel at index (0) is invalid
I bumped into crash several times when editing values (inconsistent):
- VisualEffectAssetUtility::SetValueSheet(PPtr<VisualEffectAsset> const&, VFXExpressionValuesSheetInternal const&, ScriptingExceptionPtr) + 163
VisualEffectAssetUtility_CUSTOM_SetValueSheet(void, VFXExpressionValuesSheetInternal__ const&) + 139
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture Import Warnings are obscured by other Terrain Layer options in the Inspector
- Active Targets section text in Graph Inspector is truncated despite available space
- Burst Inspector middle divider is jittering when resized with the Burst Inspector window docked
- Shader Graph Node information is briefly displayed in Graph Inspector when clicking on Category in the Blackboard
- JsonConvert conversion fails trying to call GetCallbackMethodsForType when [OnDeserialized] is used in a class
Resolution Note:
The struct VFXSampler2D should not be redeclared in the custom HLSL. It's already accessible without explicit declaration. The fact that it does not fail with embeded text editor is because, this path only considers the body of the HLSL function so not considering the struct redeclaration.
Resolution Note (6000.4.X):
The struct VFXSampler2D should not be redeclared in the custom HLSL. It's already accessible without explicit declaration. The fact that it does not fail with embeded text editor is because, this path only considers the body of the HLSL function so not considering the struct redeclaration.