Vulkan Renderer for example and maybe as reference when writing a c++ game or game engine.

#cpp #c++ #gamedev #renderer #vulkan #reference #engine #game-engine #shaders

Jef Belmans 4c052d3e54 Disabled ImGui demo window and disable light rotation 2 years ago
.idea 4c052d3e54 Disabled ImGui demo window and disable light rotation 2 years ago
assets 08b8c60ced Added basic environment mapping 2 years ago
build 4c052d3e54 Disabled ImGui demo window and disable light rotation 2 years ago
cmake-build-release 10bf6e11d9 Finished basic point light implementation 2 years ago
coral_renderer 4c052d3e54 Disabled ImGui demo window and disable light rotation 2 years ago
images 9d061b509e Update coral_scifi_helmet.png 2 years ago
shaders eca876d8ad Small tweaks 2 years ago
third_party 67745238e1 Added ImGui to the frist app class 2 years ago
vk_renderer 6929ec1dc2 Added basic window initialization 2 years ago
.gitattributes f08d330074 Initial commit 2 years ago
.gitignore 70f59523a3 Improved skybox render system 2 years ago
CMakeLists.txt 67745238e1 Added ImGui to the frist app class 2 years ago
LICENSE f08d330074 Initial commit 2 years ago
README.md 7d2facd72d Update README.md 2 years ago

README.md

Coral3D

Vulkan Graphics Engine with Voxel Terrain Generator

This repository contains a basic Vulkan graphics engine implemented in C++ using CMake. It provides abstractions for common Vulkan logic, making it easier to develop graphics applications. Additionally, a branch has been created to develop a small voxel terrain generator using the engine from the main branch. Everything is still very much work in progress and will continue being developed over the summer of 2023.

A screenshot of the famous Sponza scene inside Coral3D

Features:

  • Abstractions for common Vulkan logic, including surface creation, command pools, synchronization structures, and command buffers.
  • Support for validation layers in debug builds.
  • Buffer and image creation helpers.
  • Buffer management for efficient data handling and memory allocation.
  • VMA (Vulkan Memory Allocator) integration for managing Vulkan memory.
  • Swapchain support and surface capabilities querying.
  • Queue family and device extension support checking.
  • Basic point light render system.
  • Basic skybox render system.
  • Environment mapping using fresnel falloff.

Roadmap (priority high to low):

  • Shadow mapping (directional, omni & spot)
  • PBR support
  • Deferred rendering
  • Compute shaders

Prerequisites

  • C++17 or higher
  • CMake (version 3.15 or later)
  • Vulkan SDK

Getting Started

To use this Vulkan graphics engine and voxel terrain generator, follow these steps:

  • Clone the repository and navigate to the project directory.
  • Install the required dependencies.
  • Build the project using CMake.

Engine Usage

The coral_device class provides the main interface for the Vulkan graphics engine. It handles device initialization, command buffer creation, buffer and image management, and more. Refer to the coral_device.h header for a quick look of the available methods. The coral_buffer class provides buffer management for efficient handling of data. Refer to the coral_buffer.h header for a quick look of the available methods.

Voxel Terrain Generator (WIP)

Screenshot of a 9x9 chunk world generated on the fly

The voxel terrain generator is being developed on a separate branch from the main engine. You can switch to the branch and explore the code to understand the implementation. It is still very much a work in progress and is actively being developed.

Roadmap:

  • A definitive world generation algorithm using perlin noise (it only generates flat chunks as of now).
  • Async chunk generation.
  • Chunk manipulation (you cannot place or destroy blocks as of now).
  • Multiple, configurable biomes for use in the world gen. algorithm.

Contributing

Contributions to this project are welcome. If you find any issues or want to add new features, feel free to open a pull request.

License

This project is licensed under the MIT License. Feel free to use and modify the code according to your needs.

Acknowledgments

This Vulkan graphics engine is inspired by various online tutorials and resources such as Vulkan Tutorial, Vulkan Guide and this playlist by Brendan Galea. Go check these resources out, as this engine wouldn't have existed without them!