Fix camera for egui renderer

This commit is contained in:
hal8174 2024-11-29 20:24:49 +01:00
parent 1bfef16afa
commit 632cb97007
3 changed files with 8 additions and 5 deletions

View file

@ -99,6 +99,7 @@ pub fn render_thread(
e.camera_up,
e.horizontal_fov,
);
dbg!(&camera);
buffer = vec![0.0; settings.width as usize * settings.height as usize * 3];
renderer = (RENDERER[settings.renderer_id].1)(settings.width, settings.height);
samples = 0;
@ -106,7 +107,7 @@ pub fn render_thread(
buffer.par_chunks_mut(3).enumerate().for_each(|(i, c)| {
let x = (i % settings.width as usize) as u32;
let y = (i / settings.height as usize) as u32;
let y = (i / settings.width as usize) as u32;
let mut rng = SmallRng::seed_from_u64(
(x + y * settings.width) as u64