Clipping demo

This demo extends the previous one by implementing instance and triangle clipping, as described in the Clipping chapter.

Although the output looks identical, there’s a cube located directly behind the camera. Thanks to the clipping algorithm, it’s not visible in the rendered scene.

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