summaryrefslogtreecommitdiffstats
path: root/tests/manual/deferred-renderer-cpp/doc/src/deferred-renderer-cpp.qdoc
blob: f4fb25938dbc8831a456172c0c0ec1da0373aa16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \example deferred-renderer-cpp
    \title Qt 3D: Deferred Renderer C++ Example
    \ingroup qt3d-examples-cpp
    \brief A C++ application that demonstrates rendering to an intermediate
    G-buffer.

    \e {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 \l{Deferred Renderer}.

    \include examples-run.qdocinc
*/