Project Overview
Project Progress
Finished 85%

Project Type

Vulkan Renderer

Team Size

1 Person

Roles

Graphics Programmer

Platform

Windows

Duration

46 Days

Find the code on

VRenderer is my first attempt at writing a Vulkan Renderer.



VRenderer began as a self-study project in my third year of University. I had just finished my summer internship at Traverse Research, and my Team at University and I started working on a VR Game in Unreal Engine. While that was fun, I missed working with an actual Graphics API. Thus, I started using the self-study time at university to learn how to use Vulkan and, hopefully, have a functioning renderer. I worked on it every Friday, and it has been a delightful, though difficult, experience.

Features

Planned Features

Main Features

Model Rendering

Particle System in Compute Shaders

You can use the Renderer to load and render .obj files. It has a variety of features, including texturing, depth buffering, in-flight synchronisation, and MSAA. To make usage simpler, I offer a generic buffer class, as well as more specialised Buffer Classes such as Vertex Buffers. I also provide my own Device, Image, Model, SwapChain, and Texture classes.

Recently, I implemented Compute Shader support on a separate Compute Shader branch. I decided to follow the example provided on vulkan-tutorial.com and created a particle system that is fully updated using the compute pipeline. After that, the Graphics Pipeline takes these particles and draws them during the render pass.

What I learned

I took the initiative to learn Vulkan from scratch. Initially, I aimed to grasp the fundamentals, such as how to display a triangle on the screen. Subsequently, I set my sights on developing my own basic Vulkan Renderer as a Self-Study objective for my entire third year at University. Every Friday (Self-Study-day), I worked on this project. 

I loosely followed the guide at vulkan-tutorial.com, but I did not want to mindlessly mimic it. Therefore, I decided to do two things: First, I would create my own renderer with my own classes and utilise the tutorial only to learn the concepts I needed. Second, I documented everything I learned in my own words via PowerPoint presentations to ensure my comprehension of these concepts.

During this time, I learned a lot about how Vulkan works. I learned about

  • Creating a Vulkan instance
  • Selecting physical and creating logical devices
  • Queue Families (Graphics & Compute)
  • The Swap Chain in Vulkan
  • Image Views
  • Image Objects
  • Image Samplers
  • The Graphics & Compute Pipeline
  • Shader Modules
  • Render Pipelines
  • Frame Buffers
  • The Command Buffer & Command Pools
  • Synchronization Objects (Semaphores and Fences)
  • In-Flight Frame Synchronization
  • Buffers and how to create them (Input descriptions, allocating memory, staging buffers, uniform buffers, vertex buffers, index buffers, shader storage buffers etc.)
  • Descriptors, including Descriptor Set Layouts, Descriptor Sets &Descriptor Pools
  • Layout Transitions
  • Depth Buffering
  • MipMap Generation
  • Multisampling
  • Reading and Writing from and to Buffers on the GPU (Shader Storage Buffers & Storage Images)
  • The Compute Shader Stage & Compute Space (e.g. Work Groups & Invocations)

Find Everything I learned below