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