+" \n"
+" // Surface colour composite\n"
+" float depthvalue = texture( uTexDepth, aUv.zw ).r;\n"
+"\n"
+" vec3 colour_shore = vec3( 0.21, 0.6, 0.8 );\n"
+" vec3 colour_ocean = vec3( 0.01, 0.1, 0.2 );\n"
+" vec3 surface_tint = mix(colour_shore, colour_ocean, pow(depthvalue,1.8))*1.5;\n"
+" \n"
+" // Foam\n"
+" float fband = fract( aCo.z*0.1+uTime*0.1-depthvalue*10.0 );\n"
+" fband = step( fband+dudvb.g*0.8, 0.5 ) * max((1.0-depthvalue*4.0),0.0);\n"
+"\n"
+" // Lighting\n"
+" vec3 surfnorm = vec3(distortamt.x,1.0,distortamt.y);\n"
+" \n"
+" vec3 halfview = -normalize( aCo-uCamera );\n"
+" float ffresnel = pow(1.0-dot( surfnorm, halfview ),5.0);\n"
+"\n"
+" vec3 lightdir = vec3(0.95,0.0,-0.3);\n"
+" vec3 specdir = reflect( -lightdir, surfnorm );\n"
+" float spec = pow(max(dot(halfview,specdir),0.0),20.0)*0.3;\n"
+" \n"
+" // Depth \n"
+" vec4 backsample = texture( uTexBack, ssuv+distortamt*0.1 );\n"
+" float depthblend = pow(backsample.a,0.8);\n"
+"\n"
+" // Composite\n"
+" vec3 vsurface = mix(surface_tint*backsample.rgb, reflected.rgb, ffresnel );\n"
+" vsurface += spec;\n"
+" \n"
+" FragColor = mix( vec4(vsurface,depthblend), vec4(1.0,1.0,1.0,0.8), fband );\n"