Deferred Rendering

All of the Xenoblade games for the Switch use a rendering technique known as "deferred shading" or "deferred rendering" common in modern game engines.

In a traditional "forward" renderer, all the lighting calculations are performed upfront when drawing the object. Forward rendering is simple to implement and works well with traditional alpha blending and multisample antialiasing (MSAA). Forward rendering is common in older games with simpler graphics or games that need to target 60 fps like Smash Ultimate.

Deferred rendering, on the other hand, writes important shading parameters to screen textures or a "G-Buffer" and "defers" the actual lighting to a separate postprocessing pass. This has the advantage of only needing to calculate lighting once per pixel. This can noticeably improve performance compared to forward rendering in scenes with many lights or complex shading. Deferred rendering tends to be more memory intensive and makes it more complicated to implement effects like transparency or antialiasing. In spite of this, many modern game engines use deferred rendering for the advantages of lighting in screenspace.

Deferred rendering also has practical applications when analyzing rendering and shader code used in game. Shaders assigned to each model tend to be rather short but highly specialized since each shader only needs to write out the basic outputs in the G-Buffer for that model like color or normals. The shaders in the deferred pass are much more complex since they contain the actual lighting calculations. These shaders in the deferred pass apply to all models in the scene since they work in screenspace on the G-Buffer textures. How the game can still render different material types is explained in the Material Types page.