Syzygy is an engine and renderer I started to study concepts in rendering, engine architecture, and modern Vulkan.
This project was developed in Visual Studio Community 2022 on Windows 11. It has been compiled with both MSVC (cl.exe
) and Clang (clang-cl.exe
) via VS integration.
For now, only Windows is supported, and compilation requires CMake version 3.28 or higher.
Running the engine currently requires a GPU with drivers that supports at least version 1.3.280
of the Vulkan API. The engine relies on the device extension VK_EXT_shader_object
, and likely a few others. VK_EXT_shader_object
does not have wide adoption (as of 2024). The engine is currently not compatible with the emulation layer VK_LAYER_KHRONOS_shader_object
, but this will likely be remedied later on.
You must download the following, or figure out a way to provide the required files yourself:
- Vulkan SDK, at least 1.3.280, for
vulkan.h
,glslangValidator.exe
, and a few debug utilities
CMake is configured to use FetchContent to pull all of the following dependencies from Github. See cmake/dependencies.cmake
for the versions in use.
- fastgltf, for loading 3D models and scenes
- spdlog, for logging
- fmt, for formatting strings. This project uses the version bundled with spdlog.
- glfw, for the windowing backend
- glm, for linear algebra
- Dear ImGui, for the user interface
- implot, for real-time plots in Dear ImGui
- spirv-reflect, for reflecting SPIR-V shader bytecode
- vk-bootstrap, for the initialization of some Vulkan objects
- volk, for dynamically linking to Vulkan
- VulkanMemoryAllocator, for quickly allocating memory via Vulkan
First clone the repo:
git clone https://github.com/EllarBooher/Syzygy.git
To configure and build:
- Open the root folder that git downloaded, directly with Visual Studio.
- Select a build configuration. In order to see their definitions, read
CMakePresets.json
. To add your own local configurations, createCMakeUserPresets.json
. See the official CMake documentation oncmake-presets
for more information. - Run CMake via
Project -> Configure Cache
. Swapping to the desired build configuration should trigger this process by default. This step may take a while, as CMake needs to download the dependencies. - After CMake has finished running, you can build and run
Syzygy.exe
.
Alternatively, you can always run cmake yourself. For example, run the following from a folder outside of the source:
cmake path/including/Syzygy -G "Visual Studio 17 2022"
Some notes on building:
- If you have include-what-you-use installed, there is a CMake cache variable
IWYU_ENABLE
to run it alongside compilation. clang-format
andclang-tidy
are used to enforce coding standards in this project.clang-format
can be ran via a utility target, whileclang-tidy
is enabled withCLANG_TIDY_ENABLE
to run it through CMake'sCMAKE_CXX_CLANG_TIDY
target property. Run theclang-tidy-apply-fixes
utility target to apply the suggested fixes output byclang-tidy
.- CMake is set up to
find_program
for each of these tools, but you can also set their respective[TOOL NAME]_PATH
cache variable to override the location.
Pictured above is the deferred shading with a volumetric model of the sun's scattering in the sky based on "A Scalable and Production Ready Sky and Atmosphere Rendering Technique" by Sébastien Hillaire. Pictured are also sample assets distributed by Khronos Group at https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/ABeautifulGame.
- Deferred shaded opaque geometry
- Dynamic sun and time of day
- Volumetric model of atmospheric scattering
- Free flying camera controlled by mouse and keyboard
- Directional and spot lights
- Runtime reflection of SPIR-V shaders for data verification, easier resource management, and to populate the UI
- Utilizes modern Vulkan features such as Dynamic Rendering, Shader Objects, and Bindless Design via Buffer References and Runtime Descriptor Arrays
- Serialization for UI and saving
- Dynamic scenes with controllable transformations
- Portability of the engine, both for source compilation and required GPU features
- Runtime metrics and benchmarking
- Physically based rendering
- Asset management
- Render graph
- Rigidbody physics engine
- Runtime compilation and modification of shader code
- Multithreading
- Release builds
These are resources and other projects referred to in the development of Syzygy so far.