This filter handles masking and post-processing for visual effects.

Hierarchy (view full)

Properties

#postProcessModes: string[]

Code to determine which post-processing effect is applied in this filter.

FILTER_MODES: Readonly<{
    BACKGROUND: 0;
    ILLUMINATION: 1;
    COLORATION: 2;
}> = ...

Masking modes.

Type declaration

  • BACKGROUND: 0
  • ILLUMINATION: 1
  • COLORATION: 2
defaultUniforms: {
    tint: number[];
    screenDimensions: number[];
    enableVisionMasking: boolean;
    visionTexture: any;
    darknessLevelTexture: any;
    exposure: number;
    contrast: number;
    saturation: number;
    mode: number;
    ambientDarkness: number[];
    ambientDaylight: number[];
    replacementColor: number[];
} = ...

Type declaration

  • tint: number[]
  • screenDimensions: number[]
  • enableVisionMasking: boolean
  • visionTexture: any
  • darknessLevelTexture: any
  • exposure: number
  • contrast: number
  • saturation: number
  • mode: number
  • ambientDarkness: number[]
  • ambientDaylight: number[]
  • replacementColor: number[]
POST_PROCESS_TECHNIQUES: {
    EXPOSURE: {
        id: string;
        glsl: string;
    };
    CONTRAST: {
        id: string;
        glsl: string;
    };
    SATURATION: {
        id: string;
        glsl: string;
    };
} = ...

Filter post-process techniques.

Type declaration

  • EXPOSURE: {
        id: string;
        glsl: string;
    }
    • id: string
    • glsl: string
  • CONTRAST: {
        id: string;
        glsl: string;
    }
    • id: string
    • glsl: string
  • SATURATION: {
        id: string;
        glsl: string;
    }
    • id: string
    • glsl: string
fragmentHeader: string = ...

Memory allocations and headers for the VisualEffectsMaskingFilter

Returns

The filter header according to the filter mode.

fragmentCore: string = ...

The fragment core code.

vertexShader: string = ...

The default vertex shader used by all instances of AbstractBaseMaskFilter

Methods

  • Update the filter shader with new post-process modes.

    Parameters

    • Optional postProcessModes: string[] = []

      New modes to apply.

    • Optional uniforms: object = {}

      Uniforms value to update.

    Returns void

  • Remove all post-processing modes and reset some key uniforms.

    Returns void

  • Parameters

    • filterManager: any
    • input: any
    • output: any
    • clear: any
    • currentState: any

    Returns void

  • Construct filter post-processing code according to provided value.

    Parameters

    • postProcessModes: string[] = []

      Post-process modes to construct techniques.

    Returns string

    The constructed shader code for post-process techniques.

  • Specify the fragment shader to use according to mode

    Parameters

    • postProcessModes: string[] = []

    Returns string