All Projects → Angelo1211 → Softwarerenderer

Angelo1211 / Softwarerenderer

Licence: mit
Software rendering engine with PBR. Built from scratch on C++.

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Softwarerenderer

Hybridrenderingengine
Clustered Forward/Deferred renderer with Physically Based Shading, Image Based Lighting and a whole lot of OpenGL.
Stars: ✭ 563 (+74.3%)
Mutual labels:  graphics, shaders, sdl2, 3d-graphics, graphics-programming, rendering-engine, physically-based-rendering, learning, prototype
Tinykaboom
A brief computer graphics / rendering course
Stars: ✭ 2,077 (+543.03%)
Mutual labels:  graphics, shaders, 3d-graphics, graphics-programming, rendering-engine, learning
Renderhelp
⚡️ 可编程渲染管线实现,帮助初学者学习渲染
Stars: ✭ 494 (+52.94%)
Mutual labels:  graphics, shaders, 3d-graphics, rendering-engine, learning
Tinyrenderer
A brief computer graphics / rendering course
Stars: ✭ 11,776 (+3545.82%)
Mutual labels:  graphics, shaders, 3d-graphics, rendering-engine, learning
Tinyraytracer
A brief computer graphics / rendering course
Stars: ✭ 3,971 (+1129.41%)
Mutual labels:  graphics, shaders, 3d-graphics, rendering-engine, learning
Renderer
A shader-based software renderer written from scratch in C89
Stars: ✭ 1,366 (+322.91%)
Mutual labels:  graphics, shaders, 3d-graphics, graphics-programming
3d Game Shaders For Beginners
🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
Stars: ✭ 11,698 (+3521.67%)
Mutual labels:  graphics, shaders, 3d-graphics, graphics-programming
Tinyraycaster
486 lines of C++: old-school FPS in a weekend
Stars: ✭ 1,383 (+328.17%)
Mutual labels:  graphics, 3d-graphics, rendering-engine, learning
Methanekit
🎲 Modern 3D graphics made simple with cross-platform C++17 meta-API on top of DirectX 12 & Metal (Vulkan is coming)
Stars: ✭ 197 (-39.01%)
Mutual labels:  graphics, shaders, 3d-graphics, graphics-programming
Overload
3D Game engine with editor
Stars: ✭ 335 (+3.72%)
Mutual labels:  graphics, 3d-graphics, rendering-engine, physically-based-rendering
Flycube
Graphics API wrapper is written in C++ on top of Directx 12 and Vulkan. Provides main features including ray tracing.
Stars: ✭ 78 (-75.85%)
Mutual labels:  graphics, 3d-graphics, graphics-programming
payton
Payton! Kickstart any 3D OpenGL + GTK Ideas in a few seconds!
Stars: ✭ 45 (-86.07%)
Mutual labels:  sdl2, graphics-programming, 3d-graphics
Cpp 3d Game Tutorial Series
C++ 3D Game Tutorial Series is a YouTube tutorial series, whose purpose is to help all those who want to take their first steps in the game development from scratch.
Stars: ✭ 400 (+23.84%)
Mutual labels:  graphics, 3d-graphics, graphics-programming
Yocto Gl
Yocto/GL: Tiny C++ Libraries for Data-Driven Physically-based Graphics
Stars: ✭ 1,391 (+330.65%)
Mutual labels:  graphics, 3d-graphics, physically-based-rendering
Godot Texture Painter
A GPU-accelerated texture painter written in Godot 3.0
Stars: ✭ 155 (-52.01%)
Mutual labels:  graphics, graphics-programming, physically-based-rendering
Lume
Create CSS3D/WebGL applications declaratively with HTML. Give regular DOM elements shadow and lighting.
Stars: ✭ 445 (+37.77%)
Mutual labels:  graphics, 3d-graphics, graphics-programming
Cluster
Clustered shading implementation with bgfx
Stars: ✭ 180 (-44.27%)
Mutual labels:  graphics, shaders, physically-based-rendering
Vxr
General purpose engine written in C++ with emphasis on materials rendering (PBR, clear coat, anisotropy, iridescence)
Stars: ✭ 181 (-43.96%)
Mutual labels:  graphics, graphics-programming, physically-based-rendering
DrawSpace
Space-game oriented rendering engine
Stars: ✭ 20 (-93.81%)
Mutual labels:  shaders, graphics-programming, rendering-engine
3D interactive graphics rendering engine
Develop a 3D interactive graphics rendering engine
Stars: ✭ 31 (-90.4%)
Mutual labels:  graphics-programming, rendering-engine, 3d-graphics

Simple Software Graphics Engine(SSGE): A real-time and interactive 3D Renderer built from scratch in C++

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, frustum culling and texture tiling among others.

You can download a demo of it for your machine here:

Project is now on hold :(

Unfortunately this project is no longer maintained. I got hired to work at Rockstar Games as a Graphics Programmer shortly after posting this and don't have the time to work on a sideproject of this size anymore. I plan on keeping it up (as well as my other major graphics project HRE) so others can see what it took me to break into the industry. I will still be helping anyone who runs into any issues with it or has any questions about it. Feel free to reach me here or at my twitter about this or any other GFX topic you'd like to talk about! Thanks to everyone who checked this project out! :D

Render Samples

Louis XIV de France, Louvre, Paris. Scan by HoangHiepVu

Utah teapots with 5 different materials

Chest PBR Test model from @Emackey

Cerberus PBR test model by Andrew Maximov

Orbiting the chest

Development & Feedback

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.

Goals

  1. Demonstrate my C++ Knowledge
  2. Satisfy a life long curiosity about computer graphics
  3. Keep the renderer Real-Time (original goal was 16ms actual ~29ms)
  4. Minimize external library usage to minimum
  5. Multiplatform development
  6. Use modern computer graphics techniques
  7. Learn to self-manage and architect "large" projects

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:

Talk Slides

Main Features

Rendering

  • Parallelized forward renderer
  • Programmable vertex & fragment shaders using C++ virtual functions
  • Physically Based Shading
  • Metallic workflow
  • Cook-Torrance specular BRDF ( w/lambert diffuse)
  • Perspective Correct Interpolation
  • Tangent Space Normal Mapping
  • Ambient Occlusion mapping
  • Reverse (AKA logarithmic) Z-Buffering [1,0]
  • Pre-vertex shader back-face Culling
  • View Frustrum culling
  • Gapless triangle rasterizer
  • Fast Gamma correction
  • Directional Lighting
  • Bilinear Texture Filtering
  • Seamless texture repeat
  • Flat, Gouraud, Phong, Blinn-Phong shaders (deprecated in favor of PBR)

Engine

  • SDL2 Backend
  • Multiplatform executables
  • Scene Switching
  • Free moving camera
  • Orbiting Camera mode
  • Camera FOV controls
  • Templated Vector Math / Linear algebra library
  • .Obj file parser
  • Scene content outlined in .txt file
  • Texture tiling to reduce cache misses
  • Multithreading per object and vectorization within lighting shader
  • Fully commented for future referencing
  • Image loading through stb-image
  • Axis aligned Bounding Box generation and reconstruction

Known Issues

  • Moire Pattern and specular aliasing due to lack of texture minification
  • Dark metallic objects due to lack of Image Based Lighting (or similar solution)
  • Jaggies from lack of antialiasing
  • No shadows causing undesired illumination in some models
  • Stuttering during slow rotations from lack of sub-pixel precision

References

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:

Model & Texture Acknowledgements

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.

License

MIT License

Copyright (c) 2018 Angel Ortiz

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].