mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed close cloud sampling issue
This commit is contained in:
parent
0b86943e66
commit
a0f0417f8f
@ -172,7 +172,8 @@ vec3 get_cloud_color(vec3 surf_color, vec3 dir, vec3 origin, const float time_of
|
||||
float cdist = max_dist;
|
||||
float ldist = cdist;
|
||||
// i is an emergency brake
|
||||
for (int i = 0; cdist > 4 /* && i < 250 */; i ++) {
|
||||
float min_dist = clamp(max_dist / 4, 0.25, 24);
|
||||
for (int i = 0; cdist > min_dist && i < 250; i ++) {
|
||||
ldist = cdist;
|
||||
cdist = step_to_dist(trunc(dist_to_step(cdist - 0.25, quality)), quality);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user