mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed cloud bugs, made pets run into you less
This commit is contained in:
parent
3d4a294b83
commit
d91d66027a
@ -1,8 +1,8 @@
|
||||
uniform sampler2D t_noise;
|
||||
|
||||
const float CLOUD_AVG_HEIGHT = 1025.0;
|
||||
const float CLOUD_HEIGHT_MIN = CLOUD_AVG_HEIGHT - 50.0;
|
||||
const float CLOUD_HEIGHT_MAX = CLOUD_AVG_HEIGHT + 50.0;
|
||||
const float CLOUD_HEIGHT_MIN = CLOUD_AVG_HEIGHT - 60.0;
|
||||
const float CLOUD_HEIGHT_MAX = CLOUD_AVG_HEIGHT + 60.0;
|
||||
const float CLOUD_THRESHOLD = 0.25;
|
||||
const float CLOUD_SCALE = 5.0;
|
||||
const float CLOUD_DENSITY = 100.0;
|
||||
@ -67,8 +67,8 @@ vec4 get_cloud_color(vec3 dir, vec3 origin, float time_of_day, float max_dist, f
|
||||
cloud_shade = mix(cloud_shade, sample.x, passthrough * integral);
|
||||
dist += INCR * delta;
|
||||
|
||||
if (passthrough < 0.05 || (passthrough > 0.8 && dist > (maxd + mind) * 0.7)) {
|
||||
break;
|
||||
if (passthrough < 0.025 || (passthrough > 0.8 && dist > (maxd + mind) * 0.7) && mind > 100.0) {
|
||||
//break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -99,6 +99,7 @@ impl<'a> System<'a> for Sys {
|
||||
- *bearing * 0.01
|
||||
- if let Some(patrol_origin) = agent.patrol_origin {
|
||||
Vec2::<f32>::from(pos.0 - patrol_origin) * 0.0002
|
||||
+ Vec3::one() / Vec2::<f32>::from(pos.0 - patrol_origin)
|
||||
} else {
|
||||
Vec2::zero()
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user