@pmndrs/reflections
    Preparing search index...

    Class FrameGBuffer

    Renders a scene into the frame-contract G-buffer and hands out the GPU textures.

    const gbuffer = new FrameGBuffer(renderer);
    const frame = gbuffer.render(scene, camera); // FrameInputs: GPUTextures + conventions + camera

    Each render() is one frame of history: the camera struct and the motion target both take the previous render as "last frame" (two renders in one animation frame are fine). Objects keep their history in three, per draw in a velocity MRT pass: render an object in one such pass per frame (this one), or its motion goes to zero. Skinned meshes' previous bones advance once per animation frame (three). The first render and the one after resetHistory() write zero motion. Transparent objects blend into output (scene colour) only; the guide targets take whatever was drawn last. Not supported: logarithmicDepthBuffer (the constructor throws).

    Index
    clearcoat: boolean

    The clearcoat target is written (see the option).

    lit: boolean

    The lit target is written (in the G-buffer's render, or in a second pass: litPass).

    litPass: boolean

    The lit target is a second render of the scene, not one of the G-buffer's attachments (option lit, D5480).

    litTarget:
        | RenderTarget<Texture<unknown, TextureEventMap>, RenderTargetEventMap>
        | null

    The second pass's target (litPass), null when lit is in the G-buffer or off.

    motionMode: "ndc" | "uv"
    mrt: any
    renderer: WebGPURenderer
    renderTarget: RenderTarget
    specular: boolean

    The specular and shadingRoughness targets are written (see the option).

    textures: Record<FrameTargetName, Texture<unknown, TextureEventMap> | undefined> & {
        depth: DepthTexture;
    }

    three textures by target name (plus depth), for TSL sampling (debug views, composites).

    • Render scene from camera into the G-buffer and return the frame's inputs. jitter: the sub-pixel offset (pixels) already applied to camera this frame, if any. projection: the unjittered projection when camera.projectionMatrix carries jitter (e.g. setViewOffset). It becomes camera.projection in the contract and drives motion, so motion is unjittered; camera.projectionJittered keeps the rasterised one.

      Parameters

      • scene: Scene
      • camera: Camera
      • opts: { jitter?: readonly [number, number]; projection?: ArrayLike<number> } = {}

      Returns FrameInputs