Skip to content

[9.4-release] fix(extensions): FillStyleExtension pattern placement in GlobeView (#10658) - #11056

Merged
chrisgervang merged 1 commit into
9.4-releasefrom
chr/backport-10658-9.4
Nov 7, 2026
Merged

chrisgervang merged 1 commit into
9.4-releasefrom
chr/backport-10658-9.4

Conversation

@chrisgervang

@chrisgervang chrisgervang commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Follow up of #10658, for #10972

Background

Backports #10658 to 9.4-release. Fixes FillStyleExtension pattern placement in GlobeView.

Change List

Verified locally on 9.4: test/modules/extensions/fill-style.spec.ts passes (5 tests), and the fill-pattern render tests pass under WebGL with the new globe goldens (14 passed, 1 skipped).


Note

Low Risk
Targeted shader and uniform calculation update for GlobeView projection in FillStyleExtension, well covered by unit and visual regression tests.

Overview
Enables FillStyleExtension pattern rendering and texture placement in GlobeView.

The vertex shader now flattens sphere coordinates to continuous Mercator coordinates using project_common_position_to_flat_continuous, preventing pattern seam distortions across the antimeridian. The CPU uniform calculations now use getFlatCommonOrigin so pattern UV origins properly evaluate to absolute Mercator coordinates on the globe instead of spherical common coordinates.

Unit and visual regression render test suites are expanded to verify raster and procedural fill patterns across both MapView and GlobeView, including antimeridian boundary tests.

Reviewed by Cursor Bugbot for commit 29ed3e9. Bugbot is set up for automated code reviews on this repo. Configure here.

@chrisgervang chrisgervang mentioned this pull request Nov 7, 2026
29 of 30 tasks
@greptile-apps

greptile-apps Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change affects the FillStyleExtension pattern-rendering workflow.

The PR appears safe to merge, with a non-blocking pattern jump when users pan across the antimeridian.

Findings

  1. P2 Patterns jump while panning ▶

Summary

Backports the FillStyleExtension globe-placement fix to 9.4-release.

  • FillStyleExtension patterns stay aligned when layers render in GlobeView.

Reviews (1) · Last reviewed commit: "fix(extensions): FillStyleExtension patt..." · Reviewed by Greptile

Comment on lines +224 to +225
float fill_cameraFlatX = project_common_position_to_flat(project.cameraPosition).x;
vec2 fill_flatPosition = project_common_position_to_flat_continuous(geometry.position, fill_cameraFlatX);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Patterns jump while panning

When the camera crosses ±180°, atan makes fill_cameraFlatX jump between roughly 512 and 0. The wrap then shifts every visible vertex's fill_flatPosition.x by 512. That is not generally a whole number of pattern repeats, so the pattern suddenly changes alignment inside the polygon. The new 45° hatch with a 13-pixel period is one example.

Preserve a continuous world-copy reference or compensate the pattern offset when the camera crosses this boundary.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 83.118% — chr/backport-10658-9.4 into 9.4-release. No base build found for 9.4-release.

@chrisgervang
chrisgervang merged commit 0e99457 into 9.4-release Nov 7, 2026
8 checks passed
@chrisgervang
chrisgervang deleted the chr/backport-10658-9.4 branch November 7, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants