Constructor
new Pass(parametersopt)
Constructor
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
parameters |
Array.<Array> |
<optional> |
An array of parameters |
Extends
Members
DepthFunction
depthFunction
Depth function to use
- Inherited From:
- Default Value:
- {DepthFunction.Less}
boolean
depthTest
Indicates if we want to test pixels with values in the depth buffer
- Inherited From:
- Default Value:
- {true}
boolean
depthWrite
Indicates if we want to write in the depth buffer
- Inherited From:
- Default Value:
- {true}
StencilOperation
stencilDepthTestFail
Operation to execute when stencil test failed using depth buffer
- Inherited From:
- Default Value:
- {StencilOperation.Keep}
StencilFunction
stencilFunction
Stencil function to use
- Inherited From:
- Default Value:
- {StencilFunction.Less}
number
stencilMask
Stencil mask value
- Inherited From:
- Default Value:
- {255}
number
stencilReference
Stencil reference value
- Inherited From:
- Default Value:
- {0}
StencilOperation
stencilSuccess
Operation to execute when stencil test is a success
- Inherited From:
- Default Value:
- {StencilOperation.Keep}
boolean
stencilTest
Indicates if stencil test is active
- Inherited From:
- Default Value:
- {false}
StencilOperation
stencilTestFail
Operation to execute when stencil test failed
- Inherited From:
- Default Value:
- {StencilOperation.Keep}
number
stencilWrite
Value to write in the stencil buffer when stencil is active
- Inherited From:
- Default Value:
- {0xFF}
Methods
add(name, type, value) → {Pass}
Add a parameter to the material
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Parameter's name |
type |
Type | Parameter's type |
value |
Array.<number> | number | boolean | Texture | Float32Array | Parameter's value |
A reference to the instance
getParameters() → {Array.<PassParameter>}
Return an array with all material's parameters
An array of PassParameter
Array.<PassParameter>
isEqual(state) → {boolean}
Check if the given StateBlock instance is equal to this one
Parameters:
Name | Type | Description |
---|---|---|
state |
StateBlock | A StateBlock instance |
- Inherited From:
True if the two states are equals, otherwise false
boolean