Software rendering engine with PBR. Built from scratch on C++.
Topics
#learning #c-plus-plus #prototype #cpp #shaders #graphics #software-rendering #sdl2 #parallelization #graphics-programming #rendering-engine #rendering-pipeline #3d-graphics #3d #rasterization #physically-based-rendering #pbr
|
|
7 years ago | |
|---|---|---|
| include | 7 years ago | |
| libs | 7 years ago | |
| modules | 7 years ago | |
| scenes | 7 years ago | |
| src | 7 years ago | |
| .gitattributes | 7 years ago | |
| .gitignore | 7 years ago | |
| CMakeLists.txt | 7 years ago | |
| README.md | 7 years ago | |
| _config.yml | 7 years ago |
SSGE is the result of a two month long learning project with the aim of building a real-time 3D renderer from scratch in C++. It is capable of modern Physically Based Rendering(PBR) without making use of any third party graphics libraries such as OpenGL, DirectX or Vulkan. It is entirely software based and does not utilize any hardware acceleration throughout it's rendering pipeline. SSGE can run on both Windows and Linux machines by leveraging CMAKE for executable building and compiling and SDL2 for OS and hardware-level abstraction.
Performance wise, it is capable of running scenes containing medium size meshes of ~50k triangles and 4 light sources at a relatively stable frame rate of 30fps (Of course, your mileage may vary) while running the very demanding PBR shader. To achieve this it makes heavy use of multithreading, SIMD directives and various other optimizations such as early backface culling, frustrum culling and texture tiling among others.
You can download a demo of it for your machine here:
I am planning on starting a series of blog posts sometime soon that will explain some of the cooler components of the engine and how I went about implementing them. I also feel it would be helpful to other beginners if I were to elaborate on some of the components that gave me the most trouble, such as how to design the general architecture of the engine, how to profile, optimize and bug fix your code and lastly how I personally tackled learning Computer Graphics coming from a non-cs background.
I set these goals above as my learning targets for the project before I began and I have to say that I am very happy with how much progress I managed to make with most of them. If you're interested, I gave a talk that went more in detail about this and the journey in itself and you can find the slides for it here:
I've moved most of the sources into a separate page on the wiki for easier navigation and indexing. However, here are some of the ones I utilized the most:
If any of the above textures or meshes have been mis-acknowledged, are misattributed, or missing a proper reference please send me a DM on Twitter or email me at the address inside the source files and I'll fix it immediately.