3 ms·
There are three basic, independent parts of graphics: drawing shapes, lighting and light vs surface interaction. Z-buffer is a very clever way to draw shapes.
by pandaman 10y ago
There are three basic, independent parts of graphics: drawing shapes, lighting and light vs surface interaction.
Z-buffer is a very clever way to draw shapes. The only other way used practically is ray-tracing, where you cast rays through pixels on the screen and see where they intersect with the surface. Z-buffer reverses it - instead of casting rays towards surface we project set points on the surface (vertices) onto the screen. Even though it's asymptotically O(n) vs ray tracing's O(log n), practically it's very fast. The vast majority of CG, from movies to video games relies on this algorithm and I don't know what could be more important. All the stuff listed in other comments: texture mapping, texture mapping, shaders, perspective projection etc are specific algorithms, which don't deal with the shape drawing directly and not used everywhere.