Fixing LOD grid, for real.

This commit is contained in:
Joshua Yanovski 2020-08-17 05:52:04 +02:00
parent a166ae0360
commit c32b337a46

View File

@ -42,7 +42,7 @@ impl Lod {
pub fn set_detail(&mut self, detail: u32) { pub fn set_detail(&mut self, detail: u32) {
// Make sure the recorded detail is even. // Make sure the recorded detail is even.
self.data.tgt_detail = detail.max(100).min(2500) - detail % 2; self.data.tgt_detail = (detail - detail % 2).max(100).min(2500);
} }
pub fn maintain(&mut self, renderer: &mut Renderer) { pub fn maintain(&mut self, renderer: &mut Renderer) {