summaryrefslogtreecommitdiff
path: root/src/mbgl/shaders/line_sdf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/shaders/line_sdf.cpp')
-rw-r--r--src/mbgl/shaders/line_sdf.cpp604
1 files changed, 313 insertions, 291 deletions
diff --git a/src/mbgl/shaders/line_sdf.cpp b/src/mbgl/shaders/line_sdf.cpp
index 9b6bf47301..bb50859c8d 100644
--- a/src/mbgl/shaders/line_sdf.cpp
+++ b/src/mbgl/shaders/line_sdf.cpp
@@ -1,302 +1,324 @@
// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED.
#include <mbgl/shaders/line_sdf.hpp>
+#include <mbgl/util/compression.hpp>
+
+#include <cstdint>
namespace mbgl {
namespace shaders {
const char* line_sdf::name = "line_sdf";
-const char* line_sdf::vertexSource = R"MBGL_SHADER(
-// floor(127 / 2) == 63.0
-// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is
-// stored in a byte (-128..127). we scale regular normals up to length 63, but
-// there are also "special" normals that have a bigger length (of up to 126 in
-// this case).
-// #define scale 63.0
-#define scale 0.015873016
-
-// We scale the distance before adding it to the buffers so that we can store
-// long distances for long segments. Use this value to unscale the distance.
-#define LINE_DISTANCE_SCALE 2.0
-
-// the distance over which the line edge fades out.
-// Retina devices need a smaller distance to avoid aliasing.
-#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0
-
-attribute vec4 a_pos_normal;
-attribute vec4 a_data;
-
-uniform mat4 u_matrix;
-uniform mediump float u_ratio;
-uniform vec2 u_patternscale_a;
-uniform float u_tex_y_a;
-uniform vec2 u_patternscale_b;
-uniform float u_tex_y_b;
-uniform vec2 u_gl_units_to_pixels;
-
-varying vec2 v_normal;
-varying vec2 v_width2;
-varying vec2 v_tex_a;
-varying vec2 v_tex_b;
-varying float v_gamma_scale;
-
-
-#ifndef HAS_UNIFORM_u_color
-uniform lowp float a_color_t;
-attribute highp vec4 a_color;
-varying highp vec4 color;
-#else
-uniform highp vec4 u_color;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_blur
-uniform lowp float a_blur_t;
-attribute lowp vec2 a_blur;
-varying lowp float blur;
-#else
-uniform lowp float u_blur;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_opacity
-uniform lowp float a_opacity_t;
-attribute lowp vec2 a_opacity;
-varying lowp float opacity;
-#else
-uniform lowp float u_opacity;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_gapwidth
-uniform lowp float a_gapwidth_t;
-attribute mediump vec2 a_gapwidth;
-#else
-uniform mediump float u_gapwidth;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_offset
-uniform lowp float a_offset_t;
-attribute lowp vec2 a_offset;
-#else
-uniform lowp float u_offset;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_width
-uniform lowp float a_width_t;
-attribute mediump vec2 a_width;
-varying mediump float width;
-#else
-uniform mediump float u_width;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_floorwidth
-uniform lowp float a_floorwidth_t;
-attribute lowp vec2 a_floorwidth;
-varying lowp float floorwidth;
-#else
-uniform lowp float u_floorwidth;
-#endif
-
-
-void main() {
-
-#ifndef HAS_UNIFORM_u_color
- color = unpack_mix_vec4(a_color, a_color_t);
-#else
- highp vec4 color = u_color;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_blur
- blur = unpack_mix_vec2(a_blur, a_blur_t);
-#else
- lowp float blur = u_blur;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_opacity
- opacity = unpack_mix_vec2(a_opacity, a_opacity_t);
-#else
- lowp float opacity = u_opacity;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_gapwidth
- mediump float gapwidth = unpack_mix_vec2(a_gapwidth, a_gapwidth_t);
-#else
- mediump float gapwidth = u_gapwidth;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_offset
- lowp float offset = unpack_mix_vec2(a_offset, a_offset_t);
-#else
- lowp float offset = u_offset;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_width
- width = unpack_mix_vec2(a_width, a_width_t);
-#else
- mediump float width = u_width;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_floorwidth
- floorwidth = unpack_mix_vec2(a_floorwidth, a_floorwidth_t);
-#else
- lowp float floorwidth = u_floorwidth;
-#endif
-
-
- vec2 a_extrude = a_data.xy - 128.0;
- float a_direction = mod(a_data.z, 4.0) - 1.0;
- float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;
-
- vec2 pos = a_pos_normal.xy;
-
- // x is 1 if it's a round cap, 0 otherwise
- // y is 1 if the normal points up, and -1 if it points down
- mediump vec2 normal = a_pos_normal.zw;
- v_normal = normal;
-
- // these transformations used to be applied in the JS and native code bases.
- // moved them into the shader for clarity and simplicity.
- gapwidth = gapwidth / 2.0;
- float halfwidth = width / 2.0;
- offset = -1.0 * offset;
-
- float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);
- float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);
-
- // Scale the extrusion vector down to a normal and then up by the line width
- // of this vertex.
- mediump vec2 dist =outset * a_extrude * scale;
-
- // Calculate the offset when drawing a line that is to the side of the actual line.
- // We do this by creating a vector that points towards the extrude, but rotate
- // it when we're drawing round end points (a_direction = -1 or 1) since their
- // extrude vector points in another direction.
- mediump float u = 0.5 * a_direction;
- mediump float t = 1.0 - abs(u);
- mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);
-
- vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);
- gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;
-
- // calculate how much the perspective view squishes or stretches the extrude
- float extrude_length_without_perspective = length(dist);
- float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);
- v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;
-
- v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);
- v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);
-
- v_width2 = vec2(outset, inset);
-}
-
-)MBGL_SHADER";
-const char* line_sdf::fragmentSource = R"MBGL_SHADER(
-
-uniform sampler2D u_image;
-uniform float u_sdfgamma;
-uniform float u_mix;
-
-varying vec2 v_normal;
-varying vec2 v_width2;
-varying vec2 v_tex_a;
-varying vec2 v_tex_b;
-varying float v_gamma_scale;
-
-
-#ifndef HAS_UNIFORM_u_color
-varying highp vec4 color;
-#else
-uniform highp vec4 u_color;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_blur
-varying lowp float blur;
-#else
-uniform lowp float u_blur;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_opacity
-varying lowp float opacity;
-#else
-uniform lowp float u_opacity;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_width
-varying mediump float width;
-#else
-uniform mediump float u_width;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_floorwidth
-varying lowp float floorwidth;
-#else
-uniform lowp float u_floorwidth;
-#endif
-
-
-void main() {
-
-#ifdef HAS_UNIFORM_u_color
- highp vec4 color = u_color;
-#endif
-
-
-#ifdef HAS_UNIFORM_u_blur
- lowp float blur = u_blur;
-#endif
-
-
-#ifdef HAS_UNIFORM_u_opacity
- lowp float opacity = u_opacity;
-#endif
-
-
-#ifdef HAS_UNIFORM_u_width
- mediump float width = u_width;
-#endif
-
-
-#ifdef HAS_UNIFORM_u_floorwidth
- lowp float floorwidth = u_floorwidth;
-#endif
-
-
- // Calculate the distance of the pixel from the line in pixels.
- float dist = length(v_normal) * v_width2.s;
-
- // Calculate the antialiasing fade factor. This is either when fading in
- // the line in case of an offset line (v_width2.t) or when fading out
- // (v_width2.s)
- float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;
- float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);
-
- float sdfdist_a = texture2D(u_image, v_tex_a).a;
- float sdfdist_b = texture2D(u_image, v_tex_b).a;
- float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);
- alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);
-
- gl_FragColor = color * (alpha * opacity);
-
-#ifdef OVERDRAW_INSPECTOR
- gl_FragColor = vec4(1.0);
-#endif
-}
-
-)MBGL_SHADER";
+const char* line_sdf::vertexSource = [] () {
+ static const uint8_t compressed[] = {
+ 0x78, 0xda, 0x95, 0x58, 0x6d, 0x6f, 0xdb, 0x36,
+ 0x10, 0xfe, 0xee, 0x5f, 0x71, 0x68, 0x3f, 0xd4,
+ 0x76, 0x1d, 0xf9, 0xa5, 0x69, 0x5a, 0x34, 0xc8,
+ 0x86, 0xa0, 0xcb, 0x36, 0x0f, 0x59, 0x5a, 0x34,
+ 0xed, 0xb6, 0x6f, 0x02, 0x2d, 0xd1, 0x36, 0x37,
+ 0x49, 0xf4, 0x44, 0xca, 0x2f, 0x1d, 0xf6, 0xdf,
+ 0x77, 0x47, 0x91, 0x12, 0x65, 0xcb, 0x6a, 0x16,
+ 0x38, 0xb0, 0xcc, 0x7b, 0x7b, 0x78, 0xbc, 0x3b,
+ 0xdd, 0x71, 0x3c, 0x86, 0x65, 0x22, 0x65, 0xde,
+ 0x9f, 0xce, 0xde, 0xc0, 0x18, 0x66, 0x03, 0xb8,
+ 0xb9, 0x81, 0xab, 0x57, 0xc1, 0xa4, 0x37, 0x1e,
+ 0x83, 0x5e, 0x73, 0x48, 0xd9, 0x5e, 0xa4, 0x45,
+ 0x0a, 0x2c, 0x49, 0xe4, 0x8e, 0xc7, 0x90, 0x0a,
+ 0xcd, 0x73, 0x48, 0x04, 0x7e, 0x83, 0x50, 0x30,
+ 0x0b, 0x26, 0xc0, 0x74, 0xc9, 0x29, 0x53, 0x9e,
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ae, 0x13, 0xde, 0x03, 0x9e, 0x67, 0x75,
+ 0x25, 0x52, 0x6d, 0xc4, 0x5c, 0x35, 0x3c, 0xc9,
+ 0xda, 0xe2, 0x7f, 0x58, 0x5b, 0x34, 0xac, 0x2d,
+ 0xaa, 0xc8, 0xb6, 0xd7, 0x20, 0xce, 0x5e, 0x59,
+ 0xde, 0x46, 0xe5, 0x2b, 0x01, 0x99, 0xfe, 0xed,
+ 0xfd, 0x07, 0xb4, 0x2b, 0xfd, 0x49
+ };
+ static std::string decompressed = util::decompress(std::string(reinterpret_cast<const char*>(compressed), sizeof(compressed)));
+ return decompressed.c_str();
+}();
+const char* line_sdf::fragmentSource = [] () {
+ static const uint8_t compressed[] = {
+ 0x78, 0xda, 0x85, 0x55, 0x5d, 0x6f, 0x9b, 0x30,
+ 0x14, 0x7d, 0xe7, 0x57, 0x5c, 0xa9, 0x2f, 0xd0,
+ 0x65, 0x34, 0x8b, 0xd6, 0xa7, 0xa8, 0x0f, 0x55,
+ 0x92, 0x6a, 0x91, 0xb6, 0xa6, 0x4a, 0xd3, 0x6e,
+ 0x6f, 0x96, 0x03, 0x06, 0x2c, 0x19, 0x1b, 0x61,
+ 0x93, 0xb6, 0x9a, 0xf6, 0xdf, 0xe7, 0x0f, 0x08,
+ 0x84, 0x40, 0x1a, 0x45, 0x48, 0xdc, 0x73, 0xef,
+ 0x39, 0xf7, 0xc3, 0xbe, 0x78, 0x15, 0xa7, 0x89,
+ 0x28, 0x73, 0x90, 0x38, 0x2f, 0x18, 0x29, 0x67,
+ 0x4b, 0xa8, 0x10, 0xcd, 0x71, 0x4a, 0xe6, 0x5e,
+ 0x03, 0x25, 0x4c, 0x60, 0xa5, 0xcd, 0x32, 0x4e,
+ 0x52, 0x9c, 0xe7, 0xf8, 0x1c, 0xc9, 0xe9, 0xfb,
+ 0xdc, 0xf3, 0x0e, 0xb8, 0xfc, 0xa0, 0x3c, 0x85,
+ 0x03, 0x89, 0x66, 0x70, 0x40, 0x5c, 0x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xd2, 0xe6, 0x75,
+ 0xb5, 0x5d, 0x6e, 0xef, 0x7f, 0xa3, 0xf5, 0xe3,
+ 0xf3, 0xd3, 0x6a, 0xb1, 0xdb, 0x6c, 0x87, 0x88,
+ 0xcc, 0xda, 0xf1, 0x5d, 0xa3, 0xeb, 0x6b, 0xf3,
+ 0xcf, 0xfb, 0x0f, 0x29, 0x1c, 0x77, 0x3b
+ };
+ static std::string decompressed = util::decompress(std::string(reinterpret_cast<const char*>(compressed), sizeof(compressed)));
+ return decompressed.c_str();
+}();
} // namespace shaders
} // namespace mbgl