logoalt Hacker News

wk_end • today at 6:49 PM • 0 replies • view on HN

No it doesn't; that's a common misconception.

Raycasting (in gaming, some graphics folks just use it as another term for raytracing) means to fire a ray for each column of the screen, identify where it collides with a wall, and use that to determine what to render for that column - it's basically per-column raytracing.

DOOM's engine instead uses a BSP tree so that, from any position, you can determine which walls are on-screen instantly just by walking the tree - the nearer walls appear earlier in the traversal than farther walls. It's still column-based (it tracks whether each column has been drawn and won't draw further walls behind an already drawn column, and stops drawing once all columns are filled), but there's no rays cast.