summaryrefslogtreecommitdiff
path: root/src/shaders/land.vert
diff options
context:
space:
mode:
Diffstat (limited to 'src/shaders/land.vert')
-rw-r--r--src/shaders/land.vert14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/shaders/land.vert b/src/shaders/land.vert
new file mode 100644
index 0000000..2004ab3
--- /dev/null
+++ b/src/shaders/land.vert
@@ -0,0 +1,14 @@
+precision highp float;
+attribute vec3 land;
+uniform float time; //used for noise
+uniform float world_x;
+uniform float world_y;
+uniform mat4 MV;
+uniform mat4 P;
+varying vec2 worldxy;
+varying mat4 pre;
+void main() {
+ worldxy = vec2(world_x, world_y);
+ pre = P * MV;
+ gl_Position = P * MV * vec4(land.x - world_x, land.y - world_y, 0., 1.0);
+}