Graphics Reference
In-Depth Information
See also
F Refer to the Reading the G-Buffer recipe to read the G-Buffer and reconstruct the
position from depth
F Compact Normal Storage for Small G-Buffers at http://aras-p.info/texts/
CompactNormalStorage.html
F Inline format conversion reference at http://msdn.microsoft.com/en-us/
library/windows/desktop/ff728753(v=vs.85).aspx
F Hardware support for Direct3D 10Level9 Formats at http://msdn.microsoft.
com/en-us/library/windows/desktop/ff471324(v=vs.85).aspx
F Hardware support for Direct3D 11.1 Formats at http://msdn.microsoft.com/
en-us/library/windows/desktop/hh404483(v=vs.85).aspx
F Interesting links on tiled forward shading techniques at http://aras-p.info/
blog/2012/03/27/tiled-forward-shading-links/
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 its input and output structures. We'll then
move onto creating the C# renderer class ScreenAlignedQuadRenderer :
1. Begin with a new HLSL shader file, SAQuad.hlsl , including Common.hlsl for
the PerObject constant buffer matrices and adding the following new structures:
#include "Common.hlsl"
struct VertexIn
{
float4 Position : SV_Position;
 
Search WWH ::




Custom Search