Search Issue Tracker
Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.
Postponed
Votes
0
Found in [Package]
11.0.0
Issue ID
1298711
Regression
No
[URP][ShaderGraph] NaN is returned when using the RoundedRectangle node
How to reproduce:
1. Open the user's attached project "SGVRBugs.zip"
2. Load the Scene "Scene"
3. Make sure the Scene window is opened in the Editor
4. In the Project window select "pfc_2D-UI-Image.mat"
5. In the Inspector window change the "UpperRoundness" and "LowerRoundness" values to 0
Expected result: The Scene's images have the appearance of the original image files
Actual result: The Scene's images do not look like the original image files and instead look jagged/pixelated
Reproducible with: 10.2.2 (2020.2.3f1), 11.0.0 (2021.1.0b4, 2021.2.0a3)
Could not test with: 2018.4.31f, 2019.4.19f1 (could not downgrade without any issues, missing packages/JSON parse errors in Shader Graph)
Notes:
- The issue is most likely due to the divide by radius (divide by property that can reach 0)
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
- GPU utilization increases by 20% on Meta Quest headsets when Render Graph is enabled on 6000.0.16f1 and higher
- Value on Slider (Int) control in UI Builder displays as default when saving UI Document
- Color mismatch in UI Builders Library panel when the Editors theme is set to Light Mode
- [Android ] "AndroidJNI.ToBooleanArray" returns a random non-zero value instead of "IntPtr.Zero" when the method argument is null
- Non-HDR color picker opens when selecting material color with HDR enabled
Resolution Note:
There's no NAN issue with the RoundedRectangle node - the artifacts you're seeing are a result of the math. We plan to re-work this node to make it work more intuitively soon.
Details and workarounds for the two issues:
1. The jaggies are effectively the jaggies of the quad itself. When the radius is 0 then the quad renders without the anti-aliasing of the RoundedRectangle node. To work around this the user can currently use a very small radius.
2. For the line in the middle, this is caused by the non-smooth screen space derivative used for anti-aliasing caused by the user having a piece-wise radius function. They can work around this by having 2 rounded rectangle nodes and then picking between them. Effectively moving the selection of the upper/lower radius from before the node to after.