Remove old commented code
This commit is contained in:
		
							parent
							
								
									d9697b0179
								
							
						
					
					
						commit
						5824bea07e
					
				| 
						 | 
				
			
			@ -49,18 +49,6 @@ struct Feedback {
 | 
			
		|||
    positions: array<vec4<i32>>,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// struct UnpackElement {
 | 
			
		||||
//     pos: vec3<i32>,
 | 
			
		||||
//     cache_idx: u32,
 | 
			
		||||
//     map: Brickmap,
 | 
			
		||||
// }
 | 
			
		||||
 | 
			
		||||
// struct Unpack {
 | 
			
		||||
//     max_count: u32,
 | 
			
		||||
//     count: u32,
 | 
			
		||||
//     maps: array<UnpackElement>
 | 
			
		||||
// }
 | 
			
		||||
 | 
			
		||||
// Utility function. Converts a position in 3d to a 1d index.
 | 
			
		||||
fn to_1d_index(p: vec3<i32>, dims: vec3<i32>) -> u32 {
 | 
			
		||||
    return u32(p.x + p.y * dims.x + p.z * dims.x * dims.y);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue