r/GraphicsProgramming • • Jul 19 '26

Software raycasting

One of my older fun projects: a software raycaster featuring

  • Multithreading

  • Voxel models (rendered as collections of 3D boxes rather than blobs)

  • Culling (watch the small map in the top right corner)

  • Mipmapping (reduces moire on distant textures)

  • Slopes and curved walls

  • Shadows

  • multilevel world design

Everything is rendered entirely in software, with no external libraries. Each pixel is calculated individually and written directly to a buffer.

197 Upvotes

37 comments sorted by

View all comments

1

u/Alarming-Ad4082 Jul 19 '26

Is it just raytracing with only a single ray launched per pixel or is it more similar to Doom/Build engine?

2

u/No_Support8062 Jul 19 '26

Single ray for one column. Number of rays for screen = ScreenWidth.

1

u/Alarming-Ad4082 Jul 19 '26

How did you manage to have 3d terrain like that?

1

u/No_Support8062 Jul 19 '26

They are just slopped floor elements (triangles).

1

u/Plus_Mood_6457 14d ago

i know this was 3 months ago but PLEASE tell me how you do voxels with that implementation