DepthMaskMaterial
Extends:
A depth mask shader material.
This material masks a color buffer by comparing two depth textures.
Constructor Summary
Public Constructor | ||
public |
Constructs a new depth mask material. |
Member Summary
Public Members | ||
public set |
depthBuffer0: Texture The primary depth buffer. |
|
public set |
depthBuffer1: Texture The secondary depth buffer. |
|
public get |
depthMode: DepthModes The depth mode. |
|
public set |
|
|
public set |
depthPacking0: DepthPackingStrategies The primary depth packing strategy. |
|
public set |
depthPacking1: DepthPackingStrategies The secondary depth packing strategy. |
|
public get |
A small error threshold that is used for |
|
public set |
|
|
public get |
this get was deprecated. Use maxDepthStrategy instead.
Indicates whether maximum depth values should be preserved. |
|
public set |
|
|
public get |
The strategy for handling maximum depth. |
|
public set |
|
|
public |
|
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 |
getDepthMode(): DepthModes this method was deprecated. Use depthMode instead.
Returns the current depth mode. |
|
public |
getEpsilon(): Number this method was deprecated. Use epsilon instead.
Returns the current error threshold for depth comparisons. |
|
public |
this method was deprecated. Use maxDepthStrategy instead.
Returns the strategy for dealing with maximum depth values. |
|
public |
setDepthBuffer0(buffer: Texture, depthPacking: DepthPackingStrategies) this method was deprecated. Use depthBuffer0 and depthPacking0 instead.
Sets the base depth buffer. |
|
public |
setDepthBuffer1(buffer: Texture, depthPacking: DepthPackingStrategies) this method was deprecated. Use depthBuffer1 and depthPacking1 instead.
Sets the depth buffer that will be compared with the base depth buffer. |
|
public |
setDepthMode(mode: DepthModes) this method was deprecated. Use depthMode instead.
Sets the depth mode. |
|
public |
setEpsilon(value: Number) this method was deprecated. Use epsilon instead.
Sets the depth comparison error threshold. |
|
public |
setMaxDepthStrategy(value: DepthTestStrategy) this method was deprecated. Use maxDepthStrategy instead.
Sets the strategy for dealing with maximum depth values. |
Public Constructors
Public Members
public set depthMode source
public get epsilon: Number source
A small error threshold that is used for EqualDepth
and NotEqualDepth
tests. Default is 1e-4
.
public set epsilon source
public get keepFar: Boolean source
Indicates whether maximum depth values should be preserved.
public set keepFar source
public set maxDepthStrategy 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 getDepthMode(): DepthModes source
Returns the current depth mode.
Return:
DepthModes | The depth mode. Default is |
public getEpsilon(): Number source
Returns the current error threshold for depth comparisons.
public getMaxDepthStrategy(): DepthTestStrategy source
Returns the strategy for dealing with maximum depth values.
public setDepthBuffer0(buffer: Texture, depthPacking: DepthPackingStrategies) source
Sets the base depth buffer.
Params:
Name | Type | Attribute | Description |
buffer | Texture | The depth texture. |
|
depthPacking | DepthPackingStrategies |
|
The depth packing strategy. |
public setDepthBuffer1(buffer: Texture, depthPacking: DepthPackingStrategies) source
Sets the depth buffer that will be compared with the base depth buffer.
Params:
Name | Type | Attribute | Description |
buffer | Texture | The depth texture. |
|
depthPacking | DepthPackingStrategies |
|
The depth packing strategy. |
public setDepthMode(mode: DepthModes) source
Sets the depth mode.
Params:
Name | Type | Attribute | Description |
mode | DepthModes | The depth mode. |
public setEpsilon(value: Number) source
Sets the depth comparison error threshold.
Params:
Name | Type | Attribute | Description |
value | Number | The new error threshold. |
public setMaxDepthStrategy(value: DepthTestStrategy) source
Sets the strategy for dealing with maximum depth values.
Params:
Name | Type | Attribute | Description |
value | DepthTestStrategy | The strategy. |