This is going to be long so let’s start with the purpose of this article which essentially is to analyze a single frame from the renderer’s point of view. It will briefly describe all the passes and how the data get transformed in order to produce some pretty pixels into the screen.
Some disclaimers before we start:
- It’s not about a perfect renderer. There isn’t such thing. Renderers should adapt to the context (type of game, platforms etc).
- It’s not about a perfect renderer even for my context and standards. I always have ideas for further improvements and I have kept postponing this article until they get materialized. But then new ideas come up and I felt I shouldn’t wait any longer.
- It’s not about a mobile (GPU) friendly renderer. It’s a desktop oriented one.
- It doesn’t reflect how the renderer will look like in a month from now. I tweak it almost daily.
These are some terms used throughout this article:
- Graphics pass: A series of drawcalls that affect the same output. In Vulkan terminology it’s a VkRenderPass pass with a single subpass.
- Compute pass: A compute job or a series of compute jobs that affect the same output.
- Render target: Part of the output of a graphics render pass.
- Texture: A sampled image that is used as input in compute or graphics passes. Some render targets may be used as textures later on.
- GI: Global illumination.