fix indexing of cubes
This commit is contained in:
parent
680039cdfa
commit
3f199ce4a6
4 changed files with 10 additions and 9 deletions
src
|
@ -70,7 +70,7 @@ pub unsafe fn create_command_buffers(device: &Device, data: &mut app_data::AppDa
|
|||
&[data.descriptor_sets[i]],
|
||||
&[]);
|
||||
|
||||
device.cmd_dispatch(*command_buffer, (data.compute_task_one_size as f64 / 256.0).ceil() as u32, 1, 1);
|
||||
device.cmd_dispatch(*command_buffer, (data.compute_task_one_size as f64 / 16.0).ceil() as u32, 1, 1);
|
||||
|
||||
let buffer_memory_barrier_vertex = vk::BufferMemoryBarrier::builder()
|
||||
.buffer(data.compute_out_cuboid_buffers[i])
|
||||
|
|
|
@ -124,6 +124,12 @@ pub fn generate_test_scene(scene: &mut Scene, data: &mut AppData) -> Result<(Poi
|
|||
comp.excluded_shapes.push(Rc::new(RefCell::new(Sphere::new(Vector3 { x: 5.0 + grid_size as f32, y: 5.0 + grid_size as f32, z: 11.5 }, Vector3 { x: 0.0, y: 0.0, z: 0.0 }, 1.5, Vector3 { x: 0, y: 255, z: 0 }, 64, false))));
|
||||
scene.volumetrics.push(Rc::new(RefCell::new(comp)));
|
||||
|
||||
let mut comp = ShapeComposition::new(64);
|
||||
comp.included_shapes.push(Rc::new(RefCell::new(Sphere::new(Vector3 { x: 20.0 + grid_size as f32, y: 5.0 + grid_size as f32, z: 10.0 }, Vector3 { x: 0.0, y: 0.0, z: 0.0 }, 2.0, Vector3 { x: 0, y: 255, z: 0 }, 64, false))));
|
||||
comp.included_shapes.push(Rc::new(RefCell::new(Sphere::new(Vector3 { x: 20.0 + grid_size as f32, y: 5.0 + grid_size as f32, z: 10.0 }, Vector3 { x: 0.0, y: 0.0, z: 0.0 }, 2.5, Vector3 { x: 255, y: 0, z: 0 }, 64, false))));
|
||||
comp.excluded_shapes.push(Rc::new(RefCell::new(Sphere::new(Vector3 { x: 20.0 + grid_size as f32, y: 5.0 + grid_size as f32, z: 11.5 }, Vector3 { x: 0.0, y: 0.0, z: 0.0 }, 1.5, Vector3 { x: 0, y: 255, z: 0 }, 64, false))));
|
||||
scene.volumetrics.push(Rc::new(RefCell::new(comp)));
|
||||
|
||||
Ok((cgmath::point3(5.0, 5.0, 10.0)))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue