projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix null reference
[carveJwlIkooP6JGAAIwe30JlM.git]
/
shaders
/
motion_vectors_fs.glsl
diff --git
a/shaders/motion_vectors_fs.glsl
b/shaders/motion_vectors_fs.glsl
index e6d2759fc0df013159701b1f8c82d84a450f8ec6..315416bdd49d68d838e41c89835aec15ff91ee13 100644
(file)
--- a/
shaders/motion_vectors_fs.glsl
+++ b/
shaders/motion_vectors_fs.glsl
@@
-1,3
+1,5
@@
+#include "motion_vectors_common.glsl"
+
layout (location = 1) out vec2 oMotionVec;
in vec3 aMotionVec0;
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;
// 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);
}
}