Search Issue Tracker
Fixed
Votes
0
Found in
6000.0.40f1
6000.1.0b8
6000.2.0a5
Issue ID
UUM-99710
Regression
No
"type mismatch error" occurs when the currentDirectionWS output of a Sample Water Surface node is connected to a float3 input
How to reproduce:
1. Open the attached “IN-95571_WaterSurface” project
2. Navigate to Assets/WaterSurfaceTesting/OceanSurface.vfx in the Unity Editor
3. Click on “[Ocean Surface] [Simple Burst] Update Particle (Compute Shader)” and observe the Inspector
Expected result: There are no errors in the Inspector
Actual result: There is an error in the Inspector “cannot implicitly convert from 'const float2' to 'float3' at kernal CSMain“
Reproducible with: 6000.0.40f1, 6000.1.0b8, 6000.2.0a5
Could not test with: 2022.3.59f1 (Sample Water Surface node doesn't exist)
Reproducible on: MacOS 15.3.1 (M1 Max)
Not reproducible on: No other Environment tested
Note: The issue arises because {{EvaluateCurrent()}} returns a {{float2}}, but the shader assigns it to a {{float3}}, resulting in a type mismatch. Consequently, an exception occurs when connecting the Multiply (Vector3) node to Set Velocity, as it expects a {{float3}} input. While Multiply (Vector3) correctly outputs a Vector3, the root cause is that it does not receive a Vector3 input initially. To resolve this, the {{float2}} result should be properly converted to a {{float3}} by explicitly adding a z component, which Unity would typically handle by default but is not doing in this case
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
Fixed by another internal issue: UUM-100219: [HDRP][VFX] Wrong current direction output in vfx graph sample water surface node