Home Reference Source
import {SMAAWeightsMaterial} from 'postprocessing'
public class | source

SMAAWeightsMaterial

Extends:

three~ShaderMaterial → SMAAWeightsMaterial

Subpixel Morphological Antialiasing.

This material computes weights for detected edges.

Constructor Summary

Public Constructor
public

constructor(texelSize: Vector2, resolution: Vector2)

Constructs a new SMAA weights material.

Member Summary

Public Members
public get

Indicates whether corner rounding is enabled.

public set

Enables or disables corner rounding.

public get

Indicates whether diagonal pattern detection is enabled.

public set

Enables or disables diagonal pattern detection.

public

Method Summary

Public Methods
public

Specifies how much sharp corners will be rounded.

public

Specifies the maximum steps performed in the diagonal pattern searches, at each side of the pixel.

public

Sets the maximum amount of steps performed in the horizontal/vertical pattern searches, at each side of the pixel.

Public Constructors

public constructor(texelSize: Vector2, resolution: Vector2) source

Constructs a new SMAA weights material.

Params:

NameTypeAttributeDescription
texelSize Vector2
  • optional

The absolute screen texel size.

resolution Vector2
  • optional

The resolution.

Public Members

public get cornerRounding: Boolean source

Indicates whether corner rounding is enabled.

public set cornerRounding: Boolean source

Enables or disables corner rounding.

public get diagonalDetection: Boolean source

Indicates whether diagonal pattern detection is enabled.

public set diagonalDetection: Boolean source

Enables or disables diagonal pattern detection.

public needsUpdate: boolean source

Public Methods

public setCornerRounding(rounding: Number) source

Specifies how much sharp corners will be rounded.

Params:

NameTypeAttributeDescription
rounding Number

The corner rounding amount. Range: [0, 100].

public setDiagonalSearchSteps(steps: Number) source

Specifies the maximum steps performed in the diagonal pattern searches, at each side of the pixel. This search jumps one pixel at time.

On high-end machines this search is cheap (between 0.8x and 0.9x slower for 16 steps), but it can have a significant impact on older machines.

Params:

NameTypeAttributeDescription
steps Number

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

public setOrthogonalSearchSteps(steps: Number) source

Sets the maximum amount of steps performed in the horizontal/vertical pattern searches, at each side of the pixel.

In number of pixels, it's actually the double. So the maximum line length perfectly handled by, for example 16, is 64 (perfectly means that longer lines won't look as good, but are still antialiased).

Params:

NameTypeAttributeDescription
steps Number

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