summaryrefslogtreecommitdiff
path: root/src/shaders/land.vert
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2025-01-21 16:02:51 -0600
committerAlexander M Pickering <alex@cogarr.net>2025-01-21 16:02:51 -0600
commit0370d64b3bd7914be55358817e52bbc8a529a7d3 (patch)
treea717bb9582f8a4c8dc7caf0d455e25113c7b8704 /src/shaders/land.vert
parentda9dd31f504d30f33922cdf362a7c01673a6b927 (diff)
downloadggj25-0370d64b3bd7914be55358817e52bbc8a529a7d3.tar.gz
ggj25-0370d64b3bd7914be55358817e52bbc8a529a7d3.tar.bz2
ggj25-0370d64b3bd7914be55358817e52bbc8a529a7d3.zip
work
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);
+}