How to implement single pass multiview rendering
XR devices must render scenes at least twice for each frame, generating one image for each eye. Single pass multiview rendering is a technique used to enhance the performance of XR applications by allowing the rendering of multiple views in a single pass. This effectively enables the rendering of the scene from both eye’s perspectives with one draw call.
In this recipe, we will navigate how to enable the Multiview rendering feature in Vulkan and how to use it to render the scene for both eyes in one render pass.
Getting ready
In the context of Vulkan, the VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES
extension specifies whether multiple views are supported in a single rendering pass. Once the feature is enabled, you can specify multiple viewports and scissor rectangles for your rendering pass. The graphics pipeline will then render the scene from different perspectives in a single pass, reducing the need for duplicate...