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"
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 );
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 );
vec4 vsurface = water_surf( halfview, surfnorm, depthvalue, beneath, above );
vsurface.a -= fdist;
oColour = mix( vsurface, vec4(1.0,1.0,1.0,0.5), fband );
+ oColour.rgb = scene_compute_lighting( oColour.rgb, aNorm.xyz, aWorldCo );
}