summaryrefslogtreecommitdiff
path: root/src/mbgl/shaders/line_pattern.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/shaders/line_pattern.cpp')
-rw-r--r--src/mbgl/shaders/line_pattern.cpp544
1 files changed, 314 insertions, 230 deletions
diff --git a/src/mbgl/shaders/line_pattern.cpp b/src/mbgl/shaders/line_pattern.cpp
index 374fc0a995..775285e05d 100644
--- a/src/mbgl/shaders/line_pattern.cpp
+++ b/src/mbgl/shaders/line_pattern.cpp
@@ -1,241 +1,325 @@
// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED.
#include <mbgl/shaders/line_pattern.hpp>
+#include <mbgl/util/compression.hpp>
+
+#include <cstdint>
namespace mbgl {
namespace shaders {
const char* line_pattern::name = "line_pattern";
-const char* line_pattern::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_gl_units_to_pixels;
-
-varying vec2 v_normal;
-varying vec2 v_width2;
-varying float v_linesofar;
-varying float v_gamma_scale;
-
-
-#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_offset
-uniform lowp float a_offset_t;
-attribute lowp vec2 a_offset;
-#else
-uniform lowp float u_offset;
-#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_width
-uniform lowp float a_width_t;
-attribute mediump vec2 a_width;
-#else
-uniform mediump float u_width;
-#endif
-
-
-void main() {
-
-#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_offset
- lowp float offset = unpack_mix_vec2(a_offset, a_offset_t);
-#else
- lowp float offset = u_offset;
-#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_width
- mediump float width = unpack_mix_vec2(a_width, a_width_t);
-#else
- mediump float width = u_width;
-#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_linesofar = a_linesofar;
- v_width2 = vec2(outset, inset);
-}
-
-)MBGL_SHADER";
-const char* line_pattern::fragmentSource = R"MBGL_SHADER(
-uniform vec2 u_pattern_size_a;
-uniform vec2 u_pattern_size_b;
-uniform vec2 u_pattern_tl_a;
-uniform vec2 u_pattern_br_a;
-uniform vec2 u_pattern_tl_b;
-uniform vec2 u_pattern_br_b;
-uniform vec2 u_texsize;
-uniform float u_fade;
-
-uniform sampler2D u_image;
-
-varying vec2 v_normal;
-varying vec2 v_width2;
-varying float v_linesofar;
-varying float v_gamma_scale;
-
-
-#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
-
-
-void main() {
-
-#ifdef HAS_UNIFORM_u_blur
- lowp float blur = u_blur;
-#endif
-
-
-#ifdef HAS_UNIFORM_u_opacity
- lowp float opacity = u_opacity;
-#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 x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);
- float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);
-
- // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge
- // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0)
- // to ensure we don't sample outside the designated symbol on the sprite sheet.
- // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of
- // the texture coordinate
- float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_a.y + 2.0) / 2.0) / u_pattern_size_a.y);
- float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_b.y + 2.0) / 2.0) / u_pattern_size_b.y);
- vec2 pos_a = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, vec2(x_a, y_a));
- vec2 pos_b = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, vec2(x_b, y_b));
-
- vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);
-
- gl_FragColor = color * alpha * opacity;
-
-#ifdef OVERDRAW_INSPECTOR
- gl_FragColor = vec4(1.0);
-#endif
-}
-
-)MBGL_SHADER";
+const char* line_pattern::vertexSource = [] () {
+ static const uint8_t compressed[] = {
+ 0x78, 0xda, 0x8d, 0x57, 0x5b, 0x6f, 0xdb, 0x36,
+ 0x14, 0x7e, 0xf7, 0xaf, 0x38, 0x68, 0x1e, 0x6a,
+ 0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,
+ 0xa4, 0x2f, 0x1a, 0xd4, 0x87, 0x5e, 0x5c, 0xa7,
+ 0x1c, 0xa1, 0xd8, 0x95, 0x5d, 0xd4, 0x94, 0xdd,
+ 0x4a, 0xd6, 0x90, 0x55, 0x6e, 0x28, 0x2b, 0x70,
+ 0x76, 0x2c, 0x28, 0x90, 0x78, 0x3b, 0xad, 0x05,
+ 0xaf, 0x41, 0xfd, 0x53, 0x09, 0xb5, 0xa2, 0xf1,
+ 0xac, 0xc4, 0x21, 0xb2, 0xe4, 0x3a, 0xa2, 0x3f,
+ 0x5a, 0x85, 0xd2, 0xea, 0x6b, 0xb7, 0x12, 0xda,
+ 0x61, 0x18, 0x5f, 0x2e, 0xbd, 0xc2, 0x0e, 0x08,
+ 0xdb, 0x3e, 0x6f, 0xdd, 0xa4, 0x6c, 0x0e, 0xbf,
+ 0x77, 0x29, 0x74, 0x18, 0x77, 0x5b, 0x1e, 0x1d,
+ 0x8a, 0x9e, 0xbd, 0x51, 0x3b, 0x5c, 0xe6, 0x45,
+ 0xea, 0x9a, 0xaf, 0x06, 0xfe, 0x3e, 0x6f, 0x0d,
+ 0x43, 0xe8, 0xf8, 0x3b, 0x70, 0x8f, 0xbe, 0x85,
+ 0xcf, 0x27, 0x7f, 0xef, 0xe5, 0x64, 0xed, 0x81,
+ 0xcc, 0x8a, 0xed, 0xe4, 0x86, 0x32, 0xc3, 0x09,
+ 0xec, 0x05, 0x31, 0xb4, 0xb7, 0x2a, 0xa2, 0xfb,
+ 0xaf, 0xf7, 0x3f, 0x47, 0x21, 0xaf, 0x4b
+ };
+ static std::string decompressed = util::decompress(std::string(reinterpret_cast<const char*>(compressed), sizeof(compressed)));
+ return decompressed.c_str();
+}();
+const char* line_pattern::fragmentSource = [] () {
+ static const uint8_t compressed[] = {
+ 0x78, 0xda, 0xa5, 0x55, 0x5d, 0x6f, 0x9b, 0x30,
+ 0x14, 0x7d, 0xcf, 0xaf, 0xb8, 0xd2, 0x1e, 0x06,
+ 0x29,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0x43,
+ 0x5b, 0xab, 0xa1, 0xff, 0xe0, 0x8c, 0xff, 0xce,
+ 0x19, 0xf7, 0x9c, 0xf6, 0xb6, 0xa9, 0xa4, 0x6a,
+ 0x45, 0xcf, 0x36, 0xde, 0xfe, 0x7d, 0x6a, 0x53,
+ 0xdd, 0x65, 0x17, 0x1c, 0x5c, 0xa7, 0xfb, 0x3e,
+ 0x03, 0xe4, 0xe1, 0xde, 0x09, 0xcc, 0xa2, 0xf9,
+ 0x87, 0xe8, 0xf1, 0x5b, 0xe8, 0xf1, 0x19, 0xf4,
+ 0xf8, 0x4d, 0xf4, 0xd8, 0xa0, 0xc7, 0x7e, 0xb7,
+ 0x6f, 0xd0, 0xfa, 0x01, 0x07, 0xc7, 0x65, 0xed,
+ 0xe0, 0xdd, 0x30, 0xa7, 0xf7, 0x9e, 0xbb, 0x6e,
+ 0x83, 0xb6, 0x37, 0x3c, 0x08, 0x4e, 0xb8, 0x62,
+ 0x3f, 0x70, 0xb7, 0x76, 0x07, 0x9a, 0xf3, 0xe8,
+ 0xa1, 0x26, 0xf9, 0x9d, 0x83, 0x6d, 0xe1, 0xc7,
+ 0xee, 0xdc, 0x19, 0xef, 0xae, 0xb1, 0xee, 0x0a,
+ 0x59, 0xbc, 0xce, 0x96, 0xf7, 0xcb, 0xdb, 0xef,
+ 0xd1, 0xfc, 0xf1, 0xf9, 0x69, 0x76, 0xf7, 0xb2,
+ 0x58, 0xbe, 0x05, 0x63, 0x4a, 0xf5, 0xda, 0x2d,
+ 0xef, 0x6e, 0x8e, 0xdf, 0xa3, 0x3f, 0xfb, 0x5c,
+ 0xf6, 0x33
+ };
+ static std::string decompressed = util::decompress(std::string(reinterpret_cast<const char*>(compressed), sizeof(compressed)));
+ return decompressed.c_str();
+}();
} // namespace shaders
} // namespace mbgl