Skip to content

Capati/odin-vk-guide

Repository files navigation

Odin Vulkan Guide Tutorial

This repository contains the tutorial code and website for odin-vk-guide, an Odin language adaptation of the popular vkguide.dev Vulkan tutorial. Full credit for the original content goes to the authors of vkguide.dev.

Warning

This project is a work in progress. Until all sections are complete, I may need to refactor earlier chapters. If you're reading a chapter that has been affected by changes, please revisit previous sections to understand what has been updated.

Table of Contents

Progress

Here is the progress of each chapter and section in the guide:

0. Project Setup

In this chapter, we setup the build toolchain to compile the project.

  • Building Project
  • Code Walkthrough

1. Initializing Vulkan

In this chapter, we are going to start the tutorial code, and configure the initial Vulkan structures needed to support rendering. We will also be writing the initial render loop, including command buffer and render image management.

  • Vulkan Initialization
  • Vulkan Initialization Code
  • Executing Vulkan Commands
  • Setting up Vulkan commands
  • Rendering Loop
  • Mainloop Code

2. Drawing with Compute

In this chapter, we are going to begin drawing using compute shaders. As part of the chapter, we will also setup DearImgui library to get some user interface.

  • Improving the render loop
  • Vulkan Shaders
  • Vulkan Shaders - Code
  • Setting up IMGUI
  • Push Constants and new shaders
  • Fixing Input Lag (Extra section)

3. Graphics Pipelines

We have already drawn with compute shaders, but in this chapter, we will use the real capabilities of a GPU to draw meshes using the rasterizer systems and the normal graphics pipeline.

  • The graphics pipeline
  • Setting up render pipeline
  • Mesh buffers
  • Mesh Loading
  • Blending
  • Window Resizing
  • Split Engine Logic (Extra section)

4. Textures and Engine Architecture

We are able to draw meshes now, but there are still some things that need doing. This chapter sets up image loading from files to use in shaders, and sets up a rendering architecture that is fast and extensible.

  • Descriptor Abstractions
  • Textures
  • Engine Architecture
  • Setting up Materials
  • Meshes and Camera

5. Scene Graph (Extra Chapter)

Explores the limitations of a traditional pointer-based scene graph (discussed in the previous section) and introduces a refactored, component-based Scene Graph approach.

  • Improving The Scene Graph
  • Render Scene Tree UI
  • Loading and Saving a Scene Graph

6. GLTF loading

With the basics of the engine done, this chapter focuses on loading GLTF files and setting up more advanced rendering features.

  • Interactive Camera
  • GLTF Scene Nodes
  • GLTF Textures
  • Faster Draw

7. GPU Driven Rendering

In this chapter, we are going to continue the evolution of the engine after the 5 core chapters by implementing high performance rendering techniques.

  • GPU Driven Rendering Overview
  • Engine architecture overview
  • Draw Indirect
  • Compute Shaders
  • Material System
  • Mesh Rendering
  • Compute based Culling

Contributing

Everyone is welcome to contribute to the project. If you find any problems, you can submit them using GitHub's issue system. If you want to contribute code or the guide, you should fork the project and then send a pull request.

Compiler rules

To ensure code consistency, please use the following compiler flags. You can test them with the provided build scripts:

-vet -debug -vet-cast -vet-style -vet-using-param -strict-style -disallow-do -warnings-as-errors

License

MIT License, the same from vkguide.dev.

About

In progress vk-guide tutorial using Odin Language.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •