@pixi/3d
    Preparing search index...

    Class OutputPassAdvanced

    Finishes a view's image: applies the tone curve and display encode to a scene that holds linear light, or copies the image unchanged (see View3D#toneMapping)

    A see-through background keeps its edges over the 2D content beneath. Unless it copies, the pass also dithers so smooth gradients don't band in an 8-bit target. A custom graph whose scene is linear (RenderGraph#sceneIsLinear) needs one to finish the image. Inside a graph builder, pass the builder's options.toneMapping, so a change to View3D#toneMapping reaches the pass when the graph rebuilds.

    graph.addPass(new OutputPass({ renderer, source: graph.sceneColor, toneMapping: options.toneMapping }));
    

    Hierarchy (View Summary)

    Index
    attachedOutputs: readonly SceneOutput[]

    The scene outputs attached after the target colour; see RenderPassOptions#attachedOutputs

    bit: number = 0

    Bit for this pass: the built-in one it was given, or the one its name was assigned

    camera: Camera3D | null

    Camera this pass draws from, or null to draw from the view's own camera

    See RenderPassOptions#camera. While render runs, the GPU viewport is the camera's rect.

    description?: string

    Human-readable explanation of what this pass contributes to the frame

    descriptor?: PassDescriptor

    Shader, state and topology this pass uses for every mesh, from RenderPassOptions#descriptor

    materialBits: readonly ShaderBit[]

    Shader bits a material adds when it draws in this pass, so it writes the attached outputs

    Each attached output's bits entry for this pass's name, in order. A material with a template of its own ignores them.

    name: string

    The pass's name; see RenderPassOptions#name

    outputLocations: readonly string[]

    The output each fragment location of a material shader in this pass writes: color, then each attached output

    pipe: View3DPipe

    The view pipe of the renderer this pass was built for

    • Optional per-frame check; returning false skips the pass, prepare and render included

      The graph asks it before any pass draws, once the scene's transforms and the view's camera are up to date for the frame. Without one, the pass runs every frame.

      Parameters

      Returns boolean

      Whether the pass should run this frame

    • Releases the pass's shader and bind groups, leaving the uniforms it was given to their owner

      Returns void

    • Runs before any pass draws or any render target is bound, once every pass's camera is current

      Override it to upload GPU buffers early. The default does nothing.

      Parameters

      Returns void

    • Draws the effect for this frame, binding its groups in the order the effect template declares

      Parameters

      • session: RenderSession

        Per-frame render session supplying the resolved textures.

      Returns void