Get the latest tech news

VoxelSpace: Terrain rendering algorithm in less than 20 lines of code (2020)


Terrain rendering algorithm in less than 20 lines of code - s-macke/VoxelSpace

The Voxel Space engine just takes the color and doesn't have to compute illumination during the render process. The Voxel Space engine rasters the height and color map and draws vertical lines. Consider the field of view and the perspective projection(Objects are smaller farther away) Raster the line so that it matches the number of columns of the screen.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Code

Code

Photo of algorithm

algorithm

Photo of lines

lines

Related news:

News photo

Show HN: I'm tired of sharing code using PasteBin and Slack, so I made this

News photo

Boffins carve up C so code can be converted to Rust

News photo

Advent of Code 2024 in pure SQL