X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Fscene_water.fs;h=22aa665e3f5e00885e99976b9d0931f2efe243de;hb=74b2136d5b41b18e2eec698f1fd11b503aa1100a;hp=892f0db6132e6d6d53186fc4560ca2f602d7a7ef;hpb=409edea2cf6271956137918e4e0b4f1c2addf620;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/scene_water.fs b/shaders/scene_water.fs index 892f0db..22aa665 100644 --- a/shaders/scene_water.fs +++ b/shaders/scene_water.fs @@ -44,7 +44,7 @@ void main() vec2 ssuv = gl_FragCoord.xy*uInvRes; // Surface colour composite - float depthvalue = clamp( -world_water_depth( 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 ); @@ -72,4 +72,5 @@ void main() 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 ); }