Skip to content

Myonmu/VulkanTut

Repository files navigation

Overview

TL;DR: The bumpy ride of Vulkan Learning.

The classic tutorial, named Vulkan Tutorial, is a semi-great place to code in Vulkan, but it comes with a horrific code structure: everything in one file.

Hence, the repo tries to mitigate this:

  • Vulkan objects will be encapsulated in custom wrappers, and usually they have implicit conversion toward the raw Vulkan object. The wrappers follow RAII.
  • Long methods are chopped into smaller chunks
  • Better interdependencies between objects

We also use Vulkan Guide as a supplementary reference.

A homebrew OOP version (more specifically, custom RAII wrappers from scratch), is potentially not optimal compared to the official RAII but should allow us to understand better the inner workings of the API.

State of the Project

Engine Features

  • Going through the tutorial(s)

  • Multi-window rendering (proof of concept) multi-window rendering (same renderpass)

  • Shader reflection

  • ECS (flecs)

  • .obj file handling

  • VMA for buffers and images

  • Render graph <= currently here, since this is the basis for all future rendering features

  • Scene Hierarchy

  • File watch and shader hot-reload

  • Physics engine

  • glTF file handling

Rendering Features

  • MSAA
  • Deferred shading
  • Basic PBR (Cook-Torrance) Comparison with Blender's Eevee engine <- Blender's Eevee engine This Vulkan engine ->
  • Image based rendering
  • Subsurface Scattering
  • Cascade Shadow Mapping
  • Bloom

Installation

The primary IDE used during the development is CLion, but Visual Studio 2022 should work as well. We have only tested building with MSVC.

We use CMake as our build system.

The repo has changed to use vcpkg for package management. Follow Tutorial: Install and use packages with CMake to configure vcpkg on your system.

Architecture

Here are some guides and explanations on consolidated architectural choices, serve as reminders.

(Some architectural choices are under revision, and are not yet presented).

Table of Contents

  1. Style Guide : How are classes, enums, functions named, as well as common macro utilities.
  2. Descriptor Management : The engine's policy for descriptor allocation.

Topics

Here, we discuss some less obvious concepts encountered during the learning process. These are usually quite lengthy and have been moved to dedicated files for clarity.

Table of Contents

  1. Vulkan Initialization and Surfaces
  2. Descriptor Set Layout, Descriptor Pool, Descriptor Set
  3. Pipeline Layout, Pipeline, Descriptor Sets (WIP)
  4. Render Pass and Associated Resources
  5. Attachment Referencing
  6. Render Graph Overview (WIP)
  7. Unreal Engine's Render Dependency Graph (WIP)

About

Homebrew OOP version following https://vulkan-tutorial.com/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published