add motion vectors to all shaders
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / water_fast.fs
index 2919e09ea415db95eab4e2a55b0983d44868e4c6..821e47f9269bbae32acf186f2b88238f210042b1 100644 (file)
@@ -1,5 +1,3 @@
-out vec4 FragColor;
-
 uniform sampler2D uTexDudv;
 
 uniform float uTime;
@@ -16,6 +14,7 @@ in vec3 aCo;
 in vec3 aWorldCo;
 
 #include "common_world.glsl"
+#include "motion_vectors_fs.glsl"
 
 vec4 water_surf( vec3 halfview, vec3 vnorm, float depthvalue )
 {
@@ -32,6 +31,8 @@ vec4 water_surf( vec3 halfview, vec3 vnorm, float depthvalue )
 
 void main()
 {
+   compute_motion_vectors();
+
    // Surface colour composite
    float depthvalue = clamp( -world_depth_sample( aCo )*(1.0/25.0), 0.0, 1.0 );
 
@@ -56,5 +57,5 @@ void main()
    // Composite
    vec4 vsurface = water_surf( halfview, surfnorm, depthvalue );
    vsurface.a -= fdist;
-   FragColor = mix( vsurface, vec4(1.0,1.0,1.0,0.5), fband );
+   oColour = mix( vsurface, vec4(1.0,1.0,1.0,0.5), fband );
 }