Modern Vulkan

modern vulkan image

Intro

A game engine using modern vulkan techniques such as descriptor buffers, dynamic rendering and pipeline state-less rendering using VK_EXT_shader_object.

This game engine was created after my attempt at a cross-platform DirectX12 and Vulkan renderer to discover the differences between the APIs. After learning about the new vulkan extensions I decided to create a pure vulkan renderer using the new extensions.

Besides the renderer, the engine has many additional elements for my learning of game engine architectures.

Project overview

View repository

Engine standouts

Created using the BBFramework, my custom framework

My own framework to replace parts of the STL to learn how and why it works. At times adjusting it to exactly what I need. Most data containers and cross-platform code comes from here. The base bones of the project. This project has a modified version of the BBFramework and is consindered to be the most up to date.

Tight memory control

Most if not all memory is managed via memory arena's, which are linear allocators with debug functionality to track memory usage. There are memory interfaces for freelists, but the underlying memory comes from a linear allocator.

ECS - WIP

The engine's internals will be using an ECS system per scene. This will simplify the scene rendering a whole lot.

Multiple scenes with async updating

The engine is made to support multiple scenes. With the image above you can see the the showcase rendering scene, and a game scene with a generated "dungeon" layout. These scenes can be updated async and you can have multiple of these scenes. All scenes handle their own input events and scenes have a compile-time enforced interface due to c++20 concepts.

Custom math library

In order to learn the underlying math I have implemented most math functions and primitives myself. Pure for learning.

Content

Rendering Features: 1

Bloom

The renderer supports bloom, this is implemented with a ping-pong render target, with the final render target being the geometry pass result.

With the above solution there is no need to do any manual blending.

Shadow Mapping

The renderer supports multiple lights and shadow maps. Each frame holds a number of textures that represent these shadow maps.

The shadow maps are represented as an texture array.

shadow mapping image
Engine Features: 1

Dynamic Shader loading

The engine support hot reloading shaders, it came very useful when developing the bloom and shadow map shaders.

Material change on models

The engine supports changing materials on models, in this example the models waves and is transformed to a lower resolution.

Rendering Features: 2

Normal Mapping

The renderer supports normal mapping for pbr

normal mapping image
Engine Features: 2

Coming soon, exploring ECS

This website was partially made with the thanks of our wonderful new technology, ChatGPT