actually render trails
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / trail.vs
diff --git a/shaders/trail.vs b/shaders/trail.vs
new file mode 100644 (file)
index 0000000..827d160
--- /dev/null
@@ -0,0 +1,17 @@
+layout (location=0) in vec4 a_co;
+
+#include "motion_vectors_vs.glsl"
+
+uniform mat4 uPv;
+uniform mat4 uPvPrev;
+
+out float aAlpha;
+
+void main(){
+   vec4 vproj0     = uPv     * vec4( a_co.xyz, 1.0 );
+   vec4 vproj1     = uPvPrev * vec4( a_co.xyz, 1.0 );
+   vs_motion_out( vproj0, vproj1 );
+
+   gl_Position = vproj0;
+   aAlpha = a_co.w;
+}