summaryrefslogtreecommitdiff
path: root/src/mbgl/shader/raster.vertex.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/shader/raster.vertex.glsl')
-rw-r--r--src/mbgl/shader/raster.vertex.glsl13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mbgl/shader/raster.vertex.glsl b/src/mbgl/shader/raster.vertex.glsl
new file mode 100644
index 0000000000..97e563f585
--- /dev/null
+++ b/src/mbgl/shader/raster.vertex.glsl
@@ -0,0 +1,13 @@
+uniform mat4 u_matrix;
+uniform float u_buffer;
+
+attribute vec2 a_pos;
+
+varying vec2 v_pos;
+
+
+void main() {
+ gl_Position = u_matrix * vec4(a_pos, 0, 1);
+ float dimension = (4096.0 + 2.0 * u_buffer);
+ v_pos = (a_pos / dimension) + (u_buffer / dimension);
+}