mikolalysenko / ao-mesher

Voxel mesher with ambient occlusion
http://mikolalysenko.github.io/ao-shader/index.html
MIT License
40 stars 7 forks source link

Add flag for enclosing edge voxels? #6

Open bnolan opened 7 years ago

bnolan commented 7 years ago

Currently the mesher doesn't generate meshes for the edge voxel. It is an easy change to make the code mesh the outside edges of the voxel chunks? Otherwise I can oversize the voxel data field before meshing (eg extend it to 34x34x34 with a 1 voxel empty border), but that's super inefficient.

See this block which is at z position 31 in a 32x32x32 field.

screen shot 2016-10-11 at 10 24 22 am
bnolan commented 7 years ago

Hmm, doing that would break the ambient occlusion, I guess this change is a bit harder. Maybe I need to look at making the mesher look at surrounding voxels while calculating?