SMAAEffect
Extends:
Indirect Implements:
Subpixel Morphological Antialiasing (SMAA).
Static Member Summary
Static Public Members | ||
public static get |
this get was deprecated. Use SMAAImageLoader instead.
The SMAA area image, encoded as a base64 data URL. |
|
public static get |
this get was deprecated. Use SMAAImageLoader instead.
The SMAA search image, encoded as a base64 data URL. |
Constructor Summary
Public Constructor | ||
public |
constructor(searchImage: Image, areaImage: Image, preset: SMAAPreset, edgeDetectionMode: EdgeDetectionMode) Constructs a new SMAA effect. |
Member Summary
Public Members | ||
public get |
this get was deprecated. Use edgeDetectionMaterial instead.
The internal edge detection material. |
|
public get |
The internal edge detection material. |
|
public get |
The internal edge weights material. |
Method Summary
Public Methods | ||
public |
applyPreset(preset: SMAAPreset) Applies the given quality preset. |
|
public |
dispose() Deletes internal render targets and textures. |
|
public |
setDepthTexture(depthTexture: Texture, depthPacking: Number) Sets the depth texture. |
|
public |
setEdgeDetectionThreshold(threshold: Number) this method was deprecated. Use applyPreset or edgeDetectionMaterial instead.
Sets the edge detection sensitivity. |
|
public |
setOrthogonalSearchSteps(steps: Number) this method was deprecated. Use applyPreset or weightsMaterial instead.
Sets the maximum amount of horizontal/vertical search steps. |
|
public |
Updates the size of internal render targets. |
|
public |
Updates this effect. |
Inherited Summary
From class Effect | ||
public |
The blend mode of this effect. |
|
public |
Preprocessor macro definitions. |
|
public |
WebGL extensions that are required by this effect. |
|
public |
The name of this effect. |
|
public |
Shader uniforms. |
|
public |
dispose() Performs a shallow search for properties that define a dispose method and deletes them. |
|
public |
Returns the effect attributes. |
|
public |
Returns the fragment shader. |
|
public |
Returns the vertex shader. |
|
public |
initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) Performs initialization tasks. |
|
public |
setDepthTexture(depthTexture: Texture, depthPacking: Number) Sets the depth texture. |
|
public |
Updates the size of this effect. |
|
public |
Updates the effect by performing supporting operations. |
|
protected |
setAttributes(attributes: EffectAttribute) Sets the effect attributes. |
|
protected |
Informs the associated EffectPass that this effect has changed in a way that requires a shader recompilation. |
|
protected |
setFragmentShader(fragmentShader: String) Sets the fragment shader. |
|
protected |
setVertexShader(vertexShader: String) Sets the vertex shader. |
Static Public Members
public static get areaImageDataURL: String source
The SMAA area image, encoded as a base64 data URL.
Use this image data to create an Image instance and use it together with the search image to create an SMAAEffect.
Example:
const areaImage = new Image();
areaImage.addEventListener("load", progress);
areaImage.src = SMAAEffect.areaImageDataURL;
public static get searchImageDataURL: String source
The SMAA search image, encoded as a base64 data URL.
Use this image data to create an Image instance and use it together with the area image to create an SMAAEffect.
Example:
const searchImage = new Image();
searchImage.addEventListener("load", progress);
searchImage.src = SMAAEffect.searchImageDataURL;
Public Constructors
public constructor(searchImage: Image, areaImage: Image, preset: SMAAPreset, edgeDetectionMode: EdgeDetectionMode) source
Constructs a new SMAA effect.
Override:
Effect#constructorParams:
Name | Type | Attribute | Description |
searchImage | Image | The SMAA search image. Preload this image using the SMAAImageLoader. |
|
areaImage | Image | The SMAA area image. Preload this image using the SMAAImageLoader. |
|
preset | SMAAPreset |
|
An SMAA quality preset. |
edgeDetectionMode | EdgeDetectionMode |
|
The edge detection mode. |
Public Members
public get colorEdgesMaterial: EdgeDetectionMaterial source
The internal edge detection material.
public get edgeDetectionMaterial: EdgeDetectionMaterial source
The internal edge detection material.
Public Methods
public applyPreset(preset: SMAAPreset) source
Applies the given quality preset.
Params:
Name | Type | Attribute | Description |
preset | SMAAPreset | The preset. |
public setDepthTexture(depthTexture: Texture, depthPacking: Number) source
Sets the depth texture.
Override:
Effect#setDepthTextureParams:
Name | Type | Attribute | Description |
depthTexture | Texture | A depth texture. |
|
depthPacking | Number |
|
The depth packing. |
public setEdgeDetectionThreshold(threshold: Number) source
Sets the edge detection sensitivity.
See EdgeDetectionMaterial#setEdgeDetectionThreshold for more details.
Params:
Name | Type | Attribute | Description |
threshold | Number | The edge detection sensitivity. Range: [0.05, 0.5]. |
public setOrthogonalSearchSteps(steps: Number) source
Sets the maximum amount of horizontal/vertical search steps.
See SMAAWeightsMaterial#setOrthogonalSearchSteps for more details.
Params:
Name | Type | Attribute | Description |
steps | Number | The search steps. Range: [0, 112]. |
public setSize(width: Number, height: Number) source
Updates the size of internal render targets.
Override:
Effect#setSizepublic update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number) source
Updates this effect.
Override:
Effect#updateParams:
Name | Type | Attribute | Description |
renderer | WebGLRenderer | The renderer. |
|
inputBuffer | WebGLRenderTarget | A frame buffer that contains the result of the previous pass. |
|
deltaTime | Number |
|
The time between the last frame and the current one in seconds. |