diff --git a/benches/voxel_map_benchmark.rs b/benches/voxel_map_benchmark.rs index bc448c3..04fbce4 100644 --- a/benches/voxel_map_benchmark.rs +++ b/benches/voxel_map_benchmark.rs @@ -25,7 +25,7 @@ fn voxel_vec_3d(data: Vec>>) -> Voxel { return data[X][Y][Z]; } -fn criterion_benchmark(c: &mut Criterion) { +fn voxel_map_benchmark(c: &mut Criterion) { let vec_1d = vec![Voxel { r: 0, g: 0, b: 0 }; MAP_WIDTH * MAP_HEIGHT * MAP_DEPTH]; let vec_3d = vec![vec![vec![Voxel { r: 0, g: 0, b: 0 }; MAP_DEPTH]; MAP_HEIGHT]; MAP_WIDTH]; @@ -33,5 +33,5 @@ fn criterion_benchmark(c: &mut Criterion) { c.bench_function("voxels in 3d vector", |b| b.iter(|| voxel_vec_3d(black_box(vec_3d.clone())))); } -criterion_group!(benches, criterion_benchmark); +criterion_group!(benches, voxel_map_benchmark); criterion_main!(benches); \ No newline at end of file diff --git a/src/shader.wgsl b/shaders/shader.wgsl similarity index 100% rename from src/shader.wgsl rename to shaders/shader.wgsl diff --git a/src/main.rs b/src/main.rs index 833b512..33f6ec3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,7 +41,7 @@ async fn run(event_loop: EventLoop<()>, window: Window) { // Load the shaders from disk let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor { label: None, - source: wgpu::ShaderSource::Wgsl(Cow::Borrowed(include_str!("shader.wgsl"))), + source: wgpu::ShaderSource::Wgsl(Cow::Borrowed(include_str!("../shaders/shader.wgsl"))), }); let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {