A high-performance, modular 3D rendering engine architecture built with Modern OpenGL 4.6 and C++20.
Pyre is a research-oriented graphics engine designed to explore advanced real-time rendering techniques. It implements a modern deferred-style architecture within a forward renderer, utilizing Uniform Buffer Objects (UBOs) for efficient data transport and Geometry Shaders for complex shadow generation.
The project features a self-contained CMake build system that automatically manages dependencies including GLFW, Assimp, and GLAD, ensuring a streamlined cross-platform compilation process.
Omni-Directional Point Shadows Dynamic omni-directional shadows using Geometry Shaders.
point.shadows.mp4
Cascaded Shadow Maps (CSM) High-resolution directional shadows with cascade splits.
csm.mp4
| Environment Mapping Reflections | Non-Photorealistic Rendering (Toon) |
|---|---|
![]() |
![]() |
| Real-time reflections using skybox environment mapping. | Stylized rendering with discretized lighting bands and rim highlights. |
| Hardware Instancing (1M+ Entities) | Post-Processing Pipeline |
|---|---|
![]() |
![]() |
| High-throughput rendering using vertex attribute divisors. | Framebuffer-based effects chain (Inversion). |
- Advanced Shadow Mapping:
- Cascaded Shadow Maps (CSM): Implemented for directional lights to maintain high-resolution shadows across large view distances using texture arrays.
- Omnidirectional Shadow Mapping: Utilizes Geometry Shaders to clone geometry onto Cubemap Arrays in a single pass, significantly reducing CPU draw call overhead.
- Percentage-Closer Filtering (PCF): Applied to both shadow techniques for soft-edge filtering.
- Modern Data Architecture: Extensive use of Uniform Buffer Objects (UBOs) with strict
std140memory layout for efficient global state management (Camera, Lights, Shadow Matrices). - Hardware Instancing: Optimized rendering path for high-density scenes (e.g., asteroid belts) capable of pushing millions of polygons at interactive framerates.
- Geometry Shaders: Utilized for point light layer selection and debug visualizations (vertex normals).
- Entity-Component System: Flexible object composition using
Entity,MeshComponent,ModelComponent, andSkyboxComponent. - Modular GLSL Preprocessor: Custom shader compilation pipeline supporting
#includedirectives to modularize lighting and UBO definitions. - Asset Management: Centralized
ResourceManagerproviding thread-safe loading, caching, and reference counting for textures, models, and shaders. - Scene Management: Abstract scene system allowing for hot-swapping between different rendering environments and logic states.
- Post-Processing Stack: Extensible
PostProcessingPipelineclass managing ping-pong framebuffers for screen-space effects.
Ensure the following tools are available in your environment:
- C++20 Compliant Compiler (MSVC 19.28+, GCC 10+, or Clang 10+)
- CMake 3.16 or higher
- Git
Note: Dependencies such as GLFW, Assimp, GLM, and GLAD are fetched automatically via CMake.
- Clone the repository.
- Open Visual Studio.
- Select Open a Local Folder and target the
pyredirectory. - Allow CMake to configure the project cache.
- Select Pyre.exe as the startup target and run.
# 1. Clone the repository
git clone https://github.com/Open-Source-Chandigarh/pyre.git
cd pyre
# 2. Generate build files
mkdir build && cd build
cmake ..
# 3. Compile
cmake --build . --config Debug
### **Run the Engine**
```bash
# Windows
.\Debug\Pyre.exe
# Linux / macOS
./Pyre
Key Action
W, A, S, D Move Camera
Mouse Look Around
Scroll Adjust FOV
Right Arrow Next Scene
Left Arrow Previous Scene
F Toggle Wireframe
R Reset Camera
ESC Lock/Unlock Mouse
Pyre/
├── CMakeLists.txt # Build configuration
├── .gitignore # Ignore build artifacts
├── src/ # Engine source
│ ├── main.cpp # Entry point & game loop
│ ├── core/ # Engine internals
│ │ ├── rendering/ # Renderer, Mesh, Model, FBO
│ │ │ └── geometry/ # Procedural shapes (Cube, Sphere, Torus)
│ │ ├── Window.cpp # GLFW window wrapper
│ │ └── InputManager.cpp # Input processing
│ └── scenes/ # Example scenes
├── includes/ # Public headers
│ ├── core/ # Engine interfaces
│ ├── scenes/ # Scene declarations
│ └── thirdparty/ # GLAD, stb_image, etc.
├── shaders/ # GLSL programs
│ ├── modularVertex.vs # Vertex uber-shader
│ ├── modularFragment.fs # Lighting uber-shader
│ ├── includes/ # Shared GLSL modules
│ └── postprocessing/ # Screen effects
└── resources/ # Assets
├── models/ # OBJ files
└── textures/ # Diffuse/specular maps, skyboxes
Want to implement Shadow Mapping, Normal Mapping, or optimizations?
git checkout -b feature/AmazingFeature
# implement your changes
git commit -m "Add AmazingFeature"
git push origin feature/AmazingFeature
Then open a Pull Request.
If you’d like to contribute, please read the CONTRIBUTING.md.
-
Joey de Vries – Creator of LearnOpenGL
-
GLFW, GLAD, GLM, Assimp, stb_image – The tech stack powering Pyre
Licensed under the MIT License. See the LICENSE file for details.



