Repository navigation
Conversation
Reverse icon quad winding to account for the vertex shader's y-axis flip so globe back-face culling preserves visible icons. Add MapLibre 5 and 6 regression coverage for Mercator and globe rendering, overlaid and interleaved modes, billboard settings, and picking.
|
Correct background winding for automatic and content-box bounds in GLSL and WGSL. Extend the MapLibre regression to text glyphs and backgrounds, and add a GlobeView render test. Refs visgl#9777
9b94c78 to
56d078a
Compare
|
Thanks for working on this! Closing as a duplicate of #10750, which addresses #9777 along with #9592 and #9554. It includes the same |
Closes #9777
Background
Globe back-face culling incorrectly hides icons, text glyphs and text backgrounds because their shaders flip Y, reversing triangle winding.
Change List
IconLayerwinding for icons and text glyphsTextBackgroundLayerGLSL/WGSL winding, preserving content-box backgroundstext-layer-globegolden image for background visibilityNote
Medium Risk
Shader and geometry winding changes affect all IconLayer and text-background rendering paths; behavior is intentionally scoped but could alter edge-case appearance outside globe view.
Overview
Fixes icons and text backgrounds disappearing on globe projections when back-face culling is enabled. Vertex shaders flip Y, which had reversed triangle winding so quads were treated as back-facing.
IconLayer reorders the shared quad
positionstriangle-strip so winding stays front-facing after the Y flip. TextBackgroundLayer (GLSL and WGSL) derives acornerUV that mirrors Y only for natural-bounds paths (instanceClipRect.w < 0), keeping content-box backgrounds unchanged while fixing winding for the flip-Y path.Adds MapLibre integration tests (mercator and globe, interleaved overlays, billboard on/off) that assert label pixels, text background visibility, and picking; non-interleaved runs explicitly release WebGL contexts to avoid exhausting browser limits.
Reviewed by Cursor Bugbot for commit 56d078a. Bugbot is set up for automated code reviews on this repo. Configure here.