df shadows
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / water_fast.fs
index 2919e09ea415db95eab4e2a55b0983d44868e4c6..5f68c452dc363c26e8768277094c6e60e32d5e34 100644 (file)
@@ -1,10 +1,10 @@
-out vec4 FragColor;
-
 uniform sampler2D uTexDudv;
 
 uniform float uTime;
 uniform vec3 uCamera;
 uniform float uSurfaceY;
+uniform vec3 uBoard0;
+uniform vec3 uBoard1;
 
 uniform vec3 uShoreColour;
 uniform vec3 uOceanColour;
@@ -16,6 +16,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 +33,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 +59,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 );
 }