SSAOMaterial
Extends:
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 |
normalDepthBuffer: Texture 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 |
getSamples(): Number 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 |
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 |
setDistanceScalingEnabled(value: Boolean) this method was deprecated.
Enables or disables distance-based radius scaling. |
|
public |
this method was deprecated. Use fade instead.
Sets the depth fade factor. |
|
public |
setIntensity(value: Number) this method was deprecated. Use SSAOEffect.intensity instead.
Sets the intensity. |
|
public |
setMinRadiusScale(value: Number) this method was deprecated. Use minRadiusScale instead.
Sets the minimum radius scale for distance scaling. |
|
public |
setNoiseTexture(value: Number) this method was deprecated. Use noiseTexture instead.
Sets the noise texture. |
|
public |
setNormalBuffer(value: Number) this method was deprecated. Use normalBuffer instead.
Sets the normal buffer. |
|
public |
setNormalDepthBuffer(value: Number) 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 |
this method was deprecated. Use radius instead.
Sets the occlusion sampling radius. |
|
public |
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 |
Sets the size of this object. |
|
public |
setTexelSize(x: Number, y: Number) this method was deprecated. Use setSize() instead.
Sets the texel size. |
Public Constructors
public constructor(camera: Camera) source
Constructs a new SSAO material.
Params:
Name | Type | Attribute | Description |
camera | Camera | A camera. |
Public Members
public set bias source
public set distanceFalloff source
public get distanceScaling: Boolean source
Indicates whether distance-based radius scaling is enabled.
public set distanceScaling source
public set distanceThreshold source
public set fade source
public get intensity: Number source
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 set proximityFalloff source
public set proximityThreshold source
public set radius source
public set rings source
public set samples source
public set worldDistanceFalloff source
public set worldDistanceThreshold source
public set worldProximityFalloff source
public set worldProximityThreshold source
Public Methods
public adoptCameraSettings(camera: Camera) source
Copies the settings of the given camera.
Params:
Name | Type | Attribute | Description |
camera | Camera | A camera. |
public copyCameraSettings(camera: Camera) source
Copies the settings of the given camera.
Params:
Name | Type | Attribute | Description |
camera | Camera | A camera. |
public getBias(): Number source
Returns the depth bias.
public getFade(): Number source
Returns the depth fade factor.
public getIntensity(): Number source
Returns the intensity.
public getMinRadiusScale(): Number source
Returns the minimum radius scale for distance scaling.
public getRadius(): Number source
Returns the occlusion sampling radius.
public getRings(): Number source
Returns the amount of spiral turns in the occlusion sampling pattern.
public getSamples(): Number source
Returns the amount of occlusion samples per pixel.
public isDistanceScalingEnabled(): Boolean source
Indicates whether distance-based radius scaling is enabled.
public setBias(value: Number) source
Sets the depth bias.
Params:
Name | Type | Attribute | Description |
value | Number | The bias. |
public setDepthBuffer(buffer: Texture, depthPacking: DepthPackingStrategies) source
Sets the depth buffer.
Params:
Name | Type | Attribute | Description |
buffer | Texture | The depth texture. |
|
depthPacking | DepthPackingStrategies |
|
The depth packing strategy. |
public setDistanceCutoff(threshold: Number, falloff: Number) source
Sets the occlusion distance cutoff.
public setDistanceScalingEnabled(value: Boolean) source
Enables or disables distance-based radius scaling.
Params:
Name | Type | Attribute | Description |
value | Boolean | Whether distance scaling should be enabled. |
public setFade(value: Number) source
Sets the depth fade factor.
Params:
Name | Type | Attribute | Description |
value | Number | The fade factor. |
public setIntensity(value: Number) source
Sets the intensity.
Params:
Name | Type | Attribute | Description |
value | Number | The intensity. |
public setMinRadiusScale(value: Number) source
Sets the minimum radius scale for distance scaling.
Params:
Name | Type | Attribute | Description |
value | Number | The minimum radius scale. |
public setNoiseTexture(value: Number) source
Sets the noise texture.
Params:
Name | Type | Attribute | Description |
value | Number | The texture. |
public setNormalBuffer(value: Number) source
Sets the normal buffer.
Params:
Name | Type | Attribute | Description |
value | Number | The buffer. |
public setNormalDepthBuffer(value: Number) source
Sets the combined normal-depth buffer.
Params:
Name | Type | Attribute | Description |
value | Number | The buffer. |
public setProximityCutoff(threshold: Number, falloff: Number) source
Sets the occlusion proximity cutoff.
public setRadius(value: Number) source
Sets the occlusion sampling radius.
Params:
Name | Type | Attribute | Description |
value | Number | The radius. Range [1e-6, 1.0]. |
public setRings(value: Number) source
Sets the amount of spiral turns in the occlusion sampling pattern.
Params:
Name | Type | Attribute | Description |
value | Number | The radius. |
public setSamples(value: Number) source
Sets the amount of occlusion samples per pixel.
Params:
Name | Type | Attribute | Description |
value | Number | The sample count. |