translation is not needed

This commit is contained in:
Quaternions 2023-08-29 18:01:42 -07:00
parent 799c4a9224
commit cbe9c4a212

View File

@ -413,9 +413,9 @@ fn main() {
); );
let view = Matrix4::from_translation(pos)*Matrix4::from(angles); let view = Matrix4::from_translation(pos)*Matrix4::from(angles);
let scale = Matrix4::from_scale(-0.01); let scale = Matrix4::from_scale(-0.01);
// Matrix4::from_translation(Vector3 { x: 0.0, y: 0.0, z: 0.0 }) *
let uniform_data = vs::Data { let uniform_data = vs::Data {
world: (Matrix4::from_translation(Vector3 { x: 0.0, y: 0.0, z: 0.0 }) * Matrix4::from(rotation) * scale).into(), world: (Matrix4::from(rotation) * scale).into(),
view: view.invert().unwrap().cast::<f32>().unwrap().into(), view: view.invert().unwrap().cast::<f32>().unwrap().into(),
proj: proj.into(), proj: proj.into(),
}; };