Options
All
  • Public
  • Public/Protected
  • All
Menu

A FXAA filter based on PIXI.FXAA and slightly improved. In brief: The FXAA filter is computing the luma of neighbour pixels and apply correction according to the difference. A high luma reduction is reducing correction while a low luma reduction is reinforcing it.

param [vertex=AdaptiveFXAAFilter.vertexShader]

Optional vertex shader

param [fragment=AdaptiveFXAAFilter.fragmentShader]

Optional fragment shader

param [uniforms=AdaptiveFXAAFilter.defaultUniforms]

Optional uniforms

param [options={}]

Additional options (token knockout, ...)

Hierarchy

Index

Constructors

  • new AdaptiveFXAAFilter(vertex: any, fragment: any, uniforms: any, options?: {}): AdaptiveFXAAFilter

Methods

  • apply(filterManager: any, input: any, output: any, clear: any, currentState: any): void
  • override

    Parameters

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

    Returns void

  • _computeLumaReduction(): number
  • Compute the luma reduction according to the stage zoom level (worldTransform.d) The zoom level is converted to a range [0.xxx => max zoom out , 1 => max zoom in] With zoom out, the reduction tends to high value, the antialias is discrete to avoid blurring side effect. With zoom in, the reduction tends to low value, the antialias is important. FXAA checks local contrast to avoid processing non-edges (high contrast difference === edge): 0.6 and 0.02 are factors applied to the "contrast range", to apply or not a contrast blend. With small values, the contrast blend is applied more often than with high values.

    Returns number

    The luma reduction

  • A factory method for creating the filter using its defined default values.

    Parameters

    • uniforms: any = {}

    Returns AbstractBaseFilter

    The constructed AbstractFilter instance.

Accessors

  • get resolution(): number
  • set resolution(value: number): void
  • Always target the resolution of the render texture or renderer

    Returns number

  • Always target the resolution of the render texture or renderer

    Parameters

    • value: number

    Returns void

  • get multisample(): MSAA_QUALITY
  • set multisample(value: MSAA_QUALITY): void
  • Always target the MSAA level of the render texture or renderer

    Returns MSAA_QUALITY

  • Always target the MSAA level of the render texture or renderer

    Parameters

    • value: MSAA_QUALITY

    Returns void

Properties

defaultUniforms: { lumaMinimum: number; lumaReduction: number; spanMax: number; tokenKnockout: boolean; tokenTexture: any; screenDimensions: number[] } = ...
override

Type declaration

  • lumaMinimum: number
  • lumaReduction: number
  • spanMax: number
  • tokenKnockout: boolean
  • tokenTexture: any
  • screenDimensions: number[]
vertexShader: string = ...
override
fragmentShader: string = ...
override