A simple software 3D renderer in C.
It uses my bitmap module as a framebuffer and for texture maps.
The renderer uses Barycentric coordinates for texture mapping as in tinyrenderer, which is a bit slow. I was working on a scanline rasterizer at some point, but I had some trouble with the perspective correction, and didn't get around to finishing it.
- Dmitry V. Sokolov's tinyrenderer tutorial
- The www.scratchapixel.com tutorials
- The official home of
bmp.c
is here: https://github.com/wernsey/bitmap - The
/gl-matrix
code is originally from https://github.com/coreh/gl-matrix.c, but I've made some modifications in my fork: https://github.com/wernsey/gl-matrix.c
Other references
- https://www.davrous.com/2013/06/13/tutorial-series-learning-how-to-write-a-3d-soft-engine-from-scratch-in-c-typescript-or-javascript/
- http://www.3dcpptutorials.sk/index.php?id=60
- https://www.opengl.org/discussion_boards/showthread.php/156767-Clipping-triangles-in-clip-space
- https://github.com/bulletphysics/bullet3/blob/master/examples/TinyRenderer/TinyRenderer.cpp
- http://www.gamasutra.com/view/news/168577/Indepth_Software_rasterizer_and_triangle_clipping.php
- http://myweb.lmu.edu/dondi/share/cg/hsr.pdf
- Object files
- MD2 files
- MD5 files
In the future I might consider adding support for these file formats: