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

SSAOMaterial

Extends:

three~ShaderMaterial → SSAOMaterial

Implements:

A Screen Space Ambient Occlusion (SSAO) shader material.

Constructor Summary

Public Constructor
public

constructor(camera: Camera)

Constructs a new SSAO material.

Member Summary

Public Members
public get

The depth bias.

public set
public set

depthBuffer: Texture

The depth buffer.

public set

depthPacking: DepthPackingStrategies

The depth packing strategy.

public get

The occlusion distance falloff.

public set
public get
this get was deprecated.

Indicates whether distance-based radius scaling is enabled.

public set
public get

The occlusion distance threshold.

public set
public get

The depth fade factor.

public set
public get
this get was deprecated. Use SSAOEffect.intensity instead.

The intensity.

public set
public get

The minimum radius scale for distance scaling.

public set
public
public set

noiseTexture: Texture

The noise texture.

public set

normalBuffer: Texture

The normal buffer.

public set

A combined normal-depth buffer.

public get

The occlusion proximity falloff.

public set
public get

The occlusion proximity threshold.

public set
public get

The occlusion sampling radius.

public set
public get

The sampling spiral ring count.

public set
public get

The sample count.

public set
public get

The occlusion distance falloff in world units.

public set
public get

The occlusion distance threshold in world units.

public set
public get

The occlusion proximity falloff in world units.

public set
public get

The occlusion proximity threshold in world units.

public set

Method Summary

Public Methods
public

adoptCameraSettings(camera: Camera)

this method was deprecated. Use copyCameraSettings instead.

Copies the settings of the given camera.

public

copyCameraSettings(camera: Camera)

Copies the settings of the given camera.

public
this method was deprecated. Use bias instead.

Returns the depth bias.

public
this method was deprecated. Use fade instead.

Returns the depth fade factor.

public
this method was deprecated. Use SSAOEffect.intensity instead.

Returns the intensity.

public
this method was deprecated. Use minRadiusScale instead.

Returns the minimum radius scale for distance scaling.

public
this method was deprecated. Use radius instead.

Returns the occlusion sampling radius.

public
this method was deprecated. Use rings instead.

Returns the amount of spiral turns in the occlusion sampling pattern.

public
this method was deprecated. Use samples instead.

Returns the amount of occlusion samples per pixel.

public
this method was deprecated.

Indicates whether distance-based radius scaling is enabled.

public

setBias(value: Number)

this method was deprecated. Use bias instead.

Sets the depth bias.

public

setDepthBuffer(buffer: Texture, depthPacking: DepthPackingStrategies)

this method was deprecated. Use depthBuffer and depthPacking instead.

Sets the depth buffer.

public

setDistanceCutoff(threshold: Number, falloff: Number)

this method was deprecated. Use distanceThreshold and distanceFalloff instead.

Sets the occlusion distance cutoff.

public
this method was deprecated.

Enables or disables distance-based radius scaling.

public

setFade(value: Number)

this method was deprecated. Use fade instead.

Sets the depth fade factor.

public
this method was deprecated. Use SSAOEffect.intensity instead.

Sets the intensity.

public
this method was deprecated. Use minRadiusScale instead.

Sets the minimum radius scale for distance scaling.

public
this method was deprecated. Use noiseTexture instead.

Sets the noise texture.

public
this method was deprecated. Use normalBuffer instead.

Sets the normal buffer.

public
this method was deprecated. Use normalDepthBuffer instead.

Sets the combined normal-depth buffer.

public

setProximityCutoff(threshold: Number, falloff: Number)

this method was deprecated. Use proximityThreshold and proximityFalloff instead.

Sets the occlusion proximity cutoff.

public

setRadius(value: Number)

this method was deprecated. Use radius instead.

Sets the occlusion sampling radius.

public

setRings(value: Number)

this method was deprecated. Use rings instead.

Sets the amount of spiral turns in the occlusion sampling pattern.

public

setSamples(value: Number)

this method was deprecated. Use samples instead.

Sets the amount of occlusion samples per pixel.

public

setSize(width: Number, height: Number)

Sets the size of this object.

public
this method was deprecated. Use setSize() instead.

Sets the texel size.

Public Constructors

public constructor(camera: Camera) source

Constructs a new SSAO material.

Params:

NameTypeAttributeDescription
camera Camera

A camera.

Public Members

public get bias: Number source

The depth bias. Range: [0.0, 1.0].

public set bias source

public set depthBuffer: Texture source

The depth buffer.

public set depthPacking: DepthPackingStrategies source

The depth packing strategy.

public get distanceFalloff: Number source

The occlusion distance falloff. Range: [0.0, 1.0].

public set distanceFalloff source

public get distanceScaling: Boolean source

this get was deprecated.

Indicates whether distance-based radius scaling is enabled.

public set distanceScaling source

public get distanceThreshold: Number source

The occlusion distance threshold. Range: [0.0, 1.0].

public set distanceThreshold source

public get fade: Number source

The depth fade factor.

public set fade source

public get intensity: Number source

this get was deprecated. Use SSAOEffect.intensity instead.

The intensity.

public set intensity source

public get minRadiusScale: Number source

The minimum radius scale for distance scaling. Range: [0.0, 1.0].

public set minRadiusScale source

public needsUpdate: boolean source

public set noiseTexture: Texture source

The noise texture.

public set normalBuffer: Texture source

The normal buffer.

public set normalDepthBuffer: Texture source

A combined normal-depth buffer.

public get proximityFalloff: Number source

The occlusion proximity falloff. Range: [0.0, 1.0].

public set proximityFalloff source

public get proximityThreshold: Number source

The occlusion proximity threshold. Range: [0.0, 1.0].

public set proximityThreshold source

public get radius: Number source

The occlusion sampling radius. Range: [0.0, 1.0].

public set radius source

public get rings: Number source

The sampling spiral ring count.

public set rings source

public get samples: Number source

The sample count.

public set samples source

public get worldDistanceFalloff: Number source

The occlusion distance falloff in world units.

public set worldDistanceFalloff source

public get worldDistanceThreshold: Number source

The occlusion distance threshold in world units.

public set worldDistanceThreshold source

public get worldProximityFalloff: Number source

The occlusion proximity falloff in world units.

public set worldProximityFalloff source

public get worldProximityThreshold: Number source

The occlusion proximity threshold in world units.

public set worldProximityThreshold source

Public Methods

public adoptCameraSettings(camera: Camera) source

this method was deprecated. Use copyCameraSettings instead.

Copies the settings of the given camera.

Params:

NameTypeAttributeDescription
camera Camera

A camera.

public copyCameraSettings(camera: Camera) source

Copies the settings of the given camera.

Params:

NameTypeAttributeDescription
camera Camera

A camera.

public getBias(): Number source

this method was deprecated. Use bias instead.

Returns the depth bias.

Return:

Number

The bias.

public getFade(): Number source

this method was deprecated. Use fade instead.

Returns the depth fade factor.

Return:

Number

The fade factor.

public getIntensity(): Number source

this method was deprecated. Use SSAOEffect.intensity instead.

Returns the intensity.

Return:

Number

The intensity.

public getMinRadiusScale(): Number source

this method was deprecated. Use minRadiusScale instead.

Returns the minimum radius scale for distance scaling.

Return:

Number

The minimum radius scale.

public getRadius(): Number source

this method was deprecated. Use radius instead.

Returns the occlusion sampling radius.

Return:

Number

The radius.

public getRings(): Number source

this method was deprecated. Use rings instead.

Returns the amount of spiral turns in the occlusion sampling pattern.

Return:

Number

The radius.

public getSamples(): Number source

this method was deprecated. Use samples instead.

Returns the amount of occlusion samples per pixel.

Return:

Number

The sample count.

public isDistanceScalingEnabled(): Boolean source

this method was deprecated.

Indicates whether distance-based radius scaling is enabled.

Return:

Boolean

Whether distance scaling is enabled.

public setBias(value: Number) source

this method was deprecated. Use bias instead.

Sets the depth bias.

Params:

NameTypeAttributeDescription
value Number

The bias.

public setDepthBuffer(buffer: Texture, depthPacking: DepthPackingStrategies) source

this method was deprecated. Use depthBuffer and depthPacking instead.

Sets the depth buffer.

Params:

NameTypeAttributeDescription
buffer Texture

The depth texture.

depthPacking DepthPackingStrategies
  • optional
  • default: BasicDepthPacking

The depth packing strategy.

public setDistanceCutoff(threshold: Number, falloff: Number) source

this method was deprecated. Use distanceThreshold and distanceFalloff instead.

Sets the occlusion distance cutoff.

Params:

NameTypeAttributeDescription
threshold Number

The distance threshold. Range [0.0, 1.0].

falloff Number

The falloff. Range [0.0, 1.0].

public setDistanceScalingEnabled(value: Boolean) source

this method was deprecated.

Enables or disables distance-based radius scaling.

Params:

NameTypeAttributeDescription
value Boolean

Whether distance scaling should be enabled.

public setFade(value: Number) source

this method was deprecated. Use fade instead.

Sets the depth fade factor.

Params:

NameTypeAttributeDescription
value Number

The fade factor.

public setIntensity(value: Number) source

this method was deprecated. Use SSAOEffect.intensity instead.

Sets the intensity.

Params:

NameTypeAttributeDescription
value Number

The intensity.

public setMinRadiusScale(value: Number) source

this method was deprecated. Use minRadiusScale instead.

Sets the minimum radius scale for distance scaling.

Params:

NameTypeAttributeDescription
value Number

The minimum radius scale.

public setNoiseTexture(value: Number) source

this method was deprecated. Use noiseTexture instead.

Sets the noise texture.

Params:

NameTypeAttributeDescription
value Number

The texture.

public setNormalBuffer(value: Number) source

this method was deprecated. Use normalBuffer instead.

Sets the normal buffer.

Params:

NameTypeAttributeDescription
value Number

The buffer.

public setNormalDepthBuffer(value: Number) source

this method was deprecated. Use normalDepthBuffer instead.

Sets the combined normal-depth buffer.

Params:

NameTypeAttributeDescription
value Number

The buffer.

public setProximityCutoff(threshold: Number, falloff: Number) source

this method was deprecated. Use proximityThreshold and proximityFalloff instead.

Sets the occlusion proximity cutoff.

Params:

NameTypeAttributeDescription
threshold Number

The range threshold. Range [0.0, 1.0].

falloff Number

The falloff. Range [0.0, 1.0].

public setRadius(value: Number) source

this method was deprecated. Use radius instead.

Sets the occlusion sampling radius.

Params:

NameTypeAttributeDescription
value Number

The radius. Range [1e-6, 1.0].

public setRings(value: Number) source

this method was deprecated. Use rings instead.

Sets the amount of spiral turns in the occlusion sampling pattern.

Params:

NameTypeAttributeDescription
value Number

The radius.

public setSamples(value: Number) source

this method was deprecated. Use samples instead.

Sets the amount of occlusion samples per pixel.

Params:

NameTypeAttributeDescription
value Number

The sample count.

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

Sets the size of this object.

Params:

NameTypeAttributeDescription
width Number

The width.

height Number

The height.

public setTexelSize(x: Number, y: Number) source

this method was deprecated. Use setSize() instead.

Sets the texel size.

Params:

NameTypeAttributeDescription
x Number

The texel width.

y Number

The texel height.