diff options
Diffstat (limited to 'src/mbgl/shaders/extrusion_texture.cpp')
-rw-r--r-- | src/mbgl/shaders/extrusion_texture.cpp | 83 |
1 files changed, 55 insertions, 28 deletions
diff --git a/src/mbgl/shaders/extrusion_texture.cpp b/src/mbgl/shaders/extrusion_texture.cpp index c756db181c..2a9b0909af 100644 --- a/src/mbgl/shaders/extrusion_texture.cpp +++ b/src/mbgl/shaders/extrusion_texture.cpp @@ -1,39 +1,66 @@ // NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED. #include <mbgl/shaders/extrusion_texture.hpp> +#include <mbgl/util/compression.hpp> + +#include <cstdint> namespace mbgl { namespace shaders { const char* extrusion_texture::name = "extrusion_texture"; -const char* extrusion_texture::vertexSource = R"MBGL_SHADER( -uniform mat4 u_matrix; -uniform vec2 u_world; -attribute vec2 a_pos; -varying vec2 v_pos; - -void main() { - gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1); - - v_pos.x = a_pos.x; - v_pos.y = 1.0 - a_pos.y; -} - -)MBGL_SHADER"; -const char* extrusion_texture::fragmentSource = R"MBGL_SHADER( -uniform sampler2D u_image; -uniform float u_opacity; -varying vec2 v_pos; - -void main() { - gl_FragColor = texture2D(u_image, v_pos) * u_opacity; - -#ifdef OVERDRAW_INSPECTOR - gl_FragColor = vec4(0.0); -#endif -} - -)MBGL_SHADER"; +const char* extrusion_texture::vertexSource = [] () { + static const uint8_t compressed[] = { + 0x78, 0xda, 0x4d, 0x8d, 0x41, 0x0a, 0x83, 0x30, + 0x10, 0x45, 0xf7, 0x73, 0x8a, 0x59, 0x6a, 0xb1, + 0xa2, 0xc5, 0x5d, 0xe8, 0x1d, 0x7a, 0x83, 0x90, + 0x56, 0x2b, 0x03, 0x9a, 0x94, 0x98, 0x44, 0x43, + 0xe9, 0xdd, 0x3b, 0x9a, 0x50, 0x3a, 0x9b, 0x99, + 0x79, 0x9f, 0xff, 0xbf, 0xd7, 0xf4, 0x34, 0x76, + 0xc6, 0x59, 0xb9, 0x0e, 0xbd, 0xe4, 0x65, 0x69, + 0x13, 0xe0, 0x33, 0x0e, 0xc3, 0xe3, 0xc2, 0x78, + 0x35, 0x76, 0xea, 0x05, 0x28, 0xc7, 0xea, 0xdd, + 0xbb, 0x21, 0x71, 0x25, 0x5f, 0x66, 0x11, 0x10, + 0x94, 0x8d, 0xa4, 0xc7, 0xc4, 0x42, 0x62, 0x10, + 0x0c, 0xf5, 0x1c, 0x4a, 0xba, 0x28, 0xf1, 0x0d, + 0xc8, 0x33, 0x4e, 0xf2, 0x66, 0x16, 0x72, 0x64, + 0x34, 0x5e, 0x7f, 0x55, 0x78, 0xda, 0x7d, 0x5d, + 0x71, 0x64, 0xf1, 0x93, 0xbb, 0x2a, 0x6c, 0x2a, + 0x6c, 0x4b, 0x0e, 0xda, 0xad, 0x47, 0x68, 0xbd, + 0xb1, 0x4d, 0xa5, 0x4b, 0xfc, 0xe1, 0xc8, 0xb8, + 0xad, 0x1b, 0x3c, 0x67, 0x31, 0x0a, 0xf8, 0xc0, + 0x17, 0xe6, 0x77, 0x44, 0xb1 + }; + static std::string decompressed = util::decompress(std::string(reinterpret_cast<const char*>(compressed), sizeof(compressed))); + return decompressed.c_str(); +}(); +const char* extrusion_texture::fragmentSource = [] () { + static const uint8_t compressed[] = { + 0x78, 0xda, 0x6d, 0x8e, 0xb1, 0x0a, 0xc2, 0x30, + 0x18, 0x84, 0xf7, 0xff, 0x29, 0x7e, 0xe8, 0xd2, + 0x8a, 0x48, 0x29, 0x6e, 0xc1, 0x41, 0x6c, 0x05, + 0x17, 0x2b, 0x55, 0x74, 0x0c, 0xa1, 0x4d, 0x42, + 0x20, 0x69, 0x4a, 0x9a, 0x04, 0x8b, 0xf8, 0xee, + 0x16, 0xec, 0xe0, 0xe0, 0x8d, 0x77, 0xdc, 0x77, + 0x17, 0x7a, 0x25, 0xac, 0x33, 0x38, 0x32, 0x33, + 0x68, 0xee, 0x8a, 0x12, 0x03, 0x55, 0x86, 0x49, + 0x4e, 0x20, 0x2c, 0x91, 0xd0, 0x96, 0xf9, 0xd9, + 0xb6, 0x03, 0x6b, 0x95, 0x9f, 0x08, 0x44, 0xe6, + 0x26, 0xd5, 0x4b, 0x8c, 0xbc, 0x2d, 0x30, 0xd2, + 0xc1, 0x8e, 0x04, 0x20, 0x5a, 0xd5, 0xa1, 0x61, + 0xaa, 0x4f, 0x33, 0x7c, 0x01, 0xce, 0x92, 0x9a, + 0x1e, 0x1d, 0x93, 0x07, 0xab, 0xad, 0xc3, 0x1d, + 0x7a, 0xfe, 0xf4, 0xc1, 0xf1, 0xa2, 0x4c, 0x97, + 0x85, 0xf5, 0xb7, 0x9b, 0xe1, 0xea, 0x17, 0x0e, + 0x89, 0x12, 0x1d, 0x17, 0x58, 0xdf, 0xab, 0xa6, + 0x6c, 0xf6, 0x0f, 0x7a, 0x3a, 0x5f, 0x2f, 0xd5, + 0xe1, 0x56, 0x37, 0xff, 0xa0, 0xf3, 0x85, 0x6d, + 0x9a, 0x6f, 0xf2, 0x8c, 0x40, 0xc2, 0xfb, 0x4e, + 0x09, 0x78, 0xc3, 0x07, 0x17, 0x5e, 0x44, 0xe1 + }; + static std::string decompressed = util::decompress(std::string(reinterpret_cast<const char*>(compressed), sizeof(compressed))); + return decompressed.c_str(); +}(); } // namespace shaders } // namespace mbgl |