Description
class ShaderMaterial extends Material
Constructor
new ShaderMaterial(name, scene, shaderPath, options)
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
scene |
Scene |
|
|
shaderPath |
any |
|
Methods
getClassName() → string
needAlphaBlending() → boolean
needAlphaTesting() → boolean
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
texture |
Texture |
|
setTextureArray(name, textures) → ShaderMaterial
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
textures |
Texture[] |
|
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
value |
number |
|
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
value |
number[] |
|
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
value |
Color3 |
|
setColor3Array(name, value) → ShaderMaterial
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
value |
Color3[] |
|
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
value |
Color4 |
|
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
value |
Vector2 |
|
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
value |
Vector3 |
|
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
value |
Vector4 |
|
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
value |
Matrix |
|
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
value |
Float32Array |
|
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
value |
Float32Array |
|
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
value |
number[] |
|
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
|
value |
number[] |
|
isReady(mesh, useInstances) → boolean
Parameters
|
Name |
Type |
Description |
optional |
mesh |
AbstractMesh |
|
optional |
useInstances |
boolean |
|
bindOnlyWorldMatrix(world) → void
Parameters
|
Name |
Type |
Description |
|
world |
Matrix |
|
bind(world, mesh) → void
Parameters
|
Name |
Type |
Description |
|
world |
Matrix |
|
optional |
mesh |
Mesh |
|
getActiveTextures() → BaseTexture[]
hasTexture(texture) → boolean
Parameters
Parameters
|
Name |
Type |
Description |
|
name |
string |
|
dispose(forceDisposeEffect, forceDisposeTextures) → void
Parameters
|
Name |
Type |
Description |
optional |
forceDisposeEffect |
boolean |
|
optional |
forceDisposeTextures |
boolean |
|
serialize() → any
static Parse(source, scene, rootUrl) → ShaderMaterial
Parameters
|
Name |
Type |
Description |
|
source |
any |
|
|
scene |
Scene |
|
|
rootUrl |
string |
|