summaryrefslogtreecommitdiff
path: root/src/mbgl/shaders/fill.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/shaders/fill.cpp')
-rw-r--r--src/mbgl/shaders/fill.cpp157
1 files changed, 77 insertions, 80 deletions
diff --git a/src/mbgl/shaders/fill.cpp b/src/mbgl/shaders/fill.cpp
index 3ba00836a2..12aa31237b 100644
--- a/src/mbgl/shaders/fill.cpp
+++ b/src/mbgl/shaders/fill.cpp
@@ -1,91 +1,88 @@
// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED.
#include <mbgl/shaders/fill.hpp>
+#include <mbgl/util/compression.hpp>
+
+#include <cstdint>
namespace mbgl {
namespace shaders {
const char* fill::name = "fill";
-const char* fill::vertexSource = R"MBGL_SHADER(
-attribute vec2 a_pos;
-
-uniform mat4 u_matrix;
-
-
-#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_opacity
-uniform lowp float a_opacity_t;
-attribute lowp vec2 a_opacity;
-varying lowp float opacity;
-#else
-uniform lowp float u_opacity;
-#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_opacity
- opacity = unpack_mix_vec2(a_opacity, a_opacity_t);
-#else
- lowp float opacity = u_opacity;
-#endif
-
-
- gl_Position = u_matrix * vec4(a_pos, 0, 1);
-}
-
-)MBGL_SHADER";
-const char* fill::fragmentSource = R"MBGL_SHADER(
-
-#ifndef HAS_UNIFORM_u_color
-varying highp vec4 color;
-#else
-uniform highp vec4 u_color;
-#endif
-
-
-#ifndef HAS_UNIFORM_u_opacity
-varying lowp float opacity;
-#else
-uniform lowp float u_opacity;
-#endif
-
-
-void main() {
-
-#ifdef HAS_UNIFORM_u_color
- highp vec4 color = u_color;
-#endif
-
-
-#ifdef HAS_UNIFORM_u_opacity
- lowp float opacity = u_opacity;
-#endif
-
-
- gl_FragColor = color * opacity;
-
-#ifdef OVERDRAW_INSPECTOR
- gl_FragColor = vec4(1.0);
-#endif
-}
-
-)MBGL_SHADER";
+const char* fill::vertexSource = [] () {
+ static const uint8_t compressed[] = {
+ 0x78, 0xda, 0x7d, 0x92, 0x3f, 0x4f, 0xc3, 0x30,
+ 0x10, 0xc5, 0x77, 0x7f, 0x8a, 0x93, 0xba, 0xa4,
+ 0x28, 0x03, 0x54, 0xdd, 0x22, 0x06, 0x16, 0x04,
+ 0x03, 0x7f, 0x04, 0x62, 0x3e, 0x99, 0x24, 0x4e,
+ 0x4f, 0x24, 0x76, 0x94, 0xd8, 0xa1, 0x15, 0xe2,
+ 0xbb, 0x63, 0x07, 0xc7, 0x75, 0x1a, 0xa8, 0x17,
+ 0x5b, 0x7e, 0xef, 0xee, 0x9e, 0x7f, 0x32, 0xd7,
+ 0xba, 0xa3, 0x77, 0xa3, 0x4b, 0x18, 0xca, 0x7c,
+ 0x03, 0x1c, 0x5b, 0xd5, 0x67, 0x8c, 0x19, 0x49,
+ 0x42, 0x75, 0x0d, 0x34, 0x5c, 0x6f, 0xc1, 0xa0,
+ 0xdd, 0x3a, 0xda, 0xdb, 0x7b, 0xb6, 0x22, 0x21,
+ 0x8b, 0x52, 0xc0, 0xdd, 0xcd, 0x2b, 0xbe, 0x3d,
+ 0xde, 0xdf, 0x3e, 0xbd, 0x3c, 0xa0, 0xc1, 0x5c,
+ 0xd5, 0xaa, 0x0b, 0x45, 0xb5, 0xfa, 0x6c, 0x41,
+ 0xd4, 0x8a, 0x6b, 0xdb, 0x6f, 0x94, 0x50, 0x67,
+ 0x8c, 0x87, 0x49, 0x3b, 0xaa, 0x76, 0xad, 0x9b,
+ 0xb7, 0x9d, 0xf4, 0x8c, 0x0d, 0xbc, 0x3b, 0x90,
+ 0xac, 0x62, 0xcd, 0x2b, 0xab, 0xb2, 0xee, 0xcb,
+ 0xd0, 0x3b, 0xd2, 0x0d, 0x06, 0x87, 0x2c, 0x48,
+ 0xfc, 0x1b, 0x4e, 0xb5, 0x3c, 0x27, 0x7d, 0xf8,
+ 0x3b, 0x9e, 0x17, 0xe7, 0x01, 0x47, 0x87, 0xe7,
+ 0xe1, 0x0d, 0xc7, 0x84, 0x51, 0x79, 0xd0, 0xe6,
+ 0x19, 0x23, 0x87, 0xc1, 0xc8, 0xe3, 0x53, 0x0e,
+ 0x8a, 0x0a, 0x0b, 0x96, 0x64, 0xb2, 0x86, 0x2f,
+ 0x06, 0x76, 0x9d, 0xa5, 0xea, 0x0c, 0xe3, 0x09,
+ 0xae, 0xc1, 0x48, 0xdb, 0xed, 0x03, 0x1b, 0xda,
+ 0xa3, 0x43, 0x90, 0x78, 0x7c, 0xe9, 0x91, 0xf3,
+ 0x7a, 0x0a, 0xe3, 0xca, 0x4e, 0x61, 0xba, 0x0e,
+ 0xa7, 0xd0, 0xce, 0xcc, 0x9f, 0xc0, 0x39, 0x8b,
+ 0x3f, 0x2f, 0x32, 0x6c, 0x92, 0x80, 0x28, 0x8d,
+ 0x71, 0xce, 0x72, 0x2c, 0x91, 0x8d, 0x49, 0x96,
+ 0x68, 0x9c, 0xb9, 0xaa, 0xf1, 0x59, 0xf5, 0xa4,
+ 0x49, 0xc9, 0xd1, 0xf5, 0xfb, 0xf7, 0xe0, 0x02,
+ 0xfc, 0x8b, 0xed, 0x07, 0x4d, 0xe1, 0x32, 0x85,
+ 0x2b, 0x3b, 0xe2, 0x9b, 0xfd, 0x00, 0x83, 0x90,
+ 0xec, 0xfc
+ };
+ static std::string decompressed = util::decompress(std::string(reinterpret_cast<const char*>(compressed), sizeof(compressed)));
+ return decompressed.c_str();
+}();
+const char* fill::fragmentSource = [] () {
+ static const uint8_t compressed[] = {
+ 0x78, 0xda, 0x75, 0x8f, 0x4f, 0x0b, 0x82, 0x40,
+ 0x14, 0xc4, 0xef, 0xef, 0x53, 0x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x09, 0xb6, 0x4b, 0x7b, 0xe7, 0xf9, 0x7d,
+ 0x71, 0x5d, 0xdf, 0x9c, 0x8c, 0xc6, 0x83, 0x86,
+ 0x72, 0x87, 0x07, 0x0d, 0x6b, 0x96, 0x59
+ };
+ static std::string decompressed = util::decompress(std::string(reinterpret_cast<const char*>(compressed), sizeof(compressed)));
+ return decompressed.c_str();
+}();
} // namespace shaders
} // namespace mbgl