Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
39 lines
906 B
C++
39 lines
906 B
C++
// Generated code, do not modify this file!
|
|
#pragma once
|
|
#include <mbgl/shaders/shader_source.hpp>
|
|
|
|
namespace mbgl {
|
|
namespace shaders {
|
|
|
|
template <>
|
|
struct ShaderSource<BuiltIn::BackgroundShader, gfx::Backend::Type::OpenGL> {
|
|
static constexpr const char* name = "BackgroundShader";
|
|
static constexpr const char* vertex = R"(layout (location = 0) in vec2 a_pos;
|
|
layout (std140) uniform BackgroundDrawableUBO {
|
|
highp mat4 u_matrix;
|
|
};
|
|
|
|
void main() {
|
|
gl_Position = u_matrix * vec4(a_pos, 0, 1);
|
|
}
|
|
)";
|
|
static constexpr const char* fragment = R"(layout (std140) uniform BackgroundPropsUBO {
|
|
highp vec4 u_color;
|
|
highp float u_opacity;
|
|
lowp float props_pad1;
|
|
lowp float props_pad2;
|
|
lowp float props_pad3;
|
|
};
|
|
|
|
void main() {
|
|
fragColor = u_color * u_opacity;
|
|
#ifdef OVERDRAW_INSPECTOR
|
|
fragColor = vec4(1.0);
|
|
#endif
|
|
}
|
|
)";
|
|
};
|
|
|
|
} // namespace shaders
|
|
} // namespace mbgl
|