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

SMAAWeightsMaterial

Extends:

three~ShaderMaterial → SMAAWeightsMaterial

Implements:

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

areaTexture: Texture

The area lookup texture.

public set
public get

Indicates whether corner detection is enabled.

public set
public get

Specifies how much sharp corners will be rounded.

public set
public get

Indicates whether diagonal pattern detection is enabled.

public set
public get

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

public set
public set

inputBuffer: Texture

The input buffer.

public
public get

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

public set
public get

searchTexture: Texture

The search lookup texture.

public set

Method Summary

Public Methods
public
this method was deprecated. Use cornerDetection instead.

Indicates whether corner rounding is enabled.

public
this method was deprecated. Use diagonalDetection instead.

Indicates whether diagonal pattern detection is enabled.

public
this method was deprecated. Use cornerRounding instead.

Specifies how much sharp corners will be rounded.

public
this method was deprecated. Use cornerDetection instead.

Enables or disables corner rounding.

public
this method was deprecated. Use diagonalDetection instead.

Enables or disables diagonal pattern detection.

public
this method was deprecated. Use diagonalSearchSteps instead.

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

public

setInputBuffer(value: Texture)

this method was deprecated. Use inputBuffer instead.

Sets the input buffer.

public

setLookupTextures(search: Texture, area: Texture)

this method was deprecated. Use searchTexture and areaTexture instead.

Sets the search and area lookup textures.

public
this method was deprecated. Use orthogonalSearchSteps instead.

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

public

setSize(width: Number, height: Number)

Sets the size of this object.

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 areaTexture: Texture source

The area lookup texture.

public set areaTexture source

public get cornerDetection: Number source

Indicates whether corner detection is enabled.

public set cornerDetection source

public get cornerRounding: Number source

Specifies how much sharp corners will be rounded. Range: [0, 100].

public set cornerRounding source

public get diagonalDetection: Boolean source

Indicates whether diagonal pattern detection is enabled.

public set diagonalDetection source

public get diagonalSearchSteps: Number source

The maximum steps performed in the diagonal pattern searches, at each side of the pixel. This search jumps one pixel at a time. Range: [0, 20].

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.

public set diagonalSearchSteps source

public set inputBuffer: Texture source

The input buffer.

public needsUpdate: boolean source

public get orthogonalSearchSteps: Number source

The maximum amount of steps performed in the horizontal/vertical pattern searches, at each side of the pixel. Range: [0, 112].

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).

public set orthogonalSearchSteps source

public get searchTexture: Texture source

The search lookup texture.

public set searchTexture source

Public Methods

public isCornerRoundingEnabled(): Boolean source

this method was deprecated. Use cornerDetection instead.

Indicates whether corner rounding is enabled.

Return:

Boolean

Whether corner rounding is enabled.

public isDiagonalDetectionEnabled(): Boolean source

this method was deprecated. Use diagonalDetection instead.

Indicates whether diagonal pattern detection is enabled.

Return:

Boolean

Whether diagonal pattern detection is enabled.

public setCornerRounding(value: Number) source

this method was deprecated. Use cornerRounding instead.

Specifies how much sharp corners will be rounded.

Params:

NameTypeAttributeDescription
value Number

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

public setCornerRoundingEnabled(value: Boolean) source

this method was deprecated. Use cornerDetection instead.

Enables or disables corner rounding.

Params:

NameTypeAttributeDescription
value Boolean

Whether corner rounding should be enabled.

public setDiagonalDetectionEnabled(value: Boolean) source

this method was deprecated. Use diagonalDetection instead.

Enables or disables diagonal pattern detection.

Params:

NameTypeAttributeDescription
value Boolean

Whether diagonal pattern detection should be enabled.

public setDiagonalSearchSteps(value: Number) source

this method was deprecated. Use diagonalSearchSteps instead.

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

Params:

NameTypeAttributeDescription
value Number

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

public setInputBuffer(value: Texture) source

this method was deprecated. Use inputBuffer instead.

Sets the input buffer.

Params:

NameTypeAttributeDescription
value Texture

The input buffer.

public setLookupTextures(search: Texture, area: Texture) source

this method was deprecated. Use searchTexture and areaTexture instead.

Sets the search and area lookup textures.

Params:

NameTypeAttributeDescription
search Texture

The search lookup texture.

area Texture

The area lookup texture.

public setOrthogonalSearchSteps(value: Number) source

this method was deprecated. Use orthogonalSearchSteps instead.

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

Params:

NameTypeAttributeDescription
value Number

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

public setSize(width: Number, height: Number) source

Sets the size of this object.

Params:

NameTypeAttributeDescription
width Number

The width.

height Number

The height.