From 3d6d3f4451cfbd7e076e5e8b91296e5cfda83e1c Mon Sep 17 00:00:00 2001 From: Isaac Besora Vilardaga Date: Fri, 27 Dec 2024 17:16:42 +0100 Subject: [PATCH] Fix symbol size increase (#5275) * Update shader * Allow raw image on tests * Undo test suite change * Add changelog --- CHANGELOG.md | 1 + src/shaders/symbol_icon.vertex.glsl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2386951279..da71636dea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Fix swallowing of errors ([#4532](https://github.com/maplibre/maplibre-gl-js/issues/4532)) - Fix erroring requests not reported on `error` handler ([#4613](https://github.com/maplibre/maplibre-gl-js/issues/4613)) - Fix children not retained when using globe ([#5271](https://github.com/maplibre/maplibre-gl-js/pull/5271)) +- Fix symbol size increasing when looking from poles ([#5275](https://github.com/maplibre/maplibre-gl-js/pull/5275)) - _...Add new stuff here..._ ## 5.0.0-pre.10 diff --git a/src/shaders/symbol_icon.vertex.glsl b/src/shaders/symbol_icon.vertex.glsl index 51bc16dd1c..02d7f50a2b 100644 --- a/src/shaders/symbol_icon.vertex.glsl +++ b/src/shaders/symbol_icon.vertex.glsl @@ -98,7 +98,7 @@ void main() { float projectionScaling = 1.0; #ifdef GLOBE - if(u_pitch_with_map && !u_is_along_line) { + if(u_pitch_with_map) { float anchor_pos_tile_y = (u_coord_matrix * vec4(projected_pos.xy / projected_pos.w, z, 1.0)).y; projectionScaling = mix(projectionScaling, 1.0 / circumferenceRatioAtTileY(anchor_pos_tile_y) * u_pitched_scale, u_projection_transition); }