X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Fwater_fast.fs;h=821e47f9269bbae32acf186f2b88238f210042b1;hb=1142fd5c27cf6d5bef073969b55e20b160646164;hp=2919e09ea415db95eab4e2a55b0983d44868e4c6;hpb=37d87919a54110cf7964bd1843fc69bda12d32d7;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/water_fast.fs b/shaders/water_fast.fs index 2919e09..821e47f 100644 --- a/shaders/water_fast.fs +++ b/shaders/water_fast.fs @@ -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 ); }