added shader hot reloading, compute shader now uses some of paper technique

This commit is contained in:
2024-09-14 17:09:20 -04:00
parent 244440c38a
commit 1cecc3cdaf
8 changed files with 612 additions and 582 deletions

View File

@@ -94,6 +94,14 @@ impl<'a> Renderer<'a> {
}
}
pub fn reset_shader(&mut self) {
self.voxel_pipeline.reset_shader(&self.device);
}
pub fn update_shader(&mut self) {
self.voxel_pipeline.update_shader(&self.device);
}
fn create_encoder(device: &wgpu::Device) -> wgpu::CommandEncoder {
device.create_command_encoder(&wgpu::CommandEncoderDescriptor {
label: Some("Render Encoder"),