Frame Analysis — Mortal Kombat 11
Mortal Kombat 11 is one of the most impressive looking games to come out in 2019, with amazing facial animations, shadows, lighting, and postprocessing effects. That’s besides the fact that the game is really fun, with complex fight sequences and a thrilling storyline.
Because of Mortal Kombat 11’s impressive presentation, I just had to take a look at their renderer to see what’s powering those awesome graphics, and I’m eager to share what’s in it.
Note: This is not an official analysis of their renderer. Please support Mortal Kombat 11 by purchasing a copy of it to see this tech in action.
Shadow Pass
Each frame starts with the Shadow Pass.
Each shadow map is composed of a 4x super-sampled (SSAA) shadow depth stencil map, which is then converted to a 4 channel Moment Shadow Map (MSMs) [Peters et al. 2016], with each channel storing zz, z²z2, z³z3 and z⁴z4.
This map is later used in a shadow resolve pass prior to lighting. The result is some of the best shadow quality raster based shadow methods can offer.
This scene had 3 of these shadow casting lights encoded in a texture array.
G-Pass
The General Pass (G-Pass) stood out for looking pretty strange in Mortal Kombat 11. There are 4 feature buffers storing compressed data such as luminosity, view space normals on the X axis, linear depth (which implies that Mortal Kombat uses meters (m) units), and odd data such as dithered ambient occlusion and material IDs.
Nearly every material input in the G-Pass is in a Block Compression format.
Ambient Occlusion
Prior to the ambient occlusion pass, view space normals and depth are reconstructed from their compressed G-Buffers, and a hierarchical z buffer is computed. Then ambient occlusion was computed with those buffers in combination with a 32x32
blue noise texture array of size 8
.
Specular Lighting
Specular lighting takes advantage of IBL lighting from a 512x512
cubemap as well as lights in the scene, and is computed in patches with a compute shader.
Diffuse Lighting
The diffuse lighting pass also uses a compute shader and is done in patches.
Volumetric Lighting
Volumetric lighting is done by using linear depth and a scattering and transmission texture.
Temporal Anti-Aliasing
As standard in temporal anti-aliasing, a velocity buffer is used to reproject previous samples over to get the final anti-aliased result.
UI Pass
All UIs in Mortal Kombat are rendered to a separate render target, then layered on top of the final tone-mapped result.
Conclusion
Mortal Kombat is arguably one of the best looking games of the raster based rendering generation. If you have suggestions for a game to analyse, feel free to let me know in the comments below.