Adding depth sorting to new cache

This commit is contained in:
2026-11-01 22:17:40 +01:00
parent b8658b7186
commit 9b9f637842
14 changed files with 258 additions and 88 deletions
+10 -10
View File
@@ -359,7 +359,7 @@ impl State
init: voxel_cache::CacheAttributeInit::External,
});
let voxel_cache = VoxelCache::<4>::new(&device, 150_000, &layout);
let voxel_cache = VoxelCache::<4>::new(&device, 100_000, &layout);
let request_buffer = CacheRequestBuffer::new(&device, 1024);
let insertion_data = CacheInsertionData::new(&device, 1024, &layout);
@@ -382,9 +382,9 @@ impl State
// let terrain_width = terrain_generator.chunk_width;
// let terrain_height = terrain_generator.chunk_height;
// let terrain_alt = terrain_generator.chunk_alt;
let terrain_width = 10;
let terrain_height = 10;
let terrain_alt = 10;
let terrain_width = 20;
let terrain_height = 20;
let terrain_alt = 20;
println!(
"Chunk count : {}",
terrain_width * terrain_height * terrain_alt
@@ -1279,7 +1279,7 @@ impl State
return;
}
println!("Cache : {} requests", request_informations.len());
//println!("Cache : {} requests", request_informations.len());
let mut insertion_infos = vec![];
let mut color_attributes = vec![];
@@ -1362,7 +1362,7 @@ impl State
return;
}
println!("Structure table: {} requests", request_informations.len());
//println!("Structure table: {} requests", request_informations.len());
let mut insertion_infos = vec![];
let mut color_attributes = vec![];
@@ -1580,14 +1580,14 @@ impl State
&self.device,
&mut scoped_encoder,
&mut [
&mut VoxelCacheInsertion::InternalRequest(
&self.cache_insertion,
&self.request_buffer,
),
&mut VoxelCacheInsertion::ExternalRequest(
&self.structure_table_cache_insertion,
&mut *locked_st,
),
&mut VoxelCacheInsertion::InternalRequest(
&self.cache_insertion,
&self.request_buffer,
),
],
);