You end up withA ray tracer and a rasterizer written from first principles, with no graphics library; a path tracer with diffuse, metal and glass materials; a software renderer that loads a 3D model and draws it with a z-buffer, textures and shading the way OpenGL does; and your first OpenGL programs and fragment shaders running on the GPU.
Data pulled 2026-11-08 · time estimates are editorial
Why write a renderer when engines are free? Because every frame on every screen comes out of the same few ideas: cast a ray or fill a triangle, find the nearest surface, work out how much light reaches it. After this track, a z-buffer and a fragment shader are things you’ve written.
This course is an opener. Its first three stages are published. Physically based rendering and modern GPU APIs come next; see Coming next at the end.
How to read the receipts.
Points are summed across every HN submission of the same URL. For works that moved (TinyRenderer went from a GitHub wiki to its own site), both addresses count.
“Submitted N×” means HN rediscovered it N times.
Quotes come from the highest-ranked top-level comments in those threads, and a quote is sometimes a criticism. Quotes keep the commenter’s spelling.
Steps are ordered for learning, not by points.
Times are our estimates, not the authors’. They assume evenings and weekends, a reader who writes C++ or another language comfortably, and high-school trigonometry. Stages 1 and 2 use vectors throughout.
Output. Stages 1 and 2 need no graphics API: write images to a file (the PPM format is a few lines of code) or to an HTML canvas.
The terrain renderer behind the 1992 game Comanche, explained with pictures and a few lines of pseudocode: a height map, a color map, and vertical lines drawn back to front (front to back with a y-buffer, once you optimize it). Port it to any language with a pixel buffer and you’ll have flown over a 3D landscape before the course starts.
“Here is my simple port of VoxelSpace (74 sloc). Written in Python 3, no additional libraries required.”
HN’s caveat is about the headline, not the idea. “That is not 20 lines, that’s 300+!” (tehsauce, 2017 · comment). The core loop is short; the demo around it isn’t.
Stage 13–5 weeksRays and triangles from first principles
1,798 points, submitted 9× (2017–2025) · Free online; print edition from No Starch Press · any language · ~2–3 weeks
Both ways of making a 3D image, built from one primitive: putting a pixel on a canvas. Part one is a ray tracer (spheres, lights, shadows, reflections). Part two is a rasterizer (lines, filled and shaded triangles, perspective projection, a scene, clipping, hidden-surface removal, texturing). No external libraries, and interactive demos throughout.
“One thing I really appreciate is building up the mathematical concepts. For example, instead of providing a ray-sphere intersection formula, the tutorial talks about representing a ray and a sphere, and how the two representations must match at intersection points.”
Take the ray tracer further: a camera, antialiasing, diffuse, metal and glass materials, defocus blur, and indirect light by bouncing many random rays per pixel. That last step is what makes it a path tracer, the technique behind film rendering. It ends with the book’s well-known final image of a field of spheres.
“A great project for learning a new language: You have a chance to use abstractions to implement your own vectors, etc. You have a chance to unit test your vectors and vector math.”
Alternative: Dmitry Sokolov’s tinyraytracer (255 points, submitted 4×) does the same in 256 lines of C++.
A software renderer of about 500 lines that loads a triangulated 3D model and draws it the way a GPU pipeline would: Bresenham lines, triangle rasterization with barycentric coordinates, a z-buffer, a camera, shading, tangent-space normal maps, shadow mapping and ambient occlusion. The author’s students typically need 10 to 20 hours of programming before their renderer produces images.
“Wov, this is so elegant, short and sweet. It’s the most beautiful code I’ve seen in a while - because it’s pithy, to the point, but yet retains enough critical detail to be educationally valid.”
HN’s caveat, from the 2016 first edition: the old title oversold it. “The title is a bit misleading, this is boilerplate code for a graphics programming course and it hasn’t got much to do with OpenGL.” (exDM69, 2016 · comment). It teaches what OpenGL computes, not the OpenGL API; Stage 3 covers the API.
Read alongside: Fabian Giesen’s A trip through the Graphics Pipeline (435 points, submitted 17×), on what the driver and the GPU hardware do with the same work. “Just excellent if you want to understand what is going on under the hood. Which is necessary if you are writing anything more than a toy graphic program, or understand the output of GPU debugging/profiling tools from Nvidia and AMD.” (nicopappl, 2022 · comment). It’s from 2011, and HN still recommends it.
478 points across 19 submissions of its pages (2015–2026) · Free online; print edition available · C++ · ~3–4 weeks
Modern OpenGL (the 3.3 core profile) from a window and a triangle up: shaders, textures, transformations, a camera, lighting and materials, model loading, then depth and stencil testing, blending, framebuffers and cubemaps. Everything you did by hand in Stage 2 now runs on the GPU.
“If you’re starting to learn computer graphics, just study through the entire site and do the examples one by one. It doesn’t matter one bit that it uses a slightly outdated API called OpenGL - you’re supposed to learn how to render things first, not about some weird obscure hardware / driver details!”
5.
The Book of Shaders(thebookofshaders.com)· Patricio Gonzalez Vivo and Jen Lowe
1,144 points across 15 submissions of its pages (2016–2025) · Free · GLSL, in the browser · ~1–2 weeks
Fragment shaders on their own: shaping functions, color, shapes, matrices, patterns, randomness, noise and fractal Brownian motion, each with a live editor beside the text. It’s where shader code stops being a black box.
“I’ve been writing these a bunch as of late and to be honest it’s some of the most exciting and rewarding types of programming around. It really stretches out your imagination and also math.”
Coming next
The next stages are chosen and their receipts are pulled, but they are not yet reviewed or written:
Physically based rendering.Physically Based Rendering: From Theory to Implementation by Pharr, Jakob and Humphreys, free online (1,234 points); Physically based rendering from first principles (290 points); Tristan Hume’s photorealistic path tracer (637 points).
Modern GPU APIs. WebGPU Fundamentals (440 points); 3D Game Shaders for Beginners (693 points).
The reference shelf
Scratchapixel · https://www.scratchapixel.com/ · 1,210 points across 32 submissions (2013–2025) · Free. A long-running set of lessons on rendering, from the maths to ray-tracing acceleration structures. Use it to look up whatever a step above glosses over. “Computer graphics needs more open education for sure.” (yunnpp, 2025 · comment)
Editorial backlog
Checked against HN on 2026-11-08 (candidates_receipts.json), not used:
Olive.c (Tsoding, 502 points): a dependency-free graphics library in C. A project to read, not a tutorial.
A minimal raytracer (Matt Zucker, 395 points): a dissection of the business-card ray tracer, a fun detour after step 2.
tinyraycaster (Dmitry Sokolov, 380 points): a Wolfenstein-style shooter in a weekend. A candidate on-ramp.
Method
Candidates came from the 82 graphics-tagged stories in the 4,140-story pull, plus a graphics topic pull with 30 terms: 269 candidates in all (phase1-stories/data/graphics_candidates.json). WebGPU launch news and AI image models made up much of the noise and were skipped by hand.
Selection. 17 resources had receipts pulled; 9 are used here, chosen by hand for followability and sequence. Points were then totalled across every submission of each URL.
Quotes come from the top five top-level comments of the two best-scoring threads per resource, in HN’s ranked order via the Firebase API. Links go to the full comment. Every ID and quote is checked with phase1-stories/scripts/check_track.py.
Content and costs were checked on 2026-11-08 on each resource’s own page: the contents of Computer Graphics from Scratch, the VoxelSpace README, TinyRenderer (second edition), Ray Tracing in One Weekend (version 4.0.2), LearnOpenGL (OpenGL 3.3 core profile, print edition) and which Book of Shaders chapters have text. Time estimates are editorial, not measured.
Data:tracks/graphics/receipts.json (resources used) and candidates_receipts.json (all 17 checked).