Raycasting
1990s landmark: Wolfenstein 3D, 1992; raycasting predates the game.

Prompt
Apply a Raycasting effect with coarse upright wall-like surfaces rendered as adjacent vertical texture strips, shrinking toward the distance. Use enlarged nearby texture pixels, sharp rectangular corners, flat floor shading, and simple depth-based darkening, translating existing background structures rather than introducing new corridors. Keep the original subject and composition.
Identify
Blocky corridors show upright walls, sharp corners, and enlarged texture1 pixels nearby. Walls appear as vertical strips that shrink toward the distance.
Principle
In this method, a ray crosses a two-dimensional map for each screen column until it hits a wall. The perpendicular distance2 sets the height of a textured strip drawn in that column.
Example
id Software: Wolfenstein 3D, 1992.
Try it out
In a raycasting demonstration, approach a wall and watch its texture enlarge while its vertical edges remain upright.
Background
Raycasting became widely recognized through early 1990s computer games, especially Wolfenstein 3D. Its walls came from a two-dimensional grid map, rather than a general three-dimensional polygon scene. Each screen column sampled the map along a viewing ray. The first wall hit supplied a texture position, while perpendicular distance controlled the strip’s height. This restriction made convincing movement through corridors practical on contemporary personal computers. Wolfenstein 3D used equal-height walls and flat-colored floors and ceilings. Enemies and many objects were separate sprites3, not wall geometry. Other raycasting engines extended these limits.
Distinction
Unlike general ray tracing, this column-based method does not trace secondary rays for reflections or refraction. It exploits upright walls to render whole columns from individual map intersections.
Aftermath
Raycasting shows how carefully chosen geometric restrictions can create a convincing sense of space with relatively little computation.
Further examples · 7 images






Question
Why use perpendicular distance rather than the full distance traveled along each ray?
Show possible answer +Hide answer −
Sideways rays travel farther even when they hit the same flat wall. Perpendicular distance prevents that wall from appearing bowed, a distortion often called fisheye.