# voxmesh
Voxel greedy meshing library.
## Features
- Block shapes
- Whole blocks (e.g. grass)
- Arbitrary thickness/direction slabs
- Arbitrarily inset blocks (e.g. cactus, bamboo)
- Arbitrary direction cross-shaped billboard blocks (e.g. shrub)
- Arbitrary direction facade-shaped billboard blocks (e.g. rail, ladder)
- Culling modes
- Opaque (e.g. dirt)
- TransparentMerged (e.g. glass)
- TransparentUnmerged (e.g. leaves)
- Empty (e.g. air)
- Vertex computations
- Positions
- Normals
- Texture coordinates
- Smooth lighting
- Ambient occlusion
- Indices
- Mesh a single block or a chunk
## Assumptions
- 16x16x16 block chunks with 1 block of padding on each side
- OpenGL coordinate system
- Blocks are 1 unit wide
- Sub-block positions and sizes are in units of 1/16
- Merging is based on simple `PartialEq` comparison
- You must propagate per-voxel light in advance
## Disclaimer
Most of the code was AI generated by Claude Code (Opus 4.6), albeit with significant guidance.
## License
Textures (`examples/*.png`) may not be used redistributed (except as-is in forks) or used commercially.
Code is licensed under either of
* Apache License, Version 2.0
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.