An OpenGL rendering engine written in C++. The engine is small and light. It implements things like shadow mapping, ambient occlusion, and shader application. This engine is made open source through the MPL 2.0 license.
- This is a software rasterizer for OpenGL
- This does not use any existing graphics libraries
I wanted to try and understand the fundamentals of graphics rendering after getting a good GPU for my computer. I initiated a graphics rendering project to understand fundamental concepts, starting with basic 2D shapes and index buffers. This then evolved into a robust 3D rendering engine, featuring shaders, meshes, textures, and advanced lighting techniques (specular, diffuse, Blinn-Phong). Implemented dynamic camera motion, spotlight, point light, and directional lighting. I further enriched the engine with advanced graphics techniques, including Geometry Shaders, Multi-Object Instancing, Anti-Aliasing, Bloom, High Dynamic Range, Gamma Correction, Shadow Maps, Parallax Occlusion Mapping, and Face-Culling. The result is a visually captivating rendering engine, showcasing the journey from basics to sophisticated graphics programming.
This multifaceted rendering engine encompasses a spectrum of elements, starting with the implementation of shaders, meshes, objects, and textures. Noteworthy features include dynamic camera motion, specular and diffuse lighting, as well as the incorporation of spotlight, point light, directional lighting, and Blinn-Phong Lighting techniques for achieving nuanced and realistic visuals.
The project's evolution didn't stop there; additional graphics techniques were seamlessly integrated to enhance the rendering capabilities. This expansion included the implementation of Geometry Shaders for more complex geometries, Multi-Object Instancing for efficient rendering of numerous objects, and Anti-Aliasing to ensure smooth and artifact-free visuals. Bloom effects were introduced to add a layer of vibrancy, while High Dynamic Range (HDR) and Gamma Correction techniques were applied to achieve a more lifelike representation of light and color.
Delving deeper into the intricacies of rendering, the project also embraced Shadow Maps to cast realistic shadows, Parallax Occlusion Mapping for detailed surface rendering, and Face-Culling to optimize performance by excluding unseen geometry.
As the project unfolded, it evolved into a sophisticated custom 3D rendering engine, showcasing a progression from foundational concepts to advanced visual effects, evident in the captivating screenshots below.
bash install-deps-ubuntu.sh
make
cd build/
./ThomasOpenGL.vcxproj
- OpenGL
- GLSL
- GLM.
- GLAD.
- GLFW.
- stb_image.
- pugixml.
- GLM AABB wrapper: (https://github.com/iauns/cpm-glm-aabb).
- Learn OpenGL.com provides good and clear modern 3.3+ OpenGL tutorials with clear examples. A great resource to learn modern OpenGL aimed at beginners. (Learn OpenGL - online print edition - Free PDF)
- Fast Extraction of Viewing Frustum Planes from the World-View-Projection Matrix (http://www.cs.otago.ac.nz/postgrads/alexis/planeExtraction.pdf). Gribb, Hartman (2001).
- Forward+: Bringing Deferred Lighting to the Next Level (https://takahiroharada.files.wordpress.com/2015/04/forward_plus.pdf). Harada, McKee, Yang (2012).
- Solid Wireframe (http://developer.download.nvidia.com/SDK/10/direct3d/Source/SolidWireframe/Doc/SolidWireframe.pdf). Nvidia (2007).
- Physically Based Rendering (https://learnopengl.com/#!PBR/IBL/Specular-IBL)
- Variance Shadow Mapping (http://developer.download.nvidia.com/SDK/10.5/direct3d/Source/VarianceShadowMapping/Doc/VarianceShadowMapping.pdf)
- Tessellated Terrain Rendering with Dynamic LOD (http://victorbush.com/2015/01/tessellated-terrain/)