projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
now we're doing a bunch of them
[carveJwlIkooP6JGAAIwe30JlM.git]
/
shaders
/
scene_water.fs
diff --git
a/shaders/scene_water.fs
b/shaders/scene_water.fs
index 645569900d14dd1ab6fb6d016584730f196c470f..892f0db6132e6d6d53186fc4560ca2f602d7a7ef 100644
(file)
--- a/
shaders/scene_water.fs
+++ b/
shaders/scene_water.fs
@@
-12,12
+12,6
@@
uniform vec3 uBoard1;
uniform vec3 uShoreColour;
uniform vec3 uOceanColour;
uniform vec3 uShoreColour;
uniform vec3 uOceanColour;
-in vec2 aUv;
-in vec4 aNorm;
-in vec3 aCo;
-in vec3 aWorldCo;
-flat in ivec4 aLights;
-
#include "common_scene.glsl"
#include "motion_vectors_fs.glsl"
#include "common_scene.glsl"
#include "motion_vectors_fs.glsl"
@@
-33,7
+27,7
@@
vec4 water_surf( vec3 halfview, vec3 vnorm, float depthvalue,
float spec = pow(max(dot(halfview,specdir),0.0),20.0)*0.3;
// Depth
float spec = pow(max(dot(halfview,specdir),0.0),20.0)*0.3;
// Depth
- float depthblend = pow( beneath.
a,
0.8 );
+ float depthblend = pow( beneath.
r,
0.8 );
// Composite
vec3 vsurface = mix(surface_tint, above.rgb, ffresnel );
// Composite
vec3 vsurface = mix(surface_tint, above.rgb, ffresnel );
@@
-50,7
+44,7
@@
void main()
vec2 ssuv = gl_FragCoord.xy*uInvRes;
// Surface colour composite
vec2 ssuv = gl_FragCoord.xy*uInvRes;
// Surface colour composite
- float depthvalue = clamp( -world_
depth_sample
( aCo )*(1.0/25.0), 0.0, 1.0 );
+ float depthvalue = clamp( -world_
water_depth
( aCo )*(1.0/25.0), 0.0, 1.0 );
vec2 world_coord = aCo.xz * 0.008;
vec4 time_offsets = vec4( uTime ) * vec4( 0.008, 0.006, 0.003, 0.03 );
vec2 world_coord = aCo.xz * 0.008;
vec4 time_offsets = vec4( uTime ) * vec4( 0.008, 0.006, 0.003, 0.03 );