ThreePipe
    Preparing search index...

    Class TonemapPlugin

    Tonemap Plugin

    Adds an extension to ScreenPass material for applying tonemapping on the final buffer before rendering to screen.

    Also adds support for Uncharted2 tone-mapping.

    Hierarchy (View Summary)

    Index
    __setDirty?: () => void
    _dirty: boolean = false
    _shaderPatch: string = TonemapShaderPatch
    _viewer?: ThreeViewer
    _viewerListeners: PartialRecord<IViewerEventTypes, (e: IViewerEvent) => void> = {}
    constructor: typeof AScreenPassExtensionPlugin & typeof AViewerPluginSync & typeof AViewerPlugin
    contrast: number
    enabled: boolean = true
    exposure: number = 1
    extraDefines: { TONEMAP_BACKGROUND: () => "0" | "1" } = ...
    extraUniforms: {
        toneMappingContrast: { value: 1 };
        toneMappingSaturation: { value: 1 };
    } = ...
    isViewerPluginSync: true = ...
    priority: number = -100

    The priority of the material extension when applied to the material in ScreenPass set to very low priority, so applied at the end

    saturation: number
    tonemapBackground: boolean = true

    Global toggle to apply tonemapping on the background. The tonemapping is not applied if either this or RootScene.backgroundTonemap is false.

    toneMapping: ToneMapping = ACESFilmicToneMapping
    uiConfig?: UiObjectConfig<any, string, any> = undefined
    OldPluginType?: string
    PluginType: "Tonemap" = 'Tonemap'
    • Whether the material asks for tone mapping: false when userData.gBufferData.tonemapEnabled (or the legacy userData.postTonemap) is false, else when the material's own toneMapped is false. This is the bit written to the GBuffer flags.

      Parameters

      Returns boolean