iakov.dev

Ambient lighting with vertex colours

New ambient lighting implementation

· 1 min read

Ambient lighting with vertex colours

I rewrote the ambient lighting in Iron Cube. The ambient term is now stored in the vertex colours of the voxel mesh.

The screenshot from the editor shows the result on plain white voxels. The tops of the stepped hill are lit from above, while the sides and the gaps between the steps go dark.

Visually there is no difference from the old version, but it should be faster. Iron Cube also runs on Android phones, so every bit of rendering time I save counts there.