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 WireframePass; 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.
Debug pass that redraws opted-in meshes as lines over their shaded result
Add it to
View3D.passes, and opt a mesh in withpasses: { wireframe: true }on its material. Depth testing is off, so edges on the far side of a mesh show through. By default it draws after every scene draw, so the lines show over everything.The lines aren't an exact wireframe: the pass draws a mesh's triangle indices in pairs, so some edges are missed and some lines join one triangle to the next. That's enough to inspect a mesh.
Example