continue traversing nodes if brick not hit
This commit is contained in:
@@ -2,7 +2,7 @@ use wgpu::util::DeviceExt;
|
||||
use std::convert::TryInto;
|
||||
|
||||
const BRICK_SIZE : usize = 32; // 32x32x32 brick size
|
||||
const BRICK_NUM : usize = 2; // x bricks in texture
|
||||
const BRICK_NUM : usize = 10000; // x bricks in texture
|
||||
|
||||
const BRICK_LEN : usize = BRICK_SIZE*BRICK_SIZE*BRICK_SIZE;
|
||||
const DATA_LEN : usize = BRICK_LEN * BRICK_NUM;
|
||||
@@ -102,7 +102,7 @@ impl BrickBuffer {
|
||||
}
|
||||
}
|
||||
}
|
||||
bricks.set(0, 0, 0, 0, 0);
|
||||
bricks.set(1, 20, 5, 16, 1);
|
||||
|
||||
// Done
|
||||
Self { bricks, texture, size, bind_layout, bind_group }
|
||||
|
||||
@@ -70,7 +70,9 @@ impl NodeBuffer {
|
||||
|
||||
// Data
|
||||
let mut nodes : [u32; NUM_NODES] = [Default::default(); NUM_NODES];
|
||||
nodes[0] = 2;
|
||||
nodes[0] = 1;
|
||||
nodes[1] = 2;
|
||||
nodes[2] = 2;
|
||||
|
||||
// Done
|
||||
Self { nodes, texture, size, bind_layout, bind_group }
|
||||
|
||||
Reference in New Issue
Block a user