Move GLSL shaders to external files and use include_str!() to load them.
[mandelwow.git] / mandelwow.vert
diff --git a/mandelwow.vert b/mandelwow.vert
new file mode 100644 (file)
index 0000000..9c3e5f8
--- /dev/null
@@ -0,0 +1,15 @@
+#version 140
+uniform mat4 perspective;
+uniform mat4 view;
+uniform mat4 model;
+uniform vec2 z0;
+in vec3 position;
+out vec2 c;
+out vec2 z;
+
+void main() {
+    mat4 modelview = view * model;
+    gl_Position = perspective * modelview * vec4(position, 1.0);
+    c = vec2(position.x, position.y);
+    z = vec2(z0.x, z0.y);
+}