Built-in Render Pipeline
The engine uses the Forward Render Pipeline by default, and the forward render pipeline is executed as shown below:
- ShadowFlow includes a ShadowStage that prepares shadow map for objects in the scene that need to cast shadows.
Deferred Render Pipeline
The engine currently provides a trial version of the builtin deferred render pipeline, which can be used to ease the pressure of lighting calculations for projects with a high number of lights.
The builtin deferred pipeline mainly consists of ShadowFlow, GBufferFlow and LightingFlow stages:
- ShadowFlow is consistent with forward rendering and is used to preform shadow mapping.
- LightingFlow contains a LightingStage and a PostProcessStage, where the LightingStage performs screen-space based lighting calculations on the non-transparent objects output to the GBuffer before painting the translucent objects, and then PostProcessStage will draw the full-screen image obtained by LightingStage to the main screen, and then finally draw the UI.
For custom Standard materials, you need to refer to the built-in builtin-standard.effect to add the corresponding deferred pass declaration for the deferred pipeline. As follows as shown in the figure.
If you need to dynamically set the material Uniform to achieve material effect changes, you need to specify the corresponding pass index to update in the deferred pipeline to take effect, instead of updating the pass with index 0 by default, for example, the builtin-standard material has a corresponding passIndex of 1.