TITAN ENGINE

Vulkan driven Mesh shader renderer.

About

Titan is my personal project i have been working on my free time. It is bindless mesh shader renderer that runs on the Vulkan API

Bindless Architecture

When I did research on modern renderers, I stumbled upon Epic Games’ explanation video about how Unreal Engine 5’s renderer is built. From that video, I learned about GPU-driven architecture and running them in retained mode. So I rebuilt the Titan renderer to support GPU-driven architecture. This was actually easier than expected. Due to how mesh shaders work, it was easy to just expand the buffer sizes and instead of indexing from zero every time in the shader, I just stored an offset in every meshlet to fetch the right vertices.

Memory Optimizations

After I implemented these large buffers, I saw that memory usage increased a lot, more than I liked. This led me to a rabbit hole of interesting solutions to this problem. However, I found a really cool implementation from a presentation of Doom Eternal from 2020 where they talked about a lot of interesting optimizations. But the thing that caught my eye was how they handled vertex normals when pushing them to the GPU. They used octahedron normal encoding with quantization. This meant that Doom Eternal could store their vertex normals with just three bytes.

So when I was implementing this into Titan, instead of storing all normals (normal, tangent, bi-tangent) with three bytes (like how Doom Eternal does), I instead stored mine in four bytes. I did this by octahedron normal encoding the normal and tangent down to two float2’s then I quantized the vectors down to two bytes respectively. I do not need to send the bi-tangent to the GPU; instead, I can just calculate the bi-tangent with a cross product. With this memory optimization, the memory usage went down by ONE GB!

Ending Notes

Titan is a really fun side project and I would love to expand it further. If you want to see the source code of Titan, it is available on my GitHub. If you have any questions or suggestions, please contact me. I would love to hear your thoughts about this project!