Skip to content

πŸš€ C++23 based renderer with Vulkan/OpenGL support. Serves as playground for me to test new CMake/C++/Vulkan/... features.πŸš€

License

Notifications You must be signed in to change notification settings

Kataglyphis/Kataglyphis-Renderer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


VulkanEngine
Kataglyphis-Renderer


VulkanEngine VulkanEngine VulkanEngine OpenGLEngine

A graphics engine built on top of Vulkan+OpenGL. Serves also as playground for learning various best practices in Graphic APIs, CMake, Rust, ....

(see also Official homepage)

Linux build + tests + code coverage Windows build TopLang Donate Twitter YouTube

Official homepage

Key Features β€’ How To Use β€’ Download β€’ Credits β€’ Related β€’ License

Table of Contents
  1. About The Project
  2. Getting Started
  3. Shaders
  4. Tests
  5. Roadmap
  6. Contributing
  7. License
  8. Contact
  9. Acknowledgements
  10. Literature
  11. Common issues

About The Project


VulkanEngine VulkanEngine VulkanEngine


VulkanEngine VulkanEngine
VulkanEngine VulkanEngine

This project provides me a solid Vulkan/OpenGL renderer starting point for implementing modern established rendering techniques and getting quickly started in own research topics.
As this project evolved it gained additional functionality:

  • collecting/using CMake best practices
  • collecting/using C++ best practices and testing new lang features 😊
  • collecting experience in fuzzy/benchmark testing in C++
  • collecting experience in integrating πŸ’Œ Rust πŸ’Œ code in Cmake projects

Frequently tested under

  • [latest windows and ubuntu version]
  • [GCC/CLANG/MSVC/CLANG-CL]

Key Features

Category Feature Implement Status
Vulkan Render agnostic Rasterizer βœ”οΈ
Raytracing βœ”οΈ
Path tracing βœ”οΈ
PBR support (UE4, Disney, etc.) βœ”οΈ
.obj Model loading βœ”οΈ
Mip Mapping βœ”οΈ
OpenGL Render agnostic
Directional Lights βœ”οΈ
Point Lights βœ”οΈ
Spot Lights βœ”οΈ
Directional Shadow Mapping βœ”οΈ
Omni-Directional Shadow Mapping βœ”οΈ
Cascaded Shadow Mapping βœ”οΈ
Cloud system βœ”οΈ
3D-worley noise generation βœ”οΈ
.obj Model loading βœ”οΈ
PBR support (UE4,disney,phong, etc.) βœ”οΈ
Support for #include directives in shaders. βœ”οΈ
Sky box βœ”οΈ
Supporting compute shader βœ”οΈ
On the fly 3D worley/perlin noise creation βœ”οΈ
C++/CMake agnostic Code coverage for Clang βœ”οΈ
Advanced unit testing πŸ”Ά
Advanced performance testing πŸ”Ά
Advanced fuzz testing πŸ”Ά

Legend:

  • βœ”οΈ - completed
  • πŸ”Ά - in progress
  • ❌ - not started

Built With

Useful tools (you might also considering :) )

Getting Started

Prerequisites

Dependencies to libraries are stated above.
C++23 or higher required.
C17 or higher required.
CMake 3.28.3 or higher required.

Optional

Installation

  1. Clone the repo

    git clone --recurse-submodules [email protected]:Kataglyphis/Kataglyphis-Renderer.git
  2. Then build your solution with [CMAKE] (https://cmake.org/)
    Here the recommended way over command line after cloning the repo:

NOTE: Here we use CmakePresets to simplify things. Consider using it too or just build on a common way.

For now the features in Rust are experimental. If you want to use them install Rust and set RUST_FEATURES=ON on your CMake build.

(for clarity: Assumption you are in the dir you have cloned the repo into)

$ mkdir build ; cd build
# enlisting all available presets
$ cmake --list-presets=all ../
$ cmake --preset <configurePreset-name> ../
$ cmake --build --preset <buildPreset-name> .

Alternatively you can use the build scripts I use for my standard configuration:

  • [buildEngine.sh]
  • [buildEngine.bat]
$ {WORKING_DIR}/GraphicsEngineVulkan/buildEngine[.sh/.bat]

Shaders

I provide two ways for compiling shaders with. Hence if you want to add new files as #include in your shaders you have to modify the files: (should be self-explanatory)

  • [include/vulkan_base/ShaderIncludes.hpp]
  • [cmake/CompileShadersToSPV.cmake]

appropriately.

Tests

I have two tests suites.

  1. Compilation Test Suite: This suite gets executed every compilation step. This ensures the very most important functionality is correct before every compilation.

  2. Commit Test Suite: This gets executed on every push. More expensive tests are allowed :)

Static Analyzers

clang --analyze --output-format html $(find Src -name '*.cpp' -o -name '*.cc')
scan-build cmake --build .
clang-tidy -p=./build/compile_commands.json  $(find Src -name '*.cpp' -o -name '*.cc')

Format cmake files

conda create -n cmake_formating python=3.10
pip install pyyaml
pip install cmake-format
cmake-format -c ./.cmake-format.yaml -i $(find cmake -name '*.cmake' -o -name 'CMakeLists.txt')

Format code files

clang-format -i $(find include -name "*.cpp" -or -name "*.h" -or -name "*.hpp")

Docs

Build the docs

pip install sphinx
pip install sphinx-press-theme
pip install myst-parser
cd docs 
make html

Roadmap

Watch the refman generated by doxygen.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the BSD 3-Clause "New" or "Revised" License. See LICENSE for more information.

Contact

Jonas Heinle - @Cataglyphis_ - [email protected]

Project Link: https://github.com/Kataglyphis/GraphicsEngineVulkan

Acknowledgements

You will find important links to information in the code. But here in general some good sources of information:

Thanks for free 3D Models:

Literature

Some very helpful literature, tutorials, etc.

Rust

CMake/C++

OpenGL

Clouds

Noise

Vulkan

Physically Based Shading

Path tracing

Common issues