water fog material prop; ragdoll float only on drowned
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / motion_vectors_vs.glsl
index 25c176d614263dc6dd8a824e3ba50f5afda00f54..492f7a4814218fdcf3d08546e48a4bcf777b75a9 100644 (file)
@@ -1,8 +1,14 @@
+#include "motion_vectors_common.glsl"
+
 out vec3 aMotionVec0;
 out vec3 aMotionVec1;
 
 void vs_motion_out( vec4 vproj0, vec4 vproj1 )
 {
+   // This magically solves some artifacting errors!
+   //
+   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 );
 }