Surface nets – getting closer


I played around with the size of the various loops to get it to this point. I’m not sure how it works but there are no out of index errors. With marching cubes the chunk iterations were from 0 to chunkSize -1. There are some verts which cross over outside of their chunk’s zone, circled in red int he image below. I should be able to force them back onto the chunk edge but it’s not ideal.

Code changes;

Leave a Reply

Your email address will not be published. Required fields are marked *