"\n"
"#line 2 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"out vec3 aMotionVec0;\n"
"out vec3 aMotionVec1;\n"
"\n"
"void vs_motion_out( vec4 vproj0, vec4 vproj1 )\n"
"{\n"
+" vproj1 = vproj0*(1.0-k_motion_lerp_amount) + vproj1*k_motion_lerp_amount;\n"
+"\n"
" aMotionVec0 = vec3( vproj0.xy, vproj0.w );\n"
" aMotionVec1 = vec3( vproj1.xy, vproj1.w );\n"
"}\n"
"\n"
"#line 13 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"layout (location = 1) out vec2 oMotionVec;\n"
"\n"
"in vec3 aMotionVec0;\n"
" // Write motion vectors\n"
" vec2 vmotion0 = aMotionVec0.xy / aMotionVec0.z;\n"
" vec2 vmotion1 = aMotionVec1.xy / aMotionVec1.z;\n"
-" oMotionVec = vmotion1-vmotion0;\n"
+"\n"
+" oMotionVec = (vmotion1-vmotion0) * (1.0/k_motion_lerp_amount);\n"
"}\n"
"\n"
"#line 14 0 \n"
"\n"
"#line 2 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"out vec3 aMotionVec0;\n"
"out vec3 aMotionVec1;\n"
"\n"
"void vs_motion_out( vec4 vproj0, vec4 vproj1 )\n"
"{\n"
+" vproj1 = vproj0*(1.0-k_motion_lerp_amount) + vproj1*k_motion_lerp_amount;\n"
+"\n"
" aMotionVec0 = vec3( vproj0.xy, vproj0.w );\n"
" aMotionVec1 = vec3( vproj1.xy, vproj1.w );\n"
"}\n"
"\n"
"#line 2 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"out vec3 aMotionVec0;\n"
"out vec3 aMotionVec1;\n"
"\n"
"void vs_motion_out( vec4 vproj0, vec4 vproj1 )\n"
"{\n"
+" vproj1 = vproj0*(1.0-k_motion_lerp_amount) + vproj1*k_motion_lerp_amount;\n"
+"\n"
" aMotionVec0 = vec3( vproj0.xy, vproj0.w );\n"
" aMotionVec1 = vec3( vproj1.xy, vproj1.w );\n"
"}\n"
--- /dev/null
+const float k_motion_lerp_amount = 0.05;
+#include "motion_vectors_common.glsl"
+
layout (location = 1) out vec2 oMotionVec;
in vec3 aMotionVec0;
// Write motion vectors
vec2 vmotion0 = aMotionVec0.xy / aMotionVec0.z;
vec2 vmotion1 = aMotionVec1.xy / aMotionVec1.z;
- oMotionVec = vmotion1-vmotion0;
+
+ oMotionVec = (vmotion1-vmotion0) * (1.0/k_motion_lerp_amount);
}
+#include "motion_vectors_common.glsl"
+
out vec3 aMotionVec0;
out vec3 aMotionVec1;
void vs_motion_out( vec4 vproj0, vec4 vproj1 )
{
+ vproj1 = vproj0*(1.0-k_motion_lerp_amount) + vproj1*k_motion_lerp_amount;
+
aMotionVec0 = vec3( vproj0.xy, vproj0.w );
aMotionVec1 = vec3( vproj1.xy, vproj1.w );
}
"\n"
"#line 2 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"out vec3 aMotionVec0;\n"
"out vec3 aMotionVec1;\n"
"\n"
"void vs_motion_out( vec4 vproj0, vec4 vproj1 )\n"
"{\n"
+" vproj1 = vproj0*(1.0-k_motion_lerp_amount) + vproj1*k_motion_lerp_amount;\n"
+"\n"
" aMotionVec0 = vec3( vproj0.xy, vproj0.w );\n"
" aMotionVec1 = vec3( vproj1.xy, vproj1.w );\n"
"}\n"
"\n"
"#line 13 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"layout (location = 1) out vec2 oMotionVec;\n"
"\n"
"in vec3 aMotionVec0;\n"
" // Write motion vectors\n"
" vec2 vmotion0 = aMotionVec0.xy / aMotionVec0.z;\n"
" vec2 vmotion1 = aMotionVec1.xy / aMotionVec1.z;\n"
-" oMotionVec = vmotion1-vmotion0;\n"
+"\n"
+" oMotionVec = (vmotion1-vmotion0) * (1.0/k_motion_lerp_amount);\n"
"}\n"
"\n"
"#line 14 0 \n"
"\n"
"#line 2 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"out vec3 aMotionVec0;\n"
"out vec3 aMotionVec1;\n"
"\n"
"void vs_motion_out( vec4 vproj0, vec4 vproj1 )\n"
"{\n"
+" vproj1 = vproj0*(1.0-k_motion_lerp_amount) + vproj1*k_motion_lerp_amount;\n"
+"\n"
" aMotionVec0 = vec3( vproj0.xy, vproj0.w );\n"
" aMotionVec1 = vec3( vproj1.xy, vproj1.w );\n"
"}\n"
"\n"
"#line 12 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"layout (location = 1) out vec2 oMotionVec;\n"
"\n"
"in vec3 aMotionVec0;\n"
" // Write motion vectors\n"
" vec2 vmotion0 = aMotionVec0.xy / aMotionVec0.z;\n"
" vec2 vmotion1 = aMotionVec1.xy / aMotionVec1.z;\n"
-" oMotionVec = vmotion1-vmotion0;\n"
+"\n"
+" oMotionVec = (vmotion1-vmotion0) * (1.0/k_motion_lerp_amount);\n"
"}\n"
"\n"
"#line 13 0 \n"
"\n"
"#line 2 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"out vec3 aMotionVec0;\n"
"out vec3 aMotionVec1;\n"
"\n"
"void vs_motion_out( vec4 vproj0, vec4 vproj1 )\n"
"{\n"
+" vproj1 = vproj0*(1.0-k_motion_lerp_amount) + vproj1*k_motion_lerp_amount;\n"
+"\n"
" aMotionVec0 = vec3( vproj0.xy, vproj0.w );\n"
" aMotionVec1 = vec3( vproj1.xy, vproj1.w );\n"
"}\n"
"in vec3 aCo;\n"
"\n"
"#line 1 1 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"layout (location = 1) out vec2 oMotionVec;\n"
"\n"
"in vec3 aMotionVec0;\n"
" // Write motion vectors\n"
" vec2 vmotion0 = aMotionVec0.xy / aMotionVec0.z;\n"
" vec2 vmotion1 = aMotionVec1.xy / aMotionVec1.z;\n"
-" oMotionVec = vmotion1-vmotion0;\n"
+"\n"
+" oMotionVec = (vmotion1-vmotion0) * (1.0/k_motion_lerp_amount);\n"
"}\n"
"\n"
"#line 13 0 \n"
"\n"
"#line 2 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"out vec3 aMotionVec0;\n"
"out vec3 aMotionVec1;\n"
"\n"
"void vs_motion_out( vec4 vproj0, vec4 vproj1 )\n"
"{\n"
+" vproj1 = vproj0*(1.0-k_motion_lerp_amount) + vproj1*k_motion_lerp_amount;\n"
+"\n"
" aMotionVec0 = vec3( vproj0.xy, vproj0.w );\n"
" aMotionVec1 = vec3( vproj1.xy, vproj1.w );\n"
"}\n"
"\n"
"#line 13 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"layout (location = 1) out vec2 oMotionVec;\n"
"\n"
"in vec3 aMotionVec0;\n"
" // Write motion vectors\n"
" vec2 vmotion0 = aMotionVec0.xy / aMotionVec0.z;\n"
" vec2 vmotion1 = aMotionVec1.xy / aMotionVec1.z;\n"
-" oMotionVec = vmotion1-vmotion0;\n"
+"\n"
+" oMotionVec = (vmotion1-vmotion0) * (1.0/k_motion_lerp_amount);\n"
"}\n"
"\n"
"#line 14 0 \n"
"\n"
"#line 2 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"out vec3 aMotionVec0;\n"
"out vec3 aMotionVec1;\n"
"\n"
"void vs_motion_out( vec4 vproj0, vec4 vproj1 )\n"
"{\n"
+" vproj1 = vproj0*(1.0-k_motion_lerp_amount) + vproj1*k_motion_lerp_amount;\n"
+"\n"
" aMotionVec0 = vec3( vproj0.xy, vproj0.w );\n"
" aMotionVec1 = vec3( vproj1.xy, vproj1.w );\n"
"}\n"
"\n"
"#line 14 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"layout (location = 1) out vec2 oMotionVec;\n"
"\n"
"in vec3 aMotionVec0;\n"
" // Write motion vectors\n"
" vec2 vmotion0 = aMotionVec0.xy / aMotionVec0.z;\n"
" vec2 vmotion1 = aMotionVec1.xy / aMotionVec1.z;\n"
-" oMotionVec = vmotion1-vmotion0;\n"
+"\n"
+" oMotionVec = (vmotion1-vmotion0) * (1.0/k_motion_lerp_amount);\n"
"}\n"
"\n"
"#line 15 0 \n"
"\n"
"#line 2 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"out vec3 aMotionVec0;\n"
"out vec3 aMotionVec1;\n"
"\n"
"void vs_motion_out( vec4 vproj0, vec4 vproj1 )\n"
"{\n"
+" vproj1 = vproj0*(1.0-k_motion_lerp_amount) + vproj1*k_motion_lerp_amount;\n"
+"\n"
" aMotionVec0 = vec3( vproj0.xy, vproj0.w );\n"
" aMotionVec1 = vec3( vproj1.xy, vproj1.w );\n"
"}\n"
"\n"
"#line 12 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"layout (location = 1) out vec2 oMotionVec;\n"
"\n"
"in vec3 aMotionVec0;\n"
" // Write motion vectors\n"
" vec2 vmotion0 = aMotionVec0.xy / aMotionVec0.z;\n"
" vec2 vmotion1 = aMotionVec1.xy / aMotionVec1.z;\n"
-" oMotionVec = vmotion1-vmotion0;\n"
+"\n"
+" oMotionVec = (vmotion1-vmotion0) * (1.0/k_motion_lerp_amount);\n"
"}\n"
"\n"
"#line 13 0 \n"
"\n"
"#line 2 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"out vec3 aMotionVec0;\n"
"out vec3 aMotionVec1;\n"
"\n"
"void vs_motion_out( vec4 vproj0, vec4 vproj1 )\n"
"{\n"
+" vproj1 = vproj0*(1.0-k_motion_lerp_amount) + vproj1*k_motion_lerp_amount;\n"
+"\n"
" aMotionVec0 = vec3( vproj0.xy, vproj0.w );\n"
" aMotionVec1 = vec3( vproj1.xy, vproj1.w );\n"
"}\n"
"\n"
"#line 11 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"layout (location = 1) out vec2 oMotionVec;\n"
"\n"
"in vec3 aMotionVec0;\n"
" // Write motion vectors\n"
" vec2 vmotion0 = aMotionVec0.xy / aMotionVec0.z;\n"
" vec2 vmotion1 = aMotionVec1.xy / aMotionVec1.z;\n"
-" oMotionVec = vmotion1-vmotion0;\n"
+"\n"
+" oMotionVec = (vmotion1-vmotion0) * (1.0/k_motion_lerp_amount);\n"
"}\n"
"\n"
"#line 12 0 \n"
"\n"
"#line 2 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"out vec3 aMotionVec0;\n"
"out vec3 aMotionVec1;\n"
"\n"
"void vs_motion_out( vec4 vproj0, vec4 vproj1 )\n"
"{\n"
+" vproj1 = vproj0*(1.0-k_motion_lerp_amount) + vproj1*k_motion_lerp_amount;\n"
+"\n"
" aMotionVec0 = vec3( vproj0.xy, vproj0.w );\n"
" aMotionVec1 = vec3( vproj1.xy, vproj1.w );\n"
"}\n"
"\n"
"#line 20 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"layout (location = 1) out vec2 oMotionVec;\n"
"\n"
"in vec3 aMotionVec0;\n"
" // Write motion vectors\n"
" vec2 vmotion0 = aMotionVec0.xy / aMotionVec0.z;\n"
" vec2 vmotion1 = aMotionVec1.xy / aMotionVec1.z;\n"
-" oMotionVec = vmotion1-vmotion0;\n"
+"\n"
+" oMotionVec = (vmotion1-vmotion0) * (1.0/k_motion_lerp_amount);\n"
"}\n"
"\n"
"#line 21 0 \n"
"\n"
"#line 2 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"out vec3 aMotionVec0;\n"
"out vec3 aMotionVec1;\n"
"\n"
"void vs_motion_out( vec4 vproj0, vec4 vproj1 )\n"
"{\n"
+" vproj1 = vproj0*(1.0-k_motion_lerp_amount) + vproj1*k_motion_lerp_amount;\n"
+"\n"
" aMotionVec0 = vec3( vproj0.xy, vproj0.w );\n"
" aMotionVec1 = vec3( vproj1.xy, vproj1.w );\n"
"}\n"
"\n"
"#line 17 0 \n"
"#line 1 2 \n"
+"const float k_motion_lerp_amount = 0.05;\n"
+"\n"
+"#line 2 0 \n"
+"\n"
"layout (location = 1) out vec2 oMotionVec;\n"
"\n"
"in vec3 aMotionVec0;\n"
" // Write motion vectors\n"
" vec2 vmotion0 = aMotionVec0.xy / aMotionVec0.z;\n"
" vec2 vmotion1 = aMotionVec1.xy / aMotionVec1.z;\n"
-" oMotionVec = vmotion1-vmotion0;\n"
+"\n"
+" oMotionVec = (vmotion1-vmotion0) * (1.0/k_motion_lerp_amount);\n"
"}\n"
"\n"
"#line 18 0 \n"