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

MaskMaterial

Extends:

three~ShaderMaterial → MaskMaterial

A mask shader material.

This material applies a mask texture to an arbitrary input 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 get

Indicates whether the masking is inverted.

public set

Determines whether the masking should be inverted.

public set

Sets the masking technique.

public set

maskTexture: Texture

Sets the mask texture.

public

Public Constructors

public constructor(maskTexture: Texture) source

Constructs a new mask material.

Params:

NameTypeAttributeDescription
maskTexture Texture
  • optional

The mask texture.

Public Members

public set colorChannel: ColorChannel source

Sets the color channel to use for masking.

The default channel is RED.

public get inverted: Boolean source

Indicates whether the masking is inverted.

public set inverted: Boolean source

Determines whether the masking should be inverted.

public set maskFunction: MaskFunction source

Sets the masking technique.

The default function is DISCARD.

public set maskTexture: Texture source

Sets the mask texture.

public needsUpdate: boolean source