Our new GPU upload system has separate upload heap for big one shot texture/buffer initial data uploads and small dynamic data (UBOs, particles, etc).
Semantic difference is that resource upload has immediate life time. Upload data + copy command are a pair. Dynamic data has full frame lifetime guarantee. You can reuse the same dynamic data in all passes during the same frame.
Resource uploads tend to be big and cause a memory spike on the first frame. New design allows fixed memory budget. If the resource upload heap ring buffer head reaches tail, we submit the upload commands and wait for the GPU. This can repeat multiple times, until all resources have been uploaded. In normal steady state the resource upload (and update) ring never exhausts. Extra CPU<->GPU sync(s) on the first frame is not a problem, since the user still sees the loading screen. A potential 1 frame drop at loading screen is preferable to a big memory spike.
We have two pre-created command buffers: offscreen and main (present wait in main). Now we added two pre-created resource upload command buffers, which are executed before offscreen/main. This way we can flush resource uploads even if they were done during rendering. The rendering commands will wait in the command buffer, while we submit the resource upload command buffer (potentially N times). Zero user land code changes were required. No command buffers are created at runtime. We have these four pre-created command buffers for each frame in flight (two in Metal and Vulkan to minimize latency).
Regarding the new Esoterica Engine update. The renderer has been completely rewritten by Kirill Bazhenov. You can find more information about it here:
https://t.co/rqQvGoSieP
I decided to refactor our Vulkan 1.0 style render pass API and move to Metal/WebGPU/Vulkan 1.3 style API with no persistent render pass objects. We had persistent render pass layout objects too. Those are gone as well.
Thread...
Redesigning and rewriting rendering architecture and backends takes time. At HypeHype we were able to freeze the graphics feature development for 7 months to make this happen.
What did we get? Was it worth it? Thread...
This engine is awesome and has a high performance animation system that is capable of animating hundreds of networked characters.
We use this to animate on the server for @TheLegendOfCali and it barely makes a dent in the server performance.
We just pushed a new version of esoterica to github. This is the culmination of around 2 years of work. Massive improvements across the board most notably a modern DX12 renderer.
If you want to build your own engine, it's a great starting point!
https://t.co/wP0aYNCE0f
I wrote my first engine (called Storm3D) during my University studies. Licensed it to FrozenByte and some other Finnish game companies. They shipped a few games using it.
It was a classic object oriented C++ code base with diamond inheritance. That was cool back in the day :)
Different ways to implement instancing.
UBO can be replaced with SSBO to avoid size limits. SSBO doesn't need dynamic binding offset.
The m4x3 is the object matrix. Can be replaced with any shader specific per instance data struct. Shader sees and array of these...
Let's talk about different ways of providing per draw data. What are their CPU and GPU performance implications?
UBOs, instance rate VB, push constants...
Links to some posts I made recently measuring some of these options:
https://t.co/maFemzcQA6
https://t.co/pLBnWVHCz0
If you ever needed stable, unique persistent handles for your data, you might find a slot map data structure useful. It is extremely fast, memory-efficient, and optimized for video games.
https://t.co/7tj3y4OB22
I’m happy to announce the release of a new open source 3D physics engine called Box3D. I’ve been working on this project for a few years now, but it represents over 20 years of experience writing physics engines for games. Read more here: https://t.co/2d9aVuUsxj
Although I have never worked on a game engine, I found this reference many years ago and instantly liked it.
https://t.co/qvB1o3m1ER
It particularly discusses many foundations, from "how computer graphics work" to various design patterns used commonly in game engines. These patterns are interesting reads on their own, and you may find their usage elsewhere, too. Definitely worth reading and saving for later as a reference.
OOP often leads to writing code that processes one object at a time. But the lack of a slice abstraction (reference to a memory region) was also critical. In C++ when you wanted to write a function that processed N objects, there wasn't a clear best practice to do it.
NEW Tutorial on Reading Math Papers!
https://t.co/celgSrNTZD
An overview of mathematics for programmers.
Demystifying the fancy math symbols so you can use equations from more sources!