Implementing a screen-aligned quad renderer

Screen-aligned quads, also known as fullscreen quads, are a staple of deferred rendering techniques. They have traditionally been used to perform a range of screen-space operations, such as applying ambient lighting or implementing screen space ambient occlusion (SSAO), and provide a convenient method of addressing information within the G-Buffer.

Although image filtering and computation can be performed within compute shaders, the final result still needs to be presented to the screen, and this is usually through a screen-aligned quad. This recipe can be used where screen-space operations are required or visualization of textures is necessary.

How to do it…

We will begin by creating the vertex shader and ...

Get Direct3D Rendering Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.