API

Type Alias PostProcessOptions

PostProcessOptions: EffectWrapperCreationOptions & {
    camera?: Nullable<Camera>;
    effectWrapper?: EffectWrapper;
    engine?: AbstractEngine;
    height?: number;
    reusable?: boolean;
    samplingMode?: number;
    size?: number | { height: number; width: number };
    textureFormat?: number;
    textureType?: number;
    width?: number;
}

Options for the PostProcess constructor

Type Declaration

  • Optionalcamera?: Nullable<Camera>

    The camera that the post process will be attached to (default: null)

  • OptionaleffectWrapper?: EffectWrapper

    The effect wrapper instance used by the post process. If not provided, a new one will be created.

  • Optionalengine?: AbstractEngine

    The engine to be used to render the post process (default: engine from scene)

  • Optionalheight?: number

    The height of the texture created for this post process. This parameter (and width) is only used when passing a value for the 5th parameter (options) to the PostProcess constructor function. If you use a PostProcessOptions for the 3rd parameter of the constructor, size is used instead of width and height.

  • Optionalreusable?: boolean

    If the post process can be reused on the same frame. (default: false)

  • OptionalsamplingMode?: number

    The sampling mode to be used by the shader (default: Constants.TEXTURE_NEAREST_SAMPLINGMODE)

  • Optionalsize?: number | { height: number; width: number }

    The size of the post process texture. It is either a ratio to downscale or upscale the texture create for this post process, or an object containing width and height values. Default: 1

  • OptionaltextureFormat?: number

    Format of the texture created for this post process (default: TEXTUREFORMAT_RGBA)

  • OptionaltextureType?: number

    Type of the texture created for this post process (default: Constants.TEXTURETYPE_UNSIGNED_BYTE)

  • Optionalwidth?: number

    The width of the texture created for this post process. This parameter (and height) is only used when passing a value for the 5th parameter (options) to the PostProcess constructor function. If you use a PostProcessOptions for the 3rd parameter of the constructor, size is used instead of width and height.