|
|
@@ -197,10 +197,10 @@ class Water extends Mesh {
|
|
|
vec3 reflectionSample = vec3( texture2D( mirrorSampler, mirrorCoord.xy / mirrorCoord.w + distortion ) );
|
|
|
|
|
|
float theta = max( dot( eyeDirection, surfaceNormal ), 0.0 );
|
|
|
- float rf0 = 0.3;
|
|
|
+ float rf0 = 0.02;
|
|
|
float reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 );
|
|
|
vec3 scatter = max( 0.0, dot( surfaceNormal, eyeDirection ) ) * waterColor;
|
|
|
- vec3 albedo = mix( ( sunColor * diffuseLight * 0.3 + scatter ) * getShadowMask(), ( vec3( 0.1 ) + reflectionSample * 0.9 + reflectionSample * specularLight ), reflectance);
|
|
|
+ vec3 albedo = mix( ( sunColor * diffuseLight * 0.3 + scatter ) * getShadowMask(), reflectionSample + specularLight, reflectance );
|
|
|
vec3 outgoingLight = albedo;
|
|
|
gl_FragColor = vec4( outgoingLight, alpha );
|
|
|
|