I'm trying to write a mesh generation system for a chunked voxel world, however, I'm experiencing weird artifacting that I can't track down the source of. I've attached some images to give you an idea of what this looks like.
I've tried several things, and I believe I've tracked down the issue to the code that decides whether to create the faces for each side of a block or not.
Performing len() on the Vec storing my position values after a code modification setting every face to generate results in the following: 147456
This is exactly what my calculations say it should be, so I don't think there's a problem with that. I'm not experienced enough to say whether or not this is actually true, or if this is a purely visual issue.
I'm not even sure if this is really related to Bevy, other than it outputting to a Bevy result and being displayed by Bevy, however I'm hesitant to post this on the Rust discord since it may be unsuitable.
My generation code is all here: https://github.com/Veritius/rustcraft/blob/af5267372c983dcc81a5f403759fc719e9d14547/modlib/src/world/chunk/meshing/mod.rs
I'm aware my indentation practices among others aren't particularly good.