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.
Readonly AdvancedinputWhether the effect's input has mips, for an effect that reads coarse levels with
sampleColorLod, such as a blur
Costs a mip generation every frame and about a third more memory for the input, so leave it
false unless the effect samples levels above 0.
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.
Readonly AdvancedstageThe stage the effect runs at, set by the stage option
StaticdefaultDefaults for every new TintEffect; an option passed as undefined keeps its default
Colour the frame is multiplied by
Takes any ColorSource and reads back as a hex number.
Sets the colour the frame is multiplied by
Any colour; its alpha is ignored.
Advanced
Adds this effect's passes to the graph
The default adds one FullscreenPass that draws fragment, binding the
scene depth only when the fragment calls sampleDepth, viewPos or depthTexel by name. On an
antialiased canvas, reading the depth costs a copy of it each frame, shared by every effect that
reads it. Override it for a multi-pass effect, as the class docs show; Pass3D#build says
when handles become textures.
Render graph being built; add passes and transients to it.
This effect's input and output, plus the renderer and opaque copies
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.
Multiplies the frame by a flat colour
By default it tints the finished picture, after the tone curve, as
Container.tintdoes in 2D. Withstage: 'beforeToneMapping'it tints the scene's light instead.Example