-
-
Notifications
You must be signed in to change notification settings - Fork 22.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix usages of mesh simplification functions in float=64 builds #67853
Conversation
I wonder if we could use |
How so? There is no Variant in this code. |
PackedVector3Array is a variant |
I still don't understand how using The code where we send data to MeshOptimizer had to be fixed, because it was just wrong in 64-bit float builds. Import went fine. Edit: I hadn't initially tested with a 64-bit build without this PR, and finally saw it was broken, so I can confirm this PR fixes the issue. |
Looking into it deeper it looks like The code here is fine, but I wonder if Also, we have |
We discussed this on the RocketChat. Reduz let us know that we should not be casting PackedVector3Array to *float as we will likely add padding to PackedVector3Array to make it more efficient on mobile hardware. Therefore, we need to add a conversion function somewhere. Reduz originally suggested adding the code to Variant, but suggested that doing it there may make it difficult to access from C++. To move forward with this PR I guess we just need to figure out where the best place for a PackedVector3Array -> *float (or maybe PackedFloat32Array) would be. |
marshalls? I probably won't add it to variant for now, but I was pretty much waiting for where I should put this so that ##67772 would be fixed |
I guess so. I took another look today and I can't think of any better place for it. |
8aa593a
to
2aefdcc
Compare
@lyuma I tested this and LODs are not broken. Did not deeply review the code. |
Looks great, thanks! |
Fixes #67772
It would be nice if Godot had
Vector3f
packed arrays in the first place for positions and normals, since that's what they become anyways in the renderer (even for physics it would help, since only broad phase could need doubles).