water fog material prop; ragdoll float only on drowned
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / motion_vectors_fs.glsl
index e6d2759fc0df013159701b1f8c82d84a450f8ec6..315416bdd49d68d838e41c89835aec15ff91ee13 100644 (file)
@@ -1,3 +1,5 @@
+#include "motion_vectors_common.glsl"
+
 layout (location = 1) out vec2 oMotionVec;
 
 in vec3 aMotionVec0;
@@ -8,5 +10,6 @@ void compute_motion_vectors()
    // 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);
 }