tree dissolve + instances
This commit is contained in:
14
src/snow.rs
14
src/snow.rs
@@ -505,10 +505,23 @@ impl SnowLayer
|
||||
})
|
||||
});
|
||||
|
||||
let mut aabb_min = Vec3::splat(f32::MAX);
|
||||
let mut aabb_max = Vec3::splat(f32::MIN);
|
||||
for v in &vertices
|
||||
{
|
||||
let p = Vec3::from(v.position);
|
||||
aabb_min = aabb_min.min(p);
|
||||
aabb_max = aabb_max.max(p);
|
||||
}
|
||||
|
||||
Mesh {
|
||||
vertex_buffer,
|
||||
index_buffer,
|
||||
num_indices: indices.len() as u32,
|
||||
aabb_min,
|
||||
aabb_max,
|
||||
cpu_positions: Vec::new(),
|
||||
cpu_indices: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -568,6 +581,7 @@ impl SnowLayer
|
||||
enable_dissolve: false,
|
||||
enable_snow_light: true,
|
||||
displacement_bind_group: Some(self.displacement_bind_group.clone()),
|
||||
entity: None,
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user