[core] Double maximum label width by reducing glyph precision.
Fixes issue #11507. Port of GL JS PR #6375.
This commit is contained in:
Submodule mapbox-gl-js updated: 11552cf279...3c07b72a59
@@ -61,8 +61,8 @@ struct SymbolLayoutAttributes : gl::Attributes<
|
||||
{{
|
||||
static_cast<int16_t>(labelAnchor.x),
|
||||
static_cast<int16_t>(labelAnchor.y),
|
||||
static_cast<int16_t>(::round(o.x * 64)), // use 1/64 pixels for placement
|
||||
static_cast<int16_t>(::round((o.y + glyphOffsetY) * 64))
|
||||
static_cast<int16_t>(::round(o.x * 32)), // use 1/32 pixels for placement
|
||||
static_cast<int16_t>(::round((o.y + glyphOffsetY) * 32))
|
||||
}},
|
||||
{{
|
||||
tx,
|
||||
|
||||
@@ -105,7 +105,7 @@ void main() {
|
||||
mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);
|
||||
|
||||
vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);
|
||||
gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 64.0 * fontScale), 0.0, 1.0);
|
||||
gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);
|
||||
|
||||
v_tex = a_tex / u_texsize;
|
||||
vec2 fade_opacity = unpack_opacity(a_fade_opacity);
|
||||
|
||||
@@ -183,7 +183,7 @@ void main() {
|
||||
mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);
|
||||
|
||||
vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);
|
||||
gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 64.0 * fontScale), 0.0, 1.0);
|
||||
gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);
|
||||
float gamma_scale = gl_Position.w;
|
||||
|
||||
vec2 tex = a_tex / u_texsize;
|
||||
|
||||
Reference in New Issue
Block a user