No underwater support
@@ -68,12 +68,6 @@ void main()
vec3 backgroundPos = world_pos_from_depth(viewProjectionInverse, depth, screen_uv);
outColor.rgb = inverse_reinhard_tone_mapping(rgb_from_srgb(texture(colorMap, screen_uv).xyz));
- bool underWater = dot(normal, incidentDir) > 0.1 || dot(normal, incidentDir) > -0.1 && cameraPosition.y < 0.0;
-
- if(underWater)
- {
- outColor.rgb = water(outColor.rgb, cameraPosition, pos);
- } else {
// Compute cosine to the incident angle
float cosAngle = dot(normal, -incidentDir);
@@ -88,7 +82,7 @@ void main()
// Mix refraction and reflection
outColor.rgb = mix(refractColor, reflectColor, fresnel);
- }
+
outColor.rgb = calculate_lighting(cameraPosition, outColor.rgb, pos, normal, metallic, roughness, 1.0);
outColor.rgb = reinhard_tone_mapping(outColor.rgb);
outColor.rgb = srgb_from_rgb(outColor.rgb);
