AbstractWhether this pass runs
Flipping it rebuilds the view's render graph on the next render, which suits a settings toggle but not a change every frame; animate an effect's own properties instead. It can also recompile the view's materials; View3D#passes says when.
Optional ReadonlyrequiredExtra outputs the view's scene draw writes beside its colour while this pass is enabled
Each costs the scene draw a texture and the shader work to fill it, and any output makes the view draw its scene into a texture first, as a post effect does. Reach an output's texture with RenderGraph#getSceneOutput, to read it or draw into it.
Abstract ReadonlystageThe PassStage at which the view calls Pass3D#build
AbstractbuildAdvanced
Adds this pass's render passes and textures to the graph
Called once per graph build at this pass's stage. Handles become textures only inside a render
pass's render(session), through RenderGraph#getTexture, never here.
Render graph being built; add passes and transients to it.
Renderer and shared handles for this build.
Releases GPU resources the pass made outside the graph; the base class has none
The view never calls it, not on replacing view.passes nor on its own destroy, since a pass
can be shared. Call it yourself once the pass is retired. Override it only for resources of your
own: the render passes added in build go with the view's graph, and a plain UniformGroup
needs no release.
Base class for everything added to View3D#passes
A pass needs no renderer to construct, can be shared across views, and holds the properties you tune. When a view builds its render graph, it calls Pass3D#build at the pass's PassStage, and the pass adds its render passes there. Array order only matters between passes at the same stage.
MeshPass redraws opted-in meshes with an override shader, and PostEffect runs a fullscreen fragment over the frame. Subclass this directly for anything else.
Example