world shifting almost working
This commit is contained in:
@@ -23,10 +23,10 @@ impl UniformValues {
|
||||
Self { sun_dir, .. Default::default() }
|
||||
}
|
||||
|
||||
pub fn update(&mut self, camera: &Camera, time: f32) {
|
||||
pub fn update(&mut self, camera: &Camera, offset: Vector3<f32>, time: f32) {
|
||||
self.view_inv = camera.get_view().invert().unwrap().into();
|
||||
self.proj_inv = camera.get_projection().invert().unwrap().into();
|
||||
self.cam_pos = camera.get_position().into();
|
||||
self.cam_pos = (camera.get_position() + offset).into();
|
||||
self.time = time;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user