@pixi/3d
    Preparing search index...

    Class BackgroundPassAdvanced

    Draws the view's View3D#background behind the scene: a cubemap, a Hemisphere sky/ground gradient, or a plain colour

    The sky stays at infinity however the camera moves, and takes the view's View3D#exposure and View3D#toneMapping, so it matches materials that reflect the same environment. Fog in the same colour as a plain colour background blends into it exactly. Switching between a cubemap and a hemisphere or colour recompiles the pass's shader. The pass holds the old cubemap until a frame draws another background, which a null background never does; destroying the cubemap before then makes pixi warn.

    It paints colour over whatever its target holds, with no depth test, so add it before its camera's opaque draw. The default graph draws one for the view's camera; any other camera draws no sky unless you add a BackgroundPass with that camera from a Pass3D#build.

    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

    • Skips the frame when the view has no background

      Parameters

      Returns boolean

      Whether the view has a background to draw

    • Releases the pass's shader, sky cube, bind groups and uniform buffer; the view's background texture stays alive

      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

    • Declares colour and depth writes on its camera's target, or on the scene's

      Parameters

      • b: PassBuilder

        The builder recording this pass's resource accesses

      Returns void

    • Frees the gradient's uniform buffer on the GPU; the next frame drawing a hemisphere or colour uploads it again

      Returns void