From 5824bea07ece50201f195fcb069eb7f3c28f2cd3 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Wed, 5 Jul 2023 14:02:41 +0100 Subject: [PATCH] Remove old commented code --- assets/shaders/voxel_volume.wgsl | 12 ------------ src/voxel/brickmap.rs | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/assets/shaders/voxel_volume.wgsl b/assets/shaders/voxel_volume.wgsl index b103b0e..160ef08 100644 --- a/assets/shaders/voxel_volume.wgsl +++ b/assets/shaders/voxel_volume.wgsl @@ -49,18 +49,6 @@ struct Feedback { positions: array>, } -// struct UnpackElement { -// pos: vec3, -// cache_idx: u32, -// map: Brickmap, -// } - -// struct Unpack { -// max_count: u32, -// count: u32, -// maps: array -// } - // Utility function. Converts a position in 3d to a 1d index. fn to_1d_index(p: vec3, dims: vec3) -> u32 { return u32(p.x + p.y * dims.x + p.z * dims.x * dims.y); diff --git a/src/voxel/brickmap.rs b/src/voxel/brickmap.rs index 7e47687..99742cb 100644 --- a/src/voxel/brickmap.rs +++ b/src/voxel/brickmap.rs @@ -61,7 +61,6 @@ pub struct BrickmapManager { } // TODO: -// - GPU side unpack buffer rather than uploading each changed brickmap part. HIGH PRIO!! // - Brickworld system impl BrickmapManager { pub fn new(context: &render::Context, brickgrid_dims: glam::UVec3) -> Self { @@ -253,17 +252,11 @@ impl BrickmapManager { self.update_brickgrid_element(entry.grid_idx, 1); } - // TODO: Add to a brickmap unpack buffer // Update the shading table let shading_idx = self .shading_table_allocator .try_alloc(albedo_data.len() as u32) .unwrap() as usize; - // context.queue.write_buffer( - // &self.shading_table_buffer, - // (shading_idx * 4) as u64, - // bytemuck::cast_slice(&albedo_data), - // ); // We're all good to overwrite the cache map entry now :) self.brickmap_cache_map[self.brickmap_cache_idx] = Some(BrickmapCacheEntry { @@ -277,11 +270,6 @@ impl BrickmapManager { shading_table_offset: shading_idx as u32, lod_color: 0, }; - // context.queue.write_buffer( - // &self.brickmap_buffer, - // (72 * self.brickmap_cache_idx) as u64, - // bytemuck::cast_slice(&[brickmap]), - // ); let shading_element_count = albedo_data.len(); let mut shading_elements = [0u32; 512];