texture loading!

This commit is contained in:
Asuro
2025-03-28 04:28:06 +01:00
parent f56ffdaa13
commit 365805537c
26 changed files with 244 additions and 84 deletions

View File

@@ -132,7 +132,7 @@ Vec3 Transform::GlobalToLocalDirection(Vec3 global)
UpdateMatrix();
float in[4]{global.x, global.y, global.z, 0.0f};
float out[4]{0.0f};
bx::vec4MulMtx(out, in, MI.M);
bx::vec4MulMtx(out, in, MI.Transpose().M);
return {out[0], out[1], out[2]};
}
bx::Vec3 Transform::GlobalToLocalPoint(Vec3 global)
@@ -148,8 +148,7 @@ Vec3 Transform::LocalToGlobalDirection(Vec3 local)
UpdateMatrix();
float in[4]{local.x, local.y, local.z, 0.0f};
float out[4]{0.0f};
Mat4 test = M.Transpose();
bx::vec4MulMtx(out, in, test.M);
bx::vec4MulMtx(out, in, M.Transpose().M);
return {out[0], out[1], out[2]};
}
bx::Vec3 Transform::LocalToGlobalPoint(Vec3 local)