Fix rendering of web Rect with large corner radius - #13649
Merged
ianthomas23 merged 1 commit intoJan 17, 2024
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## branch-3.4 #13649 +/- ##
===========================================
Coverage 92.56% 92.56%
===========================================
Files 323 323
Lines 20509 20509
===========================================
Hits 18985 18985
Misses 1524 1524 |
mattpap
approved these changes
Jan 17, 2024
Chiemezuo
pushed a commit
to Chiemezuo/bokeh
that referenced
this pull request
Aug 27, 2024
|
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. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 fixes the rendering of WebGL Rect glyphs with large corner radii. Here is the
Glyph_models__should_support_Rect_with_large_rounded_corners_that_need_scaling.pngbaseline test image before and after:There isn't a simple Python reproducer until #13637 is fixed.
Code changes are all in the shaders. Previously we were only considering the distance to the nearest
Rectcorner so we only looked at the local x,y quadrant. This isn't sufficient and we have to look at all 4 corners to support large radii. This changes the logic of the fragment shader, necessarily making it more complicated. I have also moved the calculation to limit the corner radii to the vertex shader so that it only needs to be calculated 4 times (one per rect vertex) rather than once per pixel rendered, and written it in a more condensed and faster form.