Don’t miss out the SIGGRAPH talk materials from Tiago Sousa & Jean Geffroy from id Software. They discuss the rendering technology of DOOM.
The talk itself is not yet featured on the SIGGRAPH website, but you can download the slides from the presentation and read the text of the whole talk (which is even better).
At a high level a frame in DOOM looks something as this. We do a Hybrid approach, by using opaque passes and deferred for a nice quality / performance ratio. Using Forward also has some auto-magic benefits for quality ( which we will talk soon ) and things like MSAA. As you might have guessed, being Forward forces us to prepare all lighting and shading data ahead of time as much as possible. That means things like the data structure used to index into things like Light sources, are prepared ahead of time. Shadows are other obvious case. We do quite some work keeping costs down here, resorting to things like caching and smart composite to mitigate costs when update required.
For the deferred stage, we output the minimal data required for doing things like reflections, specular occlusion and so on. I mention approximated times has times are always variable. For example posts can grow when DOF is enabled or some game related Post Process – albeit posts run in Async on consoles and Vulkan.Or the usual Particles, where we can get cases with some heavy overdraw.
To achieve the incredible speed developers kept the amount of shaders to a minimum. There are about 100 unique shaders and the team believes it could actually be less if some tidy up.
Here’s just some slides to show how the team worked with lighting.
You can download the full version of the lecture here (addition). Don’t forget to go over those slides. There’s a lot of very interesting stuff there if you’re into rendering.