Whether 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.
ReadonlynamePass name materials opt in with
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.
StaticdefaultDefaults for every new OutlinePass; an option passed as undefined keeps its default
The stage the pass draws at; MeshPassOptions#stage says how it's picked when left out
Adds the draw of this pass's meshes
Render graph being built.
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.
Draws an ink outline around opted-in meshes, for a toon look
Each mesh is redrawn as a slightly larger shell showing only its back faces, which the mesh hides except for a rim around its silhouette. Add the pass to
View3D.passes, and opt a mesh in withpasses: { outline: true }on its material. Skinned and morphed meshes outline correctly.Example