aboutsummaryrefslogtreecommitdiff
path: root/data/shaders/loop.vert
diff options
context:
space:
mode:
Diffstat (limited to 'data/shaders/loop.vert')
-rw-r--r--data/shaders/loop.vert26
1 files changed, 26 insertions, 0 deletions
diff --git a/data/shaders/loop.vert b/data/shaders/loop.vert
new file mode 100644
index 0000000..853fab6
--- /dev/null
+++ b/data/shaders/loop.vert
@@ -0,0 +1,26 @@
+attribute vec3 position;
+
+uniform mat4 ModelViewProjectionMatrix;
+uniform int VertexLoops;
+
+// Removing this varying causes an inexplicable performance regression
+// with r600g... Keeping it for now.
+varying vec4 dummy;
+
+void main(void)
+{
+ dummy = vec4(1.0);
+
+ float d = fract(position.x);
+
+$MAIN$
+
+ vec4 pos = vec4(position.x,
+ position.y + 0.1 * d * fract(position.x),
+ position.z, 1.0);
+
+ // Transform the position to clip coordinates
+ gl_Position = ModelViewProjectionMatrix * pos;
+}
+
+