The multi pass rendering system allows you to describe a complex rendering pipeline as a sequence of render passes that you can then execute at a later stage.
This helps the programmer articulate how the rendering pipeline is defined, and also allows the use of a number of pre-defined post processing effects in combination with custom rendering.
There are a number of pre-define passes available that can be composed in custom render pipelines.
|Clears the Screen|
|Draws a list of models|
|Draws a list of models into the picking buffer|
|Copies output a previous pass (e.g. to the screen)|
|Renders a list of models into the destination framebuffer|
|Renders a texture into the destination framebuffer|
|Automatically builds a render |
A basic set of post processing samples are provided
|Screen space convolution, edge detection, blur, sharpening etc.|
|Stencil buffer based outlining.|
|Depth-buffer based Screen Space Ambient Occlusion|
The multi pass rendering system is designed to be extensible and make it easy to implement new rendering passes. Additional post processing effects can easily be created or ported/adapted to the system.
Shader modules that expose "standard" filtering and sampling functions can be given extra metadata (the
passes field) enabling a
Pass to be automatically instantiated. Look for
ShaderPass badges in the documentation of shader modules.
Since many render passes provide basic image processing effects, that can be desirable to use in non-WebGL focused applications, the multi pass render system comes with a Canvas class that makes it possible to use compatible shader modules directly with browser canvases without explcitly creating WebGL contexts, creating
Texture instances etc.
screenis set to
swapis set, buffers will be swapped.
The luma.gl multi-pass rendering system was inspired by similar systems in other 3D frameworks, in particular by the
EffectComposer system in THREE.js.