This commit is contained in:
Quaternions 2024-09-16 15:03:18 -07:00
parent 1d4a79b15e
commit c5f9a30c1b

View File

@ -219,7 +219,7 @@ impl GraphicsState{
//wow
let instance=GraphicsModelOwned{
transform:model.transform.into(),
normal_transform:Into::<glam::Mat3>::into(model.transform.matrix3).inverse().transpose(),
normal_transform:glam::Mat3::from_cols_array_2d(&model.transform.matrix3.to_array().map(|row|row.map(Into::into))).inverse().transpose(),
color:GraphicsModelColor4::new(model.color),
};
//get or create owned mesh map