-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Unify WebGL markers and rects #12040
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mattpap
reviewed
Mar 8, 2022
mattpap
reviewed
Mar 8, 2022
This is ready, apart from @mattpap's comment about the marker types in the test which I am inclined to leave as it is. |
ianthomas23
added a commit
that referenced
this pull request
May 16, 2022
* Unify markers and rects * Baseline images * Consistent code style
bryevdv
pushed a commit
that referenced
this pull request
May 16, 2022
* 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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR unifies WebGL markers and rects as a
rect
is asquare
marker with a 2D size. It closed item 5 of #11369.It simplifies the codebase as there is now just a single pair of shaders (
marker.vert
andmarker.frag
) for all constant-shape glyphs rather than there being separate ones for markers and rects. I have renamed the shadersmarker.frag
etc rather thanmarkers.frag
because the singular name is more appropriate as the equivalent typescript class isMarkerGL
.rect
already had all visual properties except for line dashes. Now other markers have the same, particularly hatching and end caps, and I have rewritten many of the shader distance equations to fit in with therect
approach and also to make them more understandable/maintainable by using similar formulations of distances from straight lines defined by unit vectors and distances from the origin. This removes the last of the original WebGL code which had a different antialiasing formulation.The only things missing from rects/markers now are:
line
first.rect
already has them).The WebGL baseline images remain the same for
rect
but are all different for othermarker
s due to the changes in antialiasing and the underlying equations. There is one new visual test, for markers with hatching:This work is part of the CZI round 3 extension.