From f7a69d15ab1f43598caaa9498cc7e8aa7a11af0c Mon Sep 17 00:00:00 2001 From: Chris Loer Date: Wed, 19 Sep 2018 13:21:02 -0700 Subject: [docs] Include uncompressed shader source in .cpp comments This is meant to (1) Make it easier for new developers to find the source (2) Make it easier to look at shader diffs when the GL JS pin changes --- src/mbgl/shaders/background.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/mbgl/shaders/background.cpp') diff --git a/src/mbgl/shaders/background.cpp b/src/mbgl/shaders/background.cpp index f03e58b577..0c765baa55 100644 --- a/src/mbgl/shaders/background.cpp +++ b/src/mbgl/shaders/background.cpp @@ -10,5 +10,32 @@ const char* background::name = "background"; const char* background::vertexSource = source() + 2739; const char* background::fragmentSource = source() + 2851; +// Uncompressed source of background.vertex.glsl: +/* +attribute vec2 a_pos; + +uniform mat4 u_matrix; + +void main() { + gl_Position = u_matrix * vec4(a_pos, 0, 1); +} + +*/ + +// Uncompressed source of background.fragment.glsl: +/* +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 +} + +*/ + } // namespace shaders } // namespace mbgl -- cgit v1.2.1