We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently I'm doing:
let bits_per_vertex_position_channel_x = range.as_vec3().x.log2().ceil() as u8; let bits_per_vertex_position_channel_y = range.as_vec3().y.log2().ceil() as u8; let bits_per_vertex_position_channel_z = range.as_vec3().z.log2().ceil() as u8;
IVec3 -> Vec3 -> log2 -> ceil -> cast to u8. Everything except log2() and cast to u8 can be done as vector ops.
The text was updated successfully, but these errors were encountered:
While I can look at adding log2, recent glam changes mean you should be able to do range.as_vec3().map(|x| x.log2()).ceil().as_u8vec3()
log2
range.as_vec3().map(|x| x.log2()).ceil().as_u8vec3()
map was added in 0.29.0 and as_u8vec3 should be in 0.29.1.
map
0.29.0
as_u8vec3
0.29.1
Sorry, something went wrong.
No branches or pull requests
Currently I'm doing:
IVec3 -> Vec3 -> log2 -> ceil -> cast to u8. Everything except log2() and cast to u8 can be done as vector ops.
The text was updated successfully, but these errors were encountered: