fixed a bug because of which bvhnode scenes were not being rendered
This commit is contained in:
parent
be11f1c8fe
commit
922d0f1656
|
@ -159,6 +159,7 @@ pub trait Demo: Send + Sync {
|
||||||
|
|
||||||
temp_offset += nx * 4;
|
temp_offset += nx * 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("Rendered {}", chunk);
|
println!("Rendered {}", chunk);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -227,7 +228,7 @@ impl DemoWrapper {
|
||||||
pub fn render(&self, buf: &mut Vec<u8>, x: usize, y: usize, samples: u16) {
|
pub fn render(&self, buf: &mut Vec<u8>, x: usize, y: usize, samples: u16) {
|
||||||
match self {
|
match self {
|
||||||
DemoWrapper::HitableList(v) => v.render(buf, x, y, samples),
|
DemoWrapper::HitableList(v) => v.render(buf, x, y, samples),
|
||||||
DemoWrapper::BVHNode(v) => v.save_as_ppm(buf, x, y, samples),
|
DemoWrapper::BVHNode(v) => v.render(buf, x, y, samples),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user