summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnand Thakker <anandthakker@users.noreply.github.com>2017-03-22 14:32:22 -0400
committerGitHub <noreply@github.com>2017-03-22 14:32:22 -0400
commit60717822e6a5f4b9262241cb4f4504d723b3a82b (patch)
treeb695651d265afb04d28b73d87b41e1d79c3e5767
parent1ccaa1dc718c2b1d66014a9c3b0b8c725d4565f1 (diff)
downloadqtlocation-mapboxgl-60717822e6a5f4b9262241cb4f4504d723b3a82b.tar.gz
Use highp for color attributes (#8496)
Addresses #8385 Updates shaders to reflect https://github.com/mapbox/mapbox-gl-js/pull/4476
m---------mapbox-gl-js0
-rw-r--r--src/mbgl/shaders/circle.cpp12
-rw-r--r--src/mbgl/shaders/debug.cpp2
-rw-r--r--src/mbgl/shaders/fill.cpp6
-rw-r--r--src/mbgl/shaders/fill_outline.cpp6
-rw-r--r--src/mbgl/shaders/line.cpp6
-rw-r--r--src/mbgl/shaders/line_sdf.cpp6
-rw-r--r--src/mbgl/shaders/symbol_sdf.cpp12
8 files changed, 25 insertions, 25 deletions
diff --git a/mapbox-gl-js b/mapbox-gl-js
-Subproject 69bb05cef27c99722f6616867032d64b5f12ee5
+Subproject dc426c212208bf06300b7412983c62c689e7a79
diff --git a/src/mbgl/shaders/circle.cpp b/src/mbgl/shaders/circle.cpp
index b479f1d40c..1c977d2bce 100644
--- a/src/mbgl/shaders/circle.cpp
+++ b/src/mbgl/shaders/circle.cpp
@@ -14,8 +14,8 @@ uniform vec2 u_extrude_scale;
attribute vec2 a_pos;
uniform lowp float a_color_t;
-attribute lowp vec4 a_color;
-varying lowp vec4 color;
+attribute highp vec4 a_color;
+varying highp vec4 color;
uniform lowp float a_radius_t;
attribute mediump vec2 a_radius;
varying mediump float radius;
@@ -26,8 +26,8 @@ uniform lowp float a_opacity_t;
attribute lowp vec2 a_opacity;
varying lowp float opacity;
uniform lowp float a_stroke_color_t;
-attribute lowp vec4 a_stroke_color;
-varying lowp vec4 stroke_color;
+attribute highp vec4 a_stroke_color;
+varying highp vec4 stroke_color;
uniform lowp float a_stroke_width_t;
attribute mediump vec2 a_stroke_width;
varying mediump float stroke_width;
@@ -69,11 +69,11 @@ void main(void) {
)MBGL_SHADER";
const char* circle::fragmentSource = R"MBGL_SHADER(
-varying lowp vec4 color;
+varying highp vec4 color;
varying mediump float radius;
varying lowp float blur;
varying lowp float opacity;
-varying lowp vec4 stroke_color;
+varying highp vec4 stroke_color;
varying mediump float stroke_width;
varying lowp float stroke_opacity;
diff --git a/src/mbgl/shaders/debug.cpp b/src/mbgl/shaders/debug.cpp
index 27a15698d4..d39dcf25be 100644
--- a/src/mbgl/shaders/debug.cpp
+++ b/src/mbgl/shaders/debug.cpp
@@ -17,7 +17,7 @@ void main() {
)MBGL_SHADER";
const char* debug::fragmentSource = R"MBGL_SHADER(
-uniform lowp vec4 u_color;
+uniform highp vec4 u_color;
void main() {
gl_FragColor = u_color;
diff --git a/src/mbgl/shaders/fill.cpp b/src/mbgl/shaders/fill.cpp
index a1fba4d749..0b775273d2 100644
--- a/src/mbgl/shaders/fill.cpp
+++ b/src/mbgl/shaders/fill.cpp
@@ -12,8 +12,8 @@ attribute vec2 a_pos;
uniform mat4 u_matrix;
uniform lowp float a_color_t;
-attribute lowp vec4 a_color;
-varying lowp vec4 color;
+attribute highp vec4 a_color;
+varying highp vec4 color;
uniform lowp float a_opacity_t;
attribute lowp vec2 a_opacity;
varying lowp float opacity;
@@ -27,7 +27,7 @@ void main() {
)MBGL_SHADER";
const char* fill::fragmentSource = R"MBGL_SHADER(
-varying lowp vec4 color;
+varying highp vec4 color;
varying lowp float opacity;
void main() {
diff --git a/src/mbgl/shaders/fill_outline.cpp b/src/mbgl/shaders/fill_outline.cpp
index 74201b518d..3e160ac6c2 100644
--- a/src/mbgl/shaders/fill_outline.cpp
+++ b/src/mbgl/shaders/fill_outline.cpp
@@ -15,8 +15,8 @@ uniform vec2 u_world;
varying vec2 v_pos;
uniform lowp float a_outline_color_t;
-attribute lowp vec4 a_outline_color;
-varying lowp vec4 outline_color;
+attribute highp vec4 a_outline_color;
+varying highp vec4 outline_color;
uniform lowp float a_opacity_t;
attribute lowp vec2 a_opacity;
varying lowp float opacity;
@@ -31,7 +31,7 @@ void main() {
)MBGL_SHADER";
const char* fill_outline::fragmentSource = R"MBGL_SHADER(
-varying lowp vec4 outline_color;
+varying highp vec4 outline_color;
varying lowp float opacity;
varying vec2 v_pos;
diff --git a/src/mbgl/shaders/line.cpp b/src/mbgl/shaders/line.cpp
index dc4aa774dc..4392bd051f 100644
--- a/src/mbgl/shaders/line.cpp
+++ b/src/mbgl/shaders/line.cpp
@@ -34,8 +34,8 @@ varying vec2 v_width2;
varying float v_gamma_scale;
uniform lowp float a_color_t;
-attribute lowp vec4 a_color;
-varying lowp vec4 color;
+attribute highp vec4 a_color;
+varying highp vec4 color;
uniform lowp float a_blur_t;
attribute lowp vec2 a_blur;
varying lowp float blur;
@@ -105,7 +105,7 @@ void main() {
)MBGL_SHADER";
const char* line::fragmentSource = R"MBGL_SHADER(
-varying lowp vec4 color;
+varying highp vec4 color;
varying lowp float blur;
varying lowp float opacity;
diff --git a/src/mbgl/shaders/line_sdf.cpp b/src/mbgl/shaders/line_sdf.cpp
index cd0d4ac318..17a6a19739 100644
--- a/src/mbgl/shaders/line_sdf.cpp
+++ b/src/mbgl/shaders/line_sdf.cpp
@@ -42,8 +42,8 @@ varying vec2 v_tex_b;
varying float v_gamma_scale;
uniform lowp float a_color_t;
-attribute lowp vec4 a_color;
-varying lowp vec4 color;
+attribute highp vec4 a_color;
+varying highp vec4 color;
uniform lowp float a_blur_t;
attribute lowp vec2 a_blur;
varying lowp float blur;
@@ -127,7 +127,7 @@ varying vec2 v_tex_a;
varying vec2 v_tex_b;
varying float v_gamma_scale;
-varying lowp vec4 color;
+varying highp vec4 color;
varying lowp float blur;
varying lowp float opacity;
diff --git a/src/mbgl/shaders/symbol_sdf.cpp b/src/mbgl/shaders/symbol_sdf.cpp
index e0ee57b6d4..7cbc9babf5 100644
--- a/src/mbgl/shaders/symbol_sdf.cpp
+++ b/src/mbgl/shaders/symbol_sdf.cpp
@@ -14,11 +14,11 @@ attribute vec2 a_texture_pos;
attribute vec4 a_data;
uniform lowp float a_fill_color_t;
-attribute lowp vec4 a_fill_color;
-varying lowp vec4 fill_color;
+attribute highp vec4 a_fill_color;
+varying highp vec4 fill_color;
uniform lowp float a_halo_color_t;
-attribute lowp vec4 a_halo_color;
-varying lowp vec4 halo_color;
+attribute highp vec4 a_halo_color;
+varying highp vec4 halo_color;
uniform lowp float a_opacity_t;
attribute lowp vec2 a_opacity;
varying lowp float opacity;
@@ -119,8 +119,8 @@ const char* symbol_sdf::fragmentSource = R"MBGL_SHADER(
#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO
uniform bool u_is_halo;
-varying lowp vec4 fill_color;
-varying lowp vec4 halo_color;
+varying highp vec4 fill_color;
+varying highp vec4 halo_color;
varying lowp float opacity;
varying lowp float halo_width;
varying lowp float halo_blur;