Class SMAAEffect

Subpixel Morphological Antialiasing (SMAA).

https://github.com/iryoku/smaa/releases/tag/v2.8

Hierarchy (view full)

Constructors

Properties

blendMode: BlendMode

The blend mode of this effect.

defines: Map<string, string>

Preprocessor macro definitions.

Call Effect.setChanged after changing macro definitions.

extensions: Set<WebGLExtension>

WebGL extensions that are required by this effect.

Call Effect.setChanged after adding or removing extensions.

name: string

The name of this effect.

renderer: WebGLRenderer

The renderer.

Deprecated

uniforms: Map<string, Uniform<any>>

Shader uniforms.

Call Effect.setChanged after adding or removing uniforms.

Accessors

  • get colorEdgesMaterial(): EdgeDetectionMaterial
  • The edge detection material.

    Returns EdgeDetectionMaterial

    Deprecated

    Use edgeDetectionMaterial instead.

  • get edgeDetectionMaterial(): EdgeDetectionMaterial
  • The edge detection material.

    Returns EdgeDetectionMaterial

  • get edgesTexture(): Texture
  • The edges texture.

    Returns Texture

  • get inputColorSpace(): ColorSpace
  • Experimental

    The input color space.

    Returns ColorSpace

  • set inputColorSpace(arg): void
  • Protected Experimental

    Parameters

    • arg: ColorSpace

    Returns void

  • set mainCamera(arg): void
  • Sets the main camera.

    Parameters

    • arg: Camera

    Returns void

  • set mainScene(arg): void
  • Sets the main scene.

    Parameters

    • arg: Scene

    Returns void

  • get outputColorSpace(): ColorSpace
  • Experimental

    The output color space.

    Should only be changed if this effect converts the input colors to a different color space.

    Returns ColorSpace

  • set outputColorSpace(arg): void
  • Protected Experimental

    Parameters

    • arg: ColorSpace

    Returns void

  • get weightsMaterial(): SMAAWeightsMaterial
  • The edge weights material.

    Returns SMAAWeightsMaterial

  • get weightsTexture(): Texture
  • The edge weights texture.

    Returns Texture

  • get areaImageDataURL(): string
  • The SMAA area image, encoded as a base64 data URL.

    Returns string

    Deprecated

  • get searchImageDataURL(): string
  • The SMAA search image, encoded as a base64 data URL.

    Returns string

    Deprecated

Methods

  • Applies the given quality preset.

    Parameters

    Returns void

  • Deletes internal render targets and textures.

    Returns void

  • Returns the blend mode.

    The result of this effect will be blended with the result of the previous effect using this blend mode.

    Returns BlendMode

    The blend mode.

    Deprecated

    Use blendMode instead.

  • Returns the preprocessor macro definitions.

    Returns Map<string, string>

    The extensions.

    Deprecated

    Use defines instead.

  • Returns the edge detection material.

    Returns EdgeDetectionMaterial

    The material.

    Deprecated

    Use edgeDetectionMaterial instead.

  • Returns the edges texture.

    Returns Texture

    The texture.

    Deprecated

    Use edgesTexture instead.

  • Returns the WebGL extensions that are required by this effect.

    Returns Set<WebGLExtension>

    The extensions.

    Deprecated

    Use extensions instead.

  • Returns the fragment shader.

    Returns string

    The fragment shader.

  • Returns the name of this effect.

    Returns string

    The name.

    Deprecated

    Use name instead.

  • Returns the uniforms of this effect.

    Returns Map<string, Uniform<any>>

    The extensions.

    Deprecated

    Use uniforms instead.

  • Returns the vertex shader.

    Returns string

    The vertex shader.

  • Returns the edge weights material.

    Returns SMAAWeightsMaterial

    The material.

    Deprecated

    Use weightsMaterial instead.

  • Returns the edge weights texture.

    Returns Texture

    The texture.

    Deprecated

    Use weightsTexture instead.

  • Performs initialization tasks.

    This method is called when the associated EffectPass is added to an EffectComposer.

    Parameters

    • renderer: WebGLRenderer

      The renderer.

    • alpha: boolean

      Whether the renderer uses the alpha channel or not.

    • frameBufferType: number

      The type of the main frame buffers.

    Returns void

    Example

    if(!alpha && frameBufferType === UnsignedByteType) { this.myRenderTarget.texture.format = RGBFormat; }
    
  • Protected

    Sets the effect attributes.

    Effects that have the same attributes will be executed in the order in which they were registered. Some attributes imply a higher priority.

    Parameters

    Returns void

  • Protected

    Informs the associated EffectPass that this effect requires a shader recompilation.

    Should be called after changing macros or extensions and after adding/removing uniforms.

    Returns void

  • Sets the depth texture.

    Parameters

    • depthTexture: Texture

      A depth texture.

    • Optional depthPacking: DepthPackingStrategies

      The depth packing.

    Returns void

  • Sets the edge detection sensitivity.

    See EdgeDetectionMaterial#setEdgeDetectionThreshold for more details.

    Parameters

    • threshold: number

      The edge detection sensitivity. Range: [0.05, 0.5].

    Returns void

    Deprecated

    Use edgeDetectionMaterial instead.

  • Protected

    Sets the fragment shader.

    Parameters

    • fragmentShader: string

      The fragment shader.

    Returns void

  • Sets the maximum amount of horizontal/vertical search steps.

    See SMAAWeightsMaterial#setOrthogonalSearchSteps for more details.

    Parameters

    • steps: number

      The search steps. Range: [0, 112].

    Returns void

    Deprecated

    Use weightsMaterial instead.

  • Sets the renderer.

    Parameters

    • renderer: WebGLRenderer

      The renderer.

    Returns void

    Deprecated

  • Updates the size of internal render targets.

    Parameters

    • width: number

      The width.

    • height: number

      The height.

    Returns void

  • Protected

    Sets the vertex shader.

    Parameters

    • vertexShader: string

      The vertex shader.

    Returns void

  • Updates this effect.

    Parameters

    • renderer: WebGLRenderer

      The renderer.

    • inputBuffer: WebGLRenderTarget<Texture>

      A frame buffer that contains the result of the previous pass.

    • Optional deltaTime: number

      The time between the last frame and the current one in seconds.

    Returns void