Taos API Reference
    Preparing search index...

    Interface Frame

    Per-frame context handed to every RenderFeature. Engine populates the pre-bucketed draw lists, camera, timing, and the active RenderGraph before invoking update and addPasses on the registered features.

    Features read inputs (opaque, camera, ...) and write outputs into the mutable slots (hdr, gbuffer, shadowMap, ao, ...). Custom features that need to share handles outside the well-known slots use extras.

    interface Frame {
        ctx: RenderContext;
        scene: Scene;
        camera: Camera;
        dt: number;
        time: number;
        frameIndex: number;
        opaque: DrawItem[];
        transparent: ForwardDrawItem[];
        shadowCasters: ShadowMeshDraw[];
        graph: RenderGraph;
        backbuffer: ResourceHandle;
        viewport: { x: number; y: number; width: number; height: number } | null;
        transparentBackground: boolean;
        hdr: ResourceHandle | null;
        gbuffer: GBufferHandles | null;
        shadowMap: ResourceHandle | null;
        ao: ResourceHandle | null;
        ssgi: ResourceHandle | null;
        depth: ResourceHandle | null;
        velocity: ResourceHandle | null;
        exposureBuffer: ResourceHandle | null;
        lightingCameraBuffer: ResourceHandle | null;
        lightingLightBuffer: ResourceHandle | null;
        extras: Map<string, unknown>;
    }
    Index

    Properties

    scene: Scene
    camera: Camera
    dt: number

    Delta time in seconds since the previous frame.

    time: number

    Seconds since engine start (mirrors ctx.elapsedTime).

    frameIndex: number

    Monotonically increasing frame index.

    opaque: DrawItem[]

    Opaque draw items collected from MeshRenderers whose material is opaque.

    transparent: ForwardDrawItem[]

    Transparent draw items collected from MeshRenderers whose material is transparent.

    shadowCasters: ShadowMeshDraw[]

    Shadow-caster mesh draws collected from MeshRenderers with castShadow=true.

    Fresh per-frame render graph (or the cached graph when reused).

    backbuffer: ResourceHandle

    Backbuffer handle (always set by Engine before features run).

    viewport: { x: number; y: number; width: number; height: number } | null

    Output viewport rectangle in physical pixels, or null for the full backbuffer. Set by the engine's WebXR path so the final blit lands in the current eye's region of the shared projection-layer texture; null in the ordinary single-view path.

    transparentBackground: boolean

    True when the frame should composite over a transparent background — set by the engine in AR passthrough (immersive-ar). Features that own the background (sky clear, tonemap) honor it: clear color alpha 0 and preserve the scene's coverage alpha to the backbuffer so the real-world camera feed shows through where nothing was drawn. False in ordinary opaque rendering.

    hdr: ResourceHandle | null

    Current HDR working target. Features that write color (sky/atmosphere, lighting, particles, overlays) update this to chain.

    gbuffer: GBufferHandles | null

    Deferred GBuffer once a geometry feature has produced one.

    shadowMap: ResourceHandle | null

    Cascaded shadow map produced by the shadow feature.

    ao: ResourceHandle | null

    Half-res AO target produced by the AO feature.

    ssgi: ResourceHandle | null

    Screen-space global-illumination irradiance buffer produced by the SSGI feature. DeferredLightingFeature consumes it as the indirect- diffuse term when present.

    depth: ResourceHandle | null

    Scene depth produced by whichever geometry/forward feature ran. In deferred mode this aliases gbuffer.depth; in forward mode the forward feature populates this with its own depth attachment so post-process features (TAA, DoF) work in both pipelines.

    velocity: ResourceHandle | null

    Screen-space velocity buffer (rg16float, UV-delta = current − previous) produced by VelocityFeature, encoding camera + per-object motion. Shared so TAA and motion blur reproject through one pass instead of each re-rasterizing their own. Null when no velocity feature ran.

    exposureBuffer: ResourceHandle | null

    Auto-exposure buffer if the auto-exposure feature is enabled.

    lightingCameraBuffer: ResourceHandle | null

    Persistent camera/light uniform buffers exposed by DeferredLightingFeature for downstream features (composite, godrays, etc.).

    lightingLightBuffer: ResourceHandle | null
    extras: Map<string, unknown>

    Open slot for features to pass handles around outside the well-known fields. Keyed by feature-defined strings.