Created
August 3, 2021 13:45
-
-
Save RevoluPowered/050db986b9f86ddd48622b27a09e8f83 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is the old code | |
const float *v = (const float *)&r[j * total_elem_size + offsets[i]]; | |
w[j] = Vector3(v[0], v[1], v[2]); | |
// this is the replacement (has correct alignment) | |
float x = (float)r[j*total_elem_size*offsets[i]]; | |
float y = (float)r[j*total_elem_size*offsets[i]+1]; | |
float z = (float)r[j*total_elem_size*offsets[i]+2]; | |
w[j] = Vector3(x,y,z); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment