Skip to content

A sandbox renderer to explore concepts in Vulkan and engine design.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE.md
MIT
LICENSE-MIT.md
Notifications You must be signed in to change notification settings

EllarBooher/Syzygy

Repository files navigation

Syzygy

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.

Requirements

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.

Dependencies

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

Building

First clone the repo:

git clone https://github.com/EllarBooher/Syzygy.git

To configure and build:

  1. Open the root folder that git downloaded, directly with Visual Studio.
  2. Select a build configuration. In order to see their definitions, read CMakePresets.json. To add your own local configurations, create CMakeUserPresets.json. See the official CMake documentation on cmake-presets for more information.
  3. 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.
  4. 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 and clang-tidy are used to enforce coding standards in this project. clang-format can be ran via a utility target, while clang-tidy is enabled with CLANG_TIDY_ENABLE to run it through CMake's CMAKE_CXX_CLANG_TIDY target property. Run the clang-tidy-apply-fixes utility target to apply the suggested fixes output by clang-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.

Showcase

image 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.

Features

  • 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

Planned Features

  • 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

Resources

These are resources and other projects referred to in the development of Syzygy so far.

About

A sandbox renderer to explore concepts in Vulkan and engine design.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE.md
MIT
LICENSE-MIT.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published