mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Better reflections
This commit is contained in:
parent
313527cf46
commit
1f2d56c032
@ -197,7 +197,7 @@ void main() {
|
|||||||
float new_dist = distance(new_wpos, cam_pos.xyz);
|
float new_dist = distance(new_wpos, cam_pos.xyz);
|
||||||
float merge = min(
|
float merge = min(
|
||||||
// Off-screen merge factor
|
// Off-screen merge factor
|
||||||
clamp((1.0 - max(abs(new_uv.y - 0.5), abs(new_uv.x - 0.5)) * 2) * 3.0, 0, 1),
|
clamp((1.0 - max(abs(new_uv.y - 0.5), abs(new_uv.x - 0.5)) * 2) * 8.0, 0, 1),
|
||||||
// Depth merge factor
|
// Depth merge factor
|
||||||
clamp((new_dist - dist * 0.5) / (dist * 0.5), 0.0, 1.0)
|
clamp((new_dist - dist * 0.5) / (dist * 0.5), 0.0, 1.0)
|
||||||
);
|
);
|
||||||
@ -229,7 +229,7 @@ void main() {
|
|||||||
// Apply clouds to reflection
|
// Apply clouds to reflection
|
||||||
refl_col = mix(refl_col, get_cloud_color(refl_col, refl_dir, wpos, time_of_day.x, 100000.0, 1.0), not_underground);
|
refl_col = mix(refl_col, get_cloud_color(refl_col, refl_dir, wpos, time_of_day.x, 100000.0, 1.0), not_underground);
|
||||||
}
|
}
|
||||||
color.rgb = mix(color.rgb, refl_col, min(color.a * 2.0, 0.75));
|
color.rgb = mix(color.rgb, refl_col, color.a);
|
||||||
cloud_blend = 1;
|
cloud_blend = 1;
|
||||||
} else {
|
} else {
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user