davids91 / shocovox

Sparse Voxel Octree implementation in WGSL ( hence: shady ) with handling and utilities in Rust.
Other
9 stars 1 forks source link

Feature/type safe albedo #25

Closed nerdachse closed 4 months ago

nerdachse commented 5 months ago

As discussed, this is one way to implement Albedo and get rid of u32 and individual u8 components in the creation of VoxelData.

Please have a look, and if it's not what you want, don't hesitate to tell me to go in another direction!

A follow up could be to make UserData also a trait and make VoxelData generic, so users of shocovox could create their own, typesafe wrappers and just need to provide a way to create a single u32 from their types.

nerdachse commented 5 months ago

You're very welcome. I'll incorporate the changes as soon as possible and rebase :)

davids91 commented 4 months ago

Looks good! Will give it the final :heavy_check_mark: after you declare it ready :)