mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed minor LoD issues
This commit is contained in:
parent
f21a64e898
commit
01e1cb34b0
@ -33,11 +33,11 @@ layout(location = 3) out vec3 model_pos;
|
||||
layout(location = 4) out float snow_cover;
|
||||
|
||||
void main() {
|
||||
vec3 tree_pos = inst_pos - focus_off.xyz;
|
||||
f_pos = tree_pos + v_pos;
|
||||
vec3 obj_pos = inst_pos - focus_off.xyz;
|
||||
f_pos = obj_pos + v_pos;
|
||||
model_pos = v_pos;
|
||||
|
||||
float pull_down = 1.0 / pow(distance(focus_pos.xy, tree_pos.xy) / (view_distance.x * 0.95), 150.0);
|
||||
float pull_down = 1.0 / pow(distance(focus_pos.xy, obj_pos.xy) / (view_distance.x * 0.95), 150.0);
|
||||
#ifndef EXPERIMENTAL_NOTERRAINPOP
|
||||
f_pos.z -= pull_down;
|
||||
#else
|
||||
|
@ -658,7 +658,7 @@ impl Client {
|
||||
tick: 0,
|
||||
state,
|
||||
view_distance: None,
|
||||
lod_distance: 4.0, // TODO: Make configurable
|
||||
lod_distance: 4.0,
|
||||
loaded_distance: 0.0,
|
||||
|
||||
pending_chunks: HashMap::new(),
|
||||
|
@ -103,7 +103,7 @@ impl Lod {
|
||||
));
|
||||
}
|
||||
|
||||
// Create new LoD groups new a new zone has loaded
|
||||
// Create new LoD groups when a new zone has loaded
|
||||
for (p, zone) in client.lod_zones() {
|
||||
self.zone_objects.entry(*p).or_insert_with(|| {
|
||||
let mut objects = HashMap::<_, Vec<_>>::new();
|
||||
|
Loading…
Reference in New Issue
Block a user