Castor3D 0.16.0
Multiplatform 3D engine
|
The rendering in Castor3D is splitted in several passes:
This pass generates the environment map for one node that needs it.
Note that multiple nodes can need a different environment map, thus trigger multiple environment passes.
It is splitted in 3 specific passes:
Its result is stored into a cube map.
This pass generates shadow map for one light source.
The engine currently supports three light source type, with their specific shadow passes:
That being said, it is also important to note that point and spot shadow maps are stored in texture arrays (Cube an 2D, respectively).
The cascades of the directional shadow map are also stored in a 2D texture array.
It allows to limit the number of texture bindings, especially for passes using forward rendering.
Since Castor3D allows the user to choose the shadows type he wants (Raw, PCF or VSM), the results are always stored in textures using the R32G32_SFLOAT pixel format.
This pass is the most complex one, it contains multiple subpasses:
This pass is the geometry pass, generating the buffers needed for the other subpasses.
Castor3D uses currently 5 (+1) buffers:
This pass implements the Scalable Ambient Obscurance algorithm described here: https://research.nvidia.com/sites/default/files/pubs/2012-06_Scalable-Ambient-Obscurance/McGuire12SAO.pdf
It is thus splitted in three subpasses:
This pass is actually a group of lighting subpasses, one subpass per light source.
If the light source generates shadows, its shadow map will be used, to produce shadows of the type chosen by the user.
The point and spot light passes first run a stencil pass, to reduce their effect area.
This pass implements the Screen-Space Subsurface Scattering algorithm described here : http://www.iryoku.com/sssss/
It is thus splitted in four passes:
This pass combines the results of all the previous passes:
This pass is the most simple one, it just draws the scene's skybox.
It is performed after the opaque objects pass to have the benefits of a depth test, after the depth buffer is filled by the opaque pass.
This pass implements the blended weighted rendering described here: http://jcgt.org/published/0002/02/09/paper.pdf
It is thus splitted in two passes: