mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Addressed review comments
This commit is contained in:
parent
aeb72bcf22
commit
8e03f87881
@ -388,12 +388,7 @@ impl<'a, A: AtlasData, Allocator: AtlasAllocator> GreedyMesh<'a, A, Allocator> {
|
||||
+ 'a,
|
||||
{
|
||||
span!(_guard, "push", "GreedyMesh::push");
|
||||
let cont = greedy_mesh::<_, _, _, _, _, _, _, _, _, A, _>(
|
||||
&mut self.atlas,
|
||||
&mut self.tex_size,
|
||||
self.max_size,
|
||||
config,
|
||||
);
|
||||
let cont = greedy_mesh(&mut self.atlas, &mut self.tex_size, self.max_size, config);
|
||||
self.suspended.push(cont);
|
||||
}
|
||||
|
||||
@ -433,7 +428,7 @@ fn greedy_mesh<
|
||||
Allocator: AtlasAllocator,
|
||||
>(
|
||||
atlas: &mut Allocator,
|
||||
col_lights_size: &mut Vec2<u16>,
|
||||
atlas_size: &mut Vec2<u16>,
|
||||
max_size: Vec2<u16>,
|
||||
GreedyConfig {
|
||||
mut data,
|
||||
@ -486,7 +481,7 @@ where
|
||||
norm,
|
||||
faces_forward,
|
||||
max_size,
|
||||
col_lights_size,
|
||||
atlas_size,
|
||||
);
|
||||
create_quad_greedy(
|
||||
pos,
|
||||
@ -527,7 +522,7 @@ where
|
||||
norm,
|
||||
faces_forward,
|
||||
max_size,
|
||||
col_lights_size,
|
||||
atlas_size,
|
||||
);
|
||||
create_quad_greedy(
|
||||
pos,
|
||||
@ -568,7 +563,7 @@ where
|
||||
norm,
|
||||
faces_forward,
|
||||
max_size,
|
||||
col_lights_size,
|
||||
atlas_size,
|
||||
);
|
||||
create_quad_greedy(
|
||||
pos,
|
||||
@ -587,7 +582,7 @@ where
|
||||
|
||||
Box::new(move |atlas_texture_data, cur_size| {
|
||||
let mut data = data;
|
||||
draw_col_lights::<_, A>(
|
||||
draw_texels::<_, A>(
|
||||
atlas_texture_data,
|
||||
cur_size,
|
||||
&mut data,
|
||||
@ -741,7 +736,7 @@ fn add_to_atlas<Allocator: AtlasAllocator>(
|
||||
// to provide builtin support for what we're doing here.
|
||||
//
|
||||
// TODO: See if we can speed this up using SIMD.
|
||||
fn draw_col_lights<D, A: AtlasData>(
|
||||
fn draw_texels<D, A: AtlasData>(
|
||||
atlas_texture_data: &mut A,
|
||||
cur_size: Vec2<u16>,
|
||||
data: &mut D,
|
||||
|
@ -765,7 +765,7 @@ impl<V: RectRasterableVol> Terrain<V> {
|
||||
.map(|fmt| {
|
||||
renderer.create_texture_raw(
|
||||
&wgpu::TextureDescriptor {
|
||||
label: Some("Color & lights atlas texture"),
|
||||
label: Some("Terrain atlas texture"),
|
||||
size: wgpu::Extent3d {
|
||||
width: max_texture_size,
|
||||
height: max_texture_size,
|
||||
@ -778,7 +778,7 @@ impl<V: RectRasterableVol> Terrain<V> {
|
||||
usage: wgpu::TextureUsage::COPY_DST | wgpu::TextureUsage::SAMPLED,
|
||||
},
|
||||
&wgpu::TextureViewDescriptor {
|
||||
label: Some("Color & lights atlas texture view"),
|
||||
label: Some("Terrain atlas texture view"),
|
||||
format: Some(fmt),
|
||||
dimension: Some(wgpu::TextureViewDimension::D2),
|
||||
aspect: wgpu::TextureAspect::All,
|
||||
@ -788,7 +788,7 @@ impl<V: RectRasterableVol> Terrain<V> {
|
||||
array_layer_count: None,
|
||||
},
|
||||
&wgpu::SamplerDescriptor {
|
||||
label: Some("Color & lights atlas texture sampler"),
|
||||
label: Some("Terrain atlas texture sampler"),
|
||||
address_mode_u: wgpu::AddressMode::ClampToEdge,
|
||||
address_mode_v: wgpu::AddressMode::ClampToEdge,
|
||||
address_mode_w: wgpu::AddressMode::ClampToEdge,
|
||||
|
Loading…
Reference in New Issue
Block a user