Qt 3D: Deferred Renderer C++ Example
Deferred Renderer demonstrates using a two pass rendering method. First, all the meshes in the scene are drawn using the same shader that will output the following values for each fragment: world normal vector, color, depth, and world position vector.
Each of these values will be stored in a texture, which together form what is called the G-buffer. Nothing is drawn onscreen during the first pass, but rather drawn into the G-buffer ready for later use.
Once all the meshes have been drawn, the G-buffer is filled with all the meshes that can currently be seen by the camera. The second render pass is then used to render the scene to the back buffer with the final color shading by reading the values from the G-buffer textures and outputting a color onto a full screen quad.
For more information, see Deferred Renderer.
Running the Example
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.