MaskMaterial
Extends:
A mask shader material.
This material applies a mask texture to a buffer.
Constructor Summary
Public Constructor | ||
public |
constructor(maskTexture: Texture) Constructs a new mask material. |
Member Summary
Public Members | ||
public set |
Sets the color channel to use for masking. |
|
public set |
inputBuffer: Texture The input buffer. |
|
public get |
Indicates whether the masking is inverted. |
|
public set |
|
|
public set |
The masking technique. |
|
public set |
maskTexture: Texture The mask texture. |
|
public |
|
|
public get |
The current mask strength. |
|
public set |
|
Method Summary
Public Methods | ||
public |
this method was deprecated. Use strength instead.
Returns the current mask strength. |
|
public |
this method was deprecated. Use inverted instead.
Indicates whether the masking is inverted. |
|
public |
setColorChannel(value: ColorChannel) this method was deprecated. Use colorChannel instead.
Sets the color channel to use for masking. |
|
public |
setInputBuffer(value: Texture) this method was deprecated. Use inputBuffer instead.
Sets the input buffer. |
|
public |
setInverted(value: Boolean) this method was deprecated. Use inverted instead.
Determines whether the masking should be inverted. |
|
public |
setMaskFunction(value: MaskFunction) this method was deprecated. Use maskFunction instead.
Sets the masking technique. |
|
public |
setMaskTexture(value: Texture) this method was deprecated. Use maskTexture instead.
Sets the mask texture. |
|
public |
setStrength(value: Number) this method was deprecated. Use strength instead.
Sets the mask strength. |
Public Constructors
public constructor(maskTexture: Texture) source
Constructs a new mask material.
Params:
Name | Type | Attribute | Description |
maskTexture | Texture |
|
The mask texture. |
Public Members
public set colorChannel: ColorChannel source
Sets the color channel to use for masking. Default is ColorChannel.RED
.
public set inverted source
public set maskFunction: MaskFunction source
The masking technique. Default is MaskFunction.DISCARD
.
public get strength: Number source
The current mask strength.
Individual mask values will be clamped to [0.0, 1.0]. Has no effect when the mask function is set to DISCARD
.
public set strength source
Public Methods
public getStrength(): Number source
Returns the current mask strength.
public isInverted(): Boolean source
Indicates whether the masking is inverted.
public setColorChannel(value: ColorChannel) source
Sets the color channel to use for masking. Default is ColorChannel.RED
.
Params:
Name | Type | Attribute | Description |
value | ColorChannel | The channel. |
public setInputBuffer(value: Texture) source
Sets the input buffer.
Params:
Name | Type | Attribute | Description |
value | Texture | The input buffer. |
public setInverted(value: Boolean) source
Determines whether the masking should be inverted.
Params:
Name | Type | Attribute | Description |
value | Boolean | Whether the masking should be inverted. |
public setMaskFunction(value: MaskFunction) source
Sets the masking technique. Default is MaskFunction.DISCARD
.
Params:
Name | Type | Attribute | Description |
value | MaskFunction | The function. |
public setMaskTexture(value: Texture) source
Sets the mask texture.
Params:
Name | Type | Attribute | Description |
value | Texture | The texture. |