Hidden surface removal demo

This demo implements Depth Buffering and Back Face Culling. You can turn them on and off to see the effect they have on the output.

With Depth Buffering and Back Face Culling disabled, the output depends on the order of the triangles within the model. To show this, you can shuffle the triangles; and to make the output clearer, you can choose to draw the outlines of the individual triangles.

Depth buffering &
Backface culling

Triangle outlines

Computer Graphics From Scratch · Dedication | Acknowledgements | Table of Contents | Introduction | Introductory Concepts
Part I: Raytracing · Basic Raytracing | Light | Shadows and Reflections | Extending the Raytracer
Part II: Rasterization · Lines | Filled Triangles | Shaded Triangles | Perspective Projection | Describing and Rendering a Scene | Clipping | Hidden Surface Removal | Shading | Textures | Extending the Rasterizer
Appendixes · Linear Algebra | Afterword