-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fix webgl line NaN handling #11829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix webgl line NaN handling #11829
Conversation
I didn't have a chance to review this. |
And that's OK. You don't have to be responsible for very single merge. Old and new tests pass, the person who is by far more of an expert at WebGL than either of us is happy with it, the code was completely self-contained to their area of expertise, and it had no obvious other problems. |
* Fix webgl line nan handling * Add baseline images
* Fix webgl line nan handling * Add baseline images
* Fix webgl line NaN handling (#11829) * Fix webgl line nan handling * Add baseline images * Support multiple marker types in WebGL scatter (#11840) * Support multiple marker types in WebGL scatter * Update macos/windows baseline images * Changes following review * Add docs about different render order * Remove temporary webgl circle fix (#11849) * Add regression test for updating webgl line (#11884) * Add regression test for updating webgl line (issue #8346) * Update macos and windows baseline images * Unify WebGL markers and rects (#12040) * Unify markers and rects * Baseline images * Consistent code style * WebGL typescript refactor and add quad glyph (#12046) * SingleMarkerGL for rect and quad * MarkerGL inherits from BaseMarkerGL * Better class hierarchy * Test WebGL quad glyph * Separate CircleGL class * Avoid use of any * Remove code duplication * Implement WebGL marker line joins (#12055) * Line joins for markers * Use same antialiasing width for all webgl markers * Correct size hints * Baseline image changes * Marker glyph should support line join test * WebGL support for HBar VBar and HexTile glyphs (#12061) * Add WebGL HBar and VBar glyphs * Add WebGL HexTile glyphs * Visual test changes * Include rotation in should_support_Rect test * Minor WebGL line refactor (#12120) * Fix Wedge and AnnualWedge glyph hitboxes (#12071) * Fix Wedge and AnnualWedge glyph hitboxes * Hitbox tests for Wedge and AnnualWedge glyphs Co-authored-by: Michael Brown <michael@msbrown.net>
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes 8th item of issue #11050.
The previous WebGL solution for NaNs in lines wasn't good enough. NaNs are not suitable for use in WebGL shaders due to their reduced floating-point precision, so the previous solution used a large negative number to represent NaNs. This worked for many use cases but not for
x, y
values near that large negative number or when zooming in by many orders of magnitude. This solution uses a newshow
array to indicate which segments should be shown, and is similar to the WebGL rect/marker handling ofindices
.There are already a couple of visual tests for NaNs in WebGL lines. I have added a new one that shows the bug before this fix and the correct solution after this fix.
Before:

After:
