Class MaterialStencilState
Implements
Constructors
constructor
-
Creates a material stencil state instance
Returns MaterialStencilState
Accessors
back Func
-
get backFunc(): number
Gets or sets the stencil back function
Returns number
-
set backFunc(value: number): void
The stencil comparison function to use for back faces.
Parameters
- value: number
Returns void
back Op Depth Fail
-
get backOpDepthFail(): number
Gets or sets the operation when the back depth test fails
Returns number
-
set backOpDepthFail(value: number): void
The operation to perform when the stencil test passes but the depth test fails for back faces.
Parameters
- value: number
Returns void
back Op Stencil Depth Pass
-
get backOpStencilDepthPass(): number
Gets or sets the operation when the back stencil+depth test succeeds
Returns number
-
set backOpStencilDepthPass(value: number): void
The operation to perform when both the stencil and depth tests pass for back faces.
Parameters
- value: number
Returns void
back Op Stencil Fail
-
get backOpStencilFail(): number
Gets or sets the operation when the back stencil test fails
Returns number
-
set backOpStencilFail(value: number): void
The operation to perform when the stencil test fails for back faces.
Parameters
- value: number
Returns void
enabled
-
get enabled(): boolean
Enables or disables the stencil test
Returns boolean
-
set enabled(value: boolean): void
Whether the stencil test is enabled or not.
Parameters
- value: boolean
Returns void
func
-
get func(): number
Gets or sets the stencil function
Returns number
-
set func(value: number): void
The stencil comparison function to use for front faces.
Parameters
- value: number
Returns void
func Mask
-
get funcMask(): number
Gets or sets the stencil function mask
Returns number
-
set funcMask(value: number): void
The stencil mask to use for reading.
Parameters
- value: number
Returns void
func Ref
-
get funcRef(): number
Gets or sets the stencil function reference
Returns number
-
set funcRef(value: number): void
The reference value to use for the stencil test.
Parameters
- value: number
Returns void
mask
-
get mask(): number
Gets or sets the stencil mask
Returns number
-
set mask(value: number): void
The stencil mask to use for writing.
Parameters
- value: number
Returns void
op Depth Fail
-
get opDepthFail(): number
Gets or sets the operation when the depth test fails
Returns number
-
set opDepthFail(value: number): void
The operation to perform when the stencil test passes but the depth test fails for front faces.
Parameters
- value: number
Returns void
op Stencil Depth Pass
-
get opStencilDepthPass(): number
Gets or sets the operation when the stencil+depth test succeeds
Returns number
-
set opStencilDepthPass(value: number): void
The operation to perform when both the stencil and depth tests pass for front faces.
Parameters
- value: number
Returns void
op Stencil Fail
-
get opStencilFail(): number
Gets or sets the operation when the stencil test fails
Returns number
-
set opStencilFail(value: number): void
The operation to perform when the stencil test fails for front faces.
Parameters
- value: number
Returns void
Methods
copy To
-
Makes a duplicate of the current configuration into another one.
Parameters
- stencilState: MaterialStencilState
defines stencil state where to copy the info
Returns void
- stencilState: MaterialStencilState
get Class Name
-
Get the current class name, useful for serialization or dynamic coding.
Returns string
"MaterialStencilState"
parse
-
Parses a stencil state configuration from a serialized object.
Parameters
- source: any
Serialized object.
- scene: Scene
Defines the scene we are parsing for
- rootUrl: string
Defines the rootUrl to load from
Returns void
- source: any
reset
-
Resets all the stencil states to default values
Returns void
serialize
-
Serializes this stencil configuration.
Returns any
- An object with the serialized config.
Class that holds the different stencil states of a material Usage example: https://playground.babylonjs.com/#CW5PRI#10