projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add motion vectors to all shaders
[carveJwlIkooP6JGAAIwe30JlM.git]
/
shaders
/
water_fast.fs
diff --git
a/shaders/water_fast.fs
b/shaders/water_fast.fs
index 2919e09ea415db95eab4e2a55b0983d44868e4c6..821e47f9269bbae32acf186f2b88238f210042b1 100644
(file)
--- a/
shaders/water_fast.fs
+++ b/
shaders/water_fast.fs
@@
-1,5
+1,3
@@
-out vec4 FragColor;
-
uniform sampler2D uTexDudv;
uniform float uTime;
uniform sampler2D uTexDudv;
uniform float uTime;
@@
-16,6
+14,7
@@
in vec3 aCo;
in vec3 aWorldCo;
#include "common_world.glsl"
in vec3 aWorldCo;
#include "common_world.glsl"
+#include "motion_vectors_fs.glsl"
vec4 water_surf( vec3 halfview, vec3 vnorm, float depthvalue )
{
vec4 water_surf( vec3 halfview, vec3 vnorm, float depthvalue )
{
@@
-32,6
+31,8
@@
vec4 water_surf( vec3 halfview, vec3 vnorm, float depthvalue )
void main()
{
void main()
{
+ compute_motion_vectors();
+
// Surface colour composite
float depthvalue = clamp( -world_depth_sample( aCo )*(1.0/25.0), 0.0, 1.0 );
// 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;
// Composite
vec4 vsurface = water_surf( halfview, surfnorm, depthvalue );
vsurface.a -= fdist;
-
FragColo
r = mix( vsurface, vec4(1.0,1.0,1.0,0.5), fband );
+
oColou
r = mix( vsurface, vec4(1.0,1.0,1.0,0.5), fband );
}
}