GPU/CPU-Parallelized tile-based software rasterizer & raytracer.
Check gallery.md
for More Example Pictures
Successor to following repos: Ifrit, Aria , Iris (Tiny Renderer CPP) & Iris (Tiny Renderer C#)
The project is organized into following parts.
-
softrenderer
: CUDA and CPU multithreaded SIMD software rasterizer & ray-tracer.- Covers culling, mesh shading pipeline (mesh shader), MSAA (up to 8x), mipmap, anisotropic filtering, SPIR-V JIT execution and shader derivatives.
- CPU rasterizer is organized in TBR-like manner, utilize AVX2 instructions and tag buffer (with early-z) for performance gain.
- For implementation details and performance, check here
-
rhi/vkrenderer
: Vulkan renderer, intended to be the refactored version for my original implementation.- Get rid of messy pass management, synchronization primitives and descriptor bindings in the original repo.
-
meshproclib
: Mesh algorithms.- Nanite-like mesh level of details
-
ircompile
: LLVM JIT compilation for shader codes. -
display
: Presentation and window surface supporting utilities.
WARN: Compiling files inside
dev
branch might yield UNEXPECTED result. Only x86-64 architectureWindows
andUbuntu
are tested. It mainly coversWindows
and someLinux
systems. Other operation systems likeMacOS
are NOT supported.
git clone https://github.com/Aeroraven/Ifrit-v2.git --recursive
Following dependencies should be manually configured. Other dependencies will be configured via submodule.
-
OpenGL >=3.3
-
CMake >=3.24
-
Vulkan SDK 1.3, or at least include:
- Core Features 1.3
- shaderc combined 1.3
- with
mesh_shader
extension
-
LLVM 10 or LLVM 11 (Maybe higher version is OK, but LLVM 18 or higher might not work properly)
Note:
- CUDA support is temporarily not included in repo's CMake.
- Your compiler should support C++20 standards.
Under Refactoring, Linux GCC compilation MIGHT be unavailable now
cmake -S . -B ./build
cmake --build ./build
To run the demo
./bin/ifrit.demo
This project relies on following open-source projects. Corresponding licenses are in licenses
folder.
Repository | Usage | License |
---|---|---|
stb | Image Parsing | MIT / Unlicensed |
glfw3 | Window and Display support | Zlib |
spirv-headers | SPIR-V Standard Reference | MIT |
glad | OpenGL Header Generation. | Generated files used |
llvm-project | JIT Runtime | Apache 2.0 |
meshoptimizer | Mesh Algorithm | MIT |
METIS | Mesh Algorithm / Graph Partition | Apache 2.0 |
Vulkan Memory Allocator | Memory Allocation | MIT |
cereal | Serialization | BSD-3 |
tinygltf | Model Loading | MIT |
stduuid | UUID | MIT |
spirv-reflect | Shader Reflection | Apache 2.0 |
shaderc | Shader Compilation | Apache 2.0 |
And for debugging
- RenderDoc, for debugging and inspecting.
And some references that give inspirations. Thanks for their selfless dedications.
Software Rasterization:
- https://tayfunkayhan.wordpress.com/2019/07/26/chasing-triangles-in-a-tile-based-rasterizer/
- https://www.slideshare.net/slideshow/optimizing-the-graphics-pipeline-with-compute-gdc-2016/59747720
- https://docs.nvidia.com/cuda/cuda-c-programming-guide/
- https://llvm.org/docs/LangRef.html
- https://www.mesa3d.org/
- https://agner.org/optimize/
Modern Graphics Pipeline
- https://advances.realtimerendering.com/s2021/Karis_Nanite_SIGGRAPH_Advances_2021_final.pdf
- https://qiutang98.github.io/post/%E5%AE%9E%E6%97%B6%E6%B8%B2%E6%9F%93%E5%BC%80%E5%8F%91/mynanite01_mesh_processor/
- https://jglrxavpok.github.io/2024/01/19/recreating-nanite-lod-generation.html
- https://lesleylai.info/en/vk-khr-dynamic-rendering/
- https://vulkan-tutorial.com/
- https://poniesandlight.co.uk/reflect/island_rendergraph_1/
- https://dev.to/gasim/implementing-bindless-design-in-vulkan-34no
- https://github.com/KhronosGroup/Vulkan-Samples