Let the mask own the effect.
The previous lab masked a mesh on the main canvas. This one moves the
same stencil idea into an ordered postprocessing chain: render the
scene, define an ellipse with MaskPass, apply custom
ShaderPass effects only inside it, clear the mask, then
finish with OutputPass.
Preparing direct and EffectComposer render paths...
- renderer
- -
- architecture
- -
- chain
- -
- mask
- -
- buffer
- -
- passes
- -
- frame ms
- -
- resources
- -
The active chain is RenderPass → MaskPass → Grade → Pulse → ClearMaskPass → OutputPass.
EffectComposer.readBufferprevious resultMaskPass.needsSwap = falsestencil-only passMaskPass.inverseinside / outside policyShaderPass.needsSwap = trueeffect writes next bufferClearMaskPassstencil test disabledOutputPasstone/color transform lastComposer mask handling copies the untouched region around each swapping effect, so subsequent passes can modify only the stencil-selected pixels.
The ellipse is drawn by a separate mask scene; it does not appear in the color buffer unless the outline helper is enabled.
Derived from the official advanced postprocessing example and current EffectComposer, RenderPass, MaskPass, ClearMaskPass, ShaderPass, and OutputPass docs.