diff options
author | Lauren Budorick <lauren@mapbox.com> | 2018-01-09 15:02:49 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-09 15:02:49 -0800 |
commit | 43a9bd3fbab666f21583ff264d6b6ba1d7069374 (patch) | |
tree | a5e1d09f6113ac9b5b1d7d313a96563e1f1d7374 /src/mbgl/shaders/background.cpp | |
parent | 966606a1075bc1717db145f2fa677b0de8093ce9 (diff) | |
download | qtlocation-mapboxgl-43a9bd3fbab666f21583ff264d6b6ba1d7069374.tar.gz |
[core] Use separate shaders for background and clipping
Diffstat (limited to 'src/mbgl/shaders/background.cpp')
-rw-r--r-- | src/mbgl/shaders/background.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/mbgl/shaders/background.cpp b/src/mbgl/shaders/background.cpp new file mode 100644 index 0000000000..3eafa47b49 --- /dev/null +++ b/src/mbgl/shaders/background.cpp @@ -0,0 +1,34 @@ +// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED. + +#include <mbgl/shaders/background.hpp> + +namespace mbgl { +namespace shaders { + +const char* background::name = "background"; +const char* background::vertexSource = R"MBGL_SHADER( +attribute vec2 a_pos; + +uniform mat4 u_matrix; + +void main() { + gl_Position = u_matrix * vec4(a_pos, 0, 1); +} + +)MBGL_SHADER"; +const char* background::fragmentSource = R"MBGL_SHADER( +uniform vec4 u_color; +uniform float u_opacity; + +void main() { + gl_FragColor = u_color * u_opacity; + +#ifdef OVERDRAW_INSPECTOR + gl_FragColor = vec4(1.0); +#endif +} + +)MBGL_SHADER"; + +} // namespace shaders +} // namespace mbgl |