DeferredShading

Last Revision:
Version 2.0, 2015-07-08
Updated to OpenGL Core Profile, Xcode 10.10 SDK.
Build Requirements:
OS X 10.10 SDK or later
Runtime Requirements:
OS X 10.8 or later

This example demonstrates deferred shading. In deferred shading, no shading is performed in the first pass of the vertex and pixel shaders. Shading is deferred until a second pass. On the first pass, information needed for shading (position, normal, depth, albedo) are rendered into the geometry buffer (G-buffer) as a series of textures. After this, a pixel shader computes the direct and indirect lighting at each pixel using the information of the texture buffers in screen space.