Skip to content

Commit 4ad7ecb

Browse files
author
Lauren Budorick
committed
Use highp float for linesofar to guarantee enough bits on mobile devices
1 parent e4a6af3 commit 4ad7ecb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/shaders/line.vertex.glsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ uniform vec2 u_gl_units_to_pixels;
2222
varying vec2 v_normal;
2323
varying vec2 v_width2;
2424
varying float v_gamma_scale;
25-
varying float v_linesofar;
25+
varying highp float v_linesofar;
2626

2727
#pragma mapbox: define highp vec4 color
2828
#pragma mapbox: define lowp float blur

src/shaders/line_gradient.fragment.glsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ uniform sampler2D u_image;
99
varying vec2 v_width2;
1010
varying vec2 v_normal;
1111
varying float v_gamma_scale;
12-
varying float v_linesofar;
12+
varying highp float v_linesofar;
1313

1414
void main() {
1515
#pragma mapbox: initialize highp vec4 color

0 commit comments

Comments
 (0)