Class: GlassMaterial
GlassMaterial an rendering material implemented by simulating glass surfaces
Hierarchy
PhysicMaterial
↳
GlassMaterial
Constructors
Properties
Accessors
- depthCompare
- defaultPass
- castShadow
- blendMode
- transparent
- cullMode
- baseMap
- baseColor
- normalMap
- doubleSide
- alphaCutoff
- emissiveColor
- emissiveIntensity
- uvTransform_1
- uvTransform_2
- depthWriteEnabled
- materialF0
- roughness
- metallic
- ao
- metallic_min
- metallic_max
- roughness_min
- roughness_max
- normalScale
- maskMap
- aoMap
- clearCoatRoughnessMap
- brdfLUT
- emissiveMap
- envIntensity
- ior
- clearcoatFactor
- clearcoatRoughnessFactor
- clearcoatWeight
- clearcoatColor
Methods
Constructors
constructor
• new GlassMaterial()
Overrides
PhysicMaterial.constructor
Defined in
src/materials/GlassMaterial.ts:18
Properties
name
• name: string
name of this material
Inherited from
PhysicMaterial.name
Defined in
instanceID
• instanceID: string
Material Unique Identifier
Inherited from
PhysicMaterial.instanceID
Defined in
enable
• enable: boolean
= true
Inherited from
PhysicMaterial.enable
Defined in
Accessors
depthCompare
• get
depthCompare(): GPUCompareFunction
Returns
GPUCompareFunction
Inherited from
PhysicMaterial.depthCompare
Defined in
• set
depthCompare(value
): void
Parameters
Name | Type |
---|---|
value | GPUCompareFunction |
Returns
void
Inherited from
PhysicMaterial.depthCompare
Defined in
defaultPass
• get
defaultPass(): RenderShader
Returns
Inherited from
PhysicMaterial.defaultPass
Defined in
• set
defaultPass(value
): void
Parameters
Name | Type |
---|---|
value | RenderShader |
Returns
void
Inherited from
PhysicMaterial.defaultPass
Defined in
castShadow
• get
castShadow(): boolean
Returns
boolean
Inherited from
PhysicMaterial.castShadow
Defined in
• set
castShadow(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
PhysicMaterial.castShadow
Defined in
blendMode
• get
blendMode(): BlendMode
Returns
Inherited from
PhysicMaterial.blendMode
Defined in
• set
blendMode(value
): void
Parameters
Name | Type |
---|---|
value | BlendMode |
Returns
void
Inherited from
PhysicMaterial.blendMode
Defined in
transparent
• get
transparent(): boolean
Returns
boolean
Inherited from
PhysicMaterial.transparent
Defined in
• set
transparent(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
PhysicMaterial.transparent
Defined in
cullMode
• get
cullMode(): GPUCullMode
Returns
GPUCullMode
Inherited from
PhysicMaterial.cullMode
Defined in
• set
cullMode(value
): void
Parameters
Name | Type |
---|---|
value | GPUCullMode |
Returns
void
Inherited from
PhysicMaterial.cullMode
Defined in
baseMap
• get
baseMap(): Texture
Returns
Inherited from
PhysicMaterial.baseMap
Defined in
src/materials/PhysicMaterial.ts:49
• set
baseMap(value
): void
Parameters
Name | Type |
---|---|
value | Texture |
Returns
void
Inherited from
PhysicMaterial.baseMap
Defined in
src/materials/PhysicMaterial.ts:53
baseColor
• get
baseColor(): Color
Returns
Inherited from
PhysicMaterial.baseColor
Defined in
src/materials/PhysicMaterial.ts:57
• set
baseColor(value
): void
Parameters
Name | Type |
---|---|
value | Color |
Returns
void
Inherited from
PhysicMaterial.baseColor
Defined in
src/materials/PhysicMaterial.ts:61
normalMap
• get
normalMap(): Texture
Returns
Inherited from
PhysicMaterial.normalMap
Defined in
src/materials/PhysicMaterial.ts:65
• set
normalMap(value
): void
Parameters
Name | Type |
---|---|
value | Texture |
Returns
void
Inherited from
PhysicMaterial.normalMap
Defined in
src/materials/PhysicMaterial.ts:69
doubleSide
• get
doubleSide(): boolean
Returns
boolean
Inherited from
PhysicMaterial.doubleSide
Defined in
src/materials/PhysicMaterial.ts:73
• set
doubleSide(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
PhysicMaterial.doubleSide
Defined in
src/materials/PhysicMaterial.ts:76
alphaCutoff
• get
alphaCutoff(): any
Returns
any
Inherited from
PhysicMaterial.alphaCutoff
Defined in
src/materials/PhysicMaterial.ts:80
• set
alphaCutoff(value
): void
Parameters
Name | Type |
---|---|
value | any |
Returns
void
Inherited from
PhysicMaterial.alphaCutoff
Defined in
src/materials/PhysicMaterial.ts:83
emissiveColor
• get
emissiveColor(): Color
Returns
Inherited from
PhysicMaterial.emissiveColor
Defined in
src/materials/PhysicMaterial.ts:89
• set
emissiveColor(value
): void
Parameters
Name | Type |
---|---|
value | Color |
Returns
void
Inherited from
PhysicMaterial.emissiveColor
Defined in
src/materials/PhysicMaterial.ts:93
emissiveIntensity
• get
emissiveIntensity(): number
Returns
number
Inherited from
PhysicMaterial.emissiveIntensity
Defined in
src/materials/PhysicMaterial.ts:97
• set
emissiveIntensity(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.emissiveIntensity
Defined in
src/materials/PhysicMaterial.ts:101
uvTransform_1
• get
uvTransform_1(): Vector4
get transformUV1
Returns
Vector4
Inherited from
PhysicMaterial.uvTransform_1
Defined in
src/materials/PhysicMaterial.ts:108
• set
uvTransform_1(value
): void
set transformUV1
Parameters
Name | Type |
---|---|
value | Vector4 |
Returns
void
Inherited from
PhysicMaterial.uvTransform_1
Defined in
src/materials/PhysicMaterial.ts:115
uvTransform_2
• get
uvTransform_2(): Vector4
get transformUV2
Returns
Vector4
Inherited from
PhysicMaterial.uvTransform_2
Defined in
src/materials/PhysicMaterial.ts:123
• set
uvTransform_2(value
): void
set transformUV2
Parameters
Name | Type |
---|---|
value | Vector4 |
Returns
void
Inherited from
PhysicMaterial.uvTransform_2
Defined in
src/materials/PhysicMaterial.ts:130
depthWriteEnabled
• get
depthWriteEnabled(): boolean
Returns
boolean
Inherited from
PhysicMaterial.depthWriteEnabled
Defined in
src/materials/PhysicMaterial.ts:135
• set
depthWriteEnabled(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
PhysicMaterial.depthWriteEnabled
Defined in
src/materials/PhysicMaterial.ts:138
materialF0
• get
materialF0(): Vector4
get reflectivity
Returns
Vector4
Inherited from
PhysicMaterial.materialF0
Defined in
src/materials/PhysicMaterial.ts:145
• set
materialF0(value
): void
set reflectivity
Parameters
Name | Type |
---|---|
value | Vector4 |
Returns
void
Inherited from
PhysicMaterial.materialF0
Defined in
src/materials/PhysicMaterial.ts:152
roughness
• get
roughness(): number
get roughness
Returns
number
Inherited from
PhysicMaterial.roughness
Defined in
src/materials/PhysicMaterial.ts:159
• set
roughness(value
): void
set roughness
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.roughness
Defined in
src/materials/PhysicMaterial.ts:166
metallic
• get
metallic(): number
get metallic
Returns
number
Inherited from
PhysicMaterial.metallic
Defined in
src/materials/PhysicMaterial.ts:173
• set
metallic(value
): void
set metallic
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.metallic
Defined in
src/materials/PhysicMaterial.ts:180
ao
• get
ao(): number
get Ambient Occlussion, dealing with the effect of ambient light on object occlusion
Returns
number
Inherited from
PhysicMaterial.ao
Defined in
src/materials/PhysicMaterial.ts:187
• set
ao(value
): void
set Ambient Occlussion, dealing with the effect of ambient light on object occlusion
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.ao
Defined in
src/materials/PhysicMaterial.ts:194
metallic_min
• get
metallic_min(): number
get min metallic
Returns
number
Inherited from
PhysicMaterial.metallic_min
Defined in
src/materials/PhysicMaterial.ts:201
• set
metallic_min(value
): void
set min metallic
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.metallic_min
Defined in
src/materials/PhysicMaterial.ts:208
metallic_max
• get
metallic_max(): number
get max metallic
Returns
number
Inherited from
PhysicMaterial.metallic_max
Defined in
src/materials/PhysicMaterial.ts:215
• set
metallic_max(value
): void
set max metallic
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.metallic_max
Defined in
src/materials/PhysicMaterial.ts:222
roughness_min
• get
roughness_min(): number
get min roughness
Returns
number
Inherited from
PhysicMaterial.roughness_min
Defined in
src/materials/PhysicMaterial.ts:229
• set
roughness_min(value
): void
set min roughness
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.roughness_min
Defined in
src/materials/PhysicMaterial.ts:236
roughness_max
• get
roughness_max(): number
get max roughness
Returns
number
Inherited from
PhysicMaterial.roughness_max
Defined in
src/materials/PhysicMaterial.ts:243
• set
roughness_max(value
): void
set max roughness
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.roughness_max
Defined in
src/materials/PhysicMaterial.ts:250
normalScale
• get
normalScale(): number
Get the influence of Normal mapping on materials
Returns
number
Inherited from
PhysicMaterial.normalScale
Defined in
src/materials/PhysicMaterial.ts:257
• set
normalScale(value
): void
Set the influence of Normal mapping on materials
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.normalScale
Defined in
src/materials/PhysicMaterial.ts:264
maskMap
• get
maskMap(): Texture
get Mask Map R_chanel -> AoMap G_chanel -> Roughness B_chanel -> Metallic A_chanel -> C
Returns
Inherited from
PhysicMaterial.maskMap
Defined in
src/materials/PhysicMaterial.ts:275
• set
maskMap(value
): void
set Mask Map R_chanel -> AoMap G_chanel -> Roughness B_chanel -> Metallic A_chanel -> C
Parameters
Name | Type |
---|---|
value | Texture |
Returns
void
Inherited from
PhysicMaterial.maskMap
Defined in
src/materials/PhysicMaterial.ts:286
aoMap
• get
aoMap(): Texture
get Ambient Occlussion Map, dealing with the effect of ambient light on object occlusion
Returns
Inherited from
PhysicMaterial.aoMap
Defined in
src/materials/PhysicMaterial.ts:307
• set
aoMap(value
): void
set Ambient Occlussion Map, dealing with the effect of ambient light on object occlusion
Parameters
Name | Type |
---|---|
value | Texture |
Returns
void
Inherited from
PhysicMaterial.aoMap
Defined in
src/materials/PhysicMaterial.ts:296
clearCoatRoughnessMap
• get
clearCoatRoughnessMap(): Texture
get clearCoatRoughnessMap
Returns
Inherited from
PhysicMaterial.clearCoatRoughnessMap
Defined in
src/materials/PhysicMaterial.ts:325
• set
clearCoatRoughnessMap(value
): void
set clearCoatRoughnessMap
Parameters
Name | Type |
---|---|
value | Texture |
Returns
void
Inherited from
PhysicMaterial.clearCoatRoughnessMap
Defined in
src/materials/PhysicMaterial.ts:314
brdfLUT
• get
brdfLUT(): Texture
get brdf query map
Returns
Inherited from
PhysicMaterial.brdfLUT
Defined in
src/materials/PhysicMaterial.ts:332
• set
brdfLUT(value
): void
set brdf query map
Parameters
Name | Type |
---|---|
value | Texture |
Returns
void
Inherited from
PhysicMaterial.brdfLUT
Defined in
src/materials/PhysicMaterial.ts:339
emissiveMap
• get
emissiveMap(): Texture
get emissive map
Returns
Inherited from
PhysicMaterial.emissiveMap
Defined in
src/materials/PhysicMaterial.ts:347
• set
emissiveMap(value
): void
set emissive map
Parameters
Name | Type |
---|---|
value | Texture |
Returns
void
Inherited from
PhysicMaterial.emissiveMap
Defined in
src/materials/PhysicMaterial.ts:354
envIntensity
• get
envIntensity(): number
get intensity of environment light or color of sampled by texture
Returns
number
Inherited from
PhysicMaterial.envIntensity
Defined in
src/materials/PhysicMaterial.ts:368
• set
envIntensity(value
): void
set intensity of environment light or color of sampled by texture
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.envIntensity
Defined in
src/materials/PhysicMaterial.ts:361
ior
• get
ior(): number
get factor of refractive
Returns
number
Inherited from
PhysicMaterial.ior
Defined in
src/materials/PhysicMaterial.ts:382
• set
ior(value
): void
set factor of refractive
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.ior
Defined in
src/materials/PhysicMaterial.ts:375
clearcoatFactor
• get
clearcoatFactor(): number
get the factor of the clearcoat
Returns
number
Inherited from
PhysicMaterial.clearcoatFactor
Defined in
src/materials/PhysicMaterial.ts:404
• set
clearcoatFactor(value
): void
Set the factor of the clearcoat
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.clearcoatFactor
Defined in
src/materials/PhysicMaterial.ts:396
clearcoatRoughnessFactor
• get
clearcoatRoughnessFactor(): number
get the factor of the clearcoat Roughness
Returns
number
Inherited from
PhysicMaterial.clearcoatRoughnessFactor
Defined in
src/materials/PhysicMaterial.ts:419
• set
clearcoatRoughnessFactor(value
): void
set the factor of the clearcoat Roughness
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.clearcoatRoughnessFactor
Defined in
src/materials/PhysicMaterial.ts:411
clearcoatWeight
• get
clearcoatWeight(): number
get the weight of the clearcoat
Returns
number
Inherited from
PhysicMaterial.clearcoatWeight
Defined in
src/materials/PhysicMaterial.ts:434
• set
clearcoatWeight(value
): void
set the weight of the clearcoat
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.clearcoatWeight
Defined in
src/materials/PhysicMaterial.ts:426
clearcoatColor
• get
clearcoatColor(): Color
set the color of the clearcoat
Returns
Inherited from
PhysicMaterial.clearcoatColor
Defined in
src/materials/PhysicMaterial.ts:449
• set
clearcoatColor(value
): void
get the color of the clearcoat
Parameters
Name | Type |
---|---|
value | Color |
Returns
void
Inherited from
PhysicMaterial.clearcoatColor
Defined in
src/materials/PhysicMaterial.ts:441
Methods
clone
▸ clone(): GlassMaterial
Returns
Overrides
PhysicMaterial.clone
Defined in
src/materials/GlassMaterial.ts:47
hasPass
▸ hasPass(passType
): boolean
Parameters
Name | Type |
---|---|
passType | RendererType |
Returns
boolean
Inherited from
PhysicMaterial.hasPass
Defined in
getPass
▸ getPass(passType
): RenderShader
[]
get render pass by renderType
Parameters
Name | Type |
---|---|
passType | RendererType |
Returns
Inherited from
PhysicMaterial.getPass
Defined in
getAllPass
▸ getAllPass(): RenderShader
[]
get all color render pass
Returns
Inherited from
PhysicMaterial.getAllPass
Defined in
addPass
▸ addPass(passType
, pass
, index?
): RenderShader
[]
Parameters
Name | Type | Default value |
---|---|---|
passType | RendererType | undefined |
pass | RenderShader | undefined |
index | number | -1 |
Returns
Inherited from
PhysicMaterial.addPass
Defined in
removePass
▸ removePass(passType
, index
): void
Parameters
Name | Type |
---|---|
passType | RendererType |
index | number |
Returns
void
Inherited from
PhysicMaterial.removePass
Defined in
destroy
▸ destroy(force
): void
Parameters
Name | Type |
---|---|
force | boolean |
Returns
void
Inherited from
PhysicMaterial.destroy
Defined in
setDefault
▸ setDefault(): void
Set the render shader default value
Returns
void
Inherited from
PhysicMaterial.setDefault
Defined in
src/materials/PhysicMaterial.ts:22
useCleanCoat
▸ useCleanCoat(): void
valid USE_CLEARCOAT define in shader
Returns
void
Inherited from
PhysicMaterial.useCleanCoat