January 2014
Intermediate to advanced
430 pages
9h 51m
English
In this recipe, we will look at the HLSL shader code necessary to read from the G-Buffer's resources. We will then use the screen-aligned quad to implement a debug pixel shader for displaying information from the G-Buffer to screen.
We will follow on from where we left off with Filling the G-Buffer using the same G-Buffer layout as described in that recipe, and make use of the screen-aligned quad from Implementing a screen-aligned quad renderer.
First let's begin by outlining the HLSL code necessary to extract the attributes from the G-Buffer.
// Structure for holding loaded G-Buffer ...
Read now
Unlock full access