poll functions
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / menu.h
index 2a14ac1921673ce3a5e09f48d2a644b44961eb5d..3bf0d1ff357744da0de0cea795e0aba7d7a0fe80 100644 (file)
@@ -17,11 +17,19 @@ static struct vg_shader _shader_menu = {
 "\n"
 "#line      2        0 \n"
 "#line       1        2 \n"
+"const float k_motion_lerp_amount = 0.01;\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"
+"   // This magically solves some artifacting errors!\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"