Engine API Reference - v2.12.2
    Preparing search index...

    Class CameraFrame

    Implementation of a simple to use camera rendering pass, which supports SSAO, Bloom and other rendering effects.

    Overriding compose shader chunks: The final compose pass registers its shader chunks in a way that does not override any chunks that were already provided. To customize the compose pass output, set your shader chunks on the ShaderChunks map before creating the CameraFrame. Those chunks will be picked up by the compose pass and preserved.

    Example (GLSL):

    // Provide custom compose chunk(s) before constructing CameraFrame
    ShaderChunks.get(graphicsDevice, SHADERLANGUAGE_GLSL).set('composeVignettePS', `
    #ifdef VIGNETTE
    vec3 applyVignette(vec3 color, vec2 uv) {
    return color * uv.u;
    }
    #endif
    `);

    // For WebGPU, use SHADERLANGUAGE_WGSL instead.
    Index

    Constructors

    Properties

    bloom: Bloom = ...

    Bloom settings.

    colorLUT: ColorLUT = ...

    Color LUT settings.

    debug: null | "scene" | "ssao" | "bloom" | "vignette" | "dofcoc" | "dofblur" = null

    Debug rendering. Set to null to disable.

    dof: Dof = ...

    DoF settings.

    fringing: Fringing = ...

    Fringing settings.

    grading: Grading = ...

    Grading settings.

    rendering: Rendering = ...

    Rendering settings.

    ssao: Ssao = ...

    SSAO settings.

    taa: Taa = ...

    Taa settings.

    vignette: Vignette = ...

    Vignette settings.

    Accessors

    Methods

    • Creates a render pass for the camera frame. Override this method to utilize a custom render pass, typically one that extends RenderPassCameraFrame.

      Returns RenderPassCameraFrame

      • The render pass.