mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Better water transparency
This commit is contained in:
parent
fd2c9e8cde
commit
9d48cc8fb7
@ -128,7 +128,7 @@ void main() {
|
||||
// 0 = 100% reflection, 1 = translucent water
|
||||
float passthrough = pow(dot(faceforward(f_norm, f_norm, cam_to_frag), -cam_to_frag), 0.5);
|
||||
|
||||
vec4 color = mix(vec4(reflect_color * 2.0, 1.0), vec4(surf_color, 4.0 / (1.0 + diffuse_light * 2.0)), passthrough);
|
||||
vec4 color = mix(vec4(reflect_color * 2.0, 1.0), vec4(surf_color, 4.0 / (4.0 + diffuse_light * 1.0)), passthrough);
|
||||
|
||||
tgt_color = mix(color, vec4(fog_color, 0.0), fog_level);
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ vec3 get_sky_color(vec3 dir, float time_of_day, vec3 f_pos, float quality, bool
|
||||
vec4 clouds = get_cloud_color(dir, time_of_day, f_dist, quality);
|
||||
clouds.rgb *= get_sun_brightness(sun_dir) * (sun_halo * 2.5 + get_sun_color(sun_dir)) + get_moon_brightness(moon_dir) * (moon_halo * 20.5 + get_moon_color(moon_dir));
|
||||
|
||||
if (f_dist > 1000.0) {
|
||||
if (f_dist > 5000.0) {
|
||||
sky_color += sun_light + moon_light;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user