Class: GlassMaterial
HDRLit材质 基于物理渲染,旨在模拟现实世界光照效果
Hierarchy
PhysicMaterial
↳
GlassMaterial
Properties
Constructors
Methods
- clone
- debug
- useDefine
- getTextures
- setDefine
- addPass
- removePass
- destroy
- serialization
- unSerialization
- setShader
- getShader
- useCleanCoat
Accessors
- shaderState
- tintColor
- shadowMap
- envMap
- baseMap
- normalMap
- emissiveColor
- emissiveIntensity
- alphaCutoff
- irradianceMap
- irradianceDepthMap
- baseColor
- sort
- shaderID
- blendMode
- frontFace
- doubleSide
- cullMode
- depthBias
- depthCompare
- uvTransform_1
- uvTransform_2
- materialF0
- roughness
- metallic
- ao
- metallic_min
- metallic_max
- roughness_min
- roughness_max
- normalScale
- maskMap
- aoMap
- clearCoatRoughnessMap
- brdfLUT
- emissiveMap
- envIntensity
- ior
- clearcoatFactor
- clearcoatRoughnessFactor
- clearcoatWeight
- clearcoatColor
Properties
count
▪ Static
count: number
= 0
实例个数
Defined in
src/engine/materials/GlassMaterial.ts:18
name
• name: string
材质名称
Inherited from
PhysicMaterial.name
Defined in
src/engine/materials/MaterialBase.ts:26
uuid
• uuid: string
材质唯一标识符
Inherited from
PhysicMaterial.uuid
Defined in
src/engine/materials/MaterialBase.ts:31
isPassMaterial
• isPassMaterial: boolean
= false
是否为PassMaterial
Inherited from
PhysicMaterial.isPassMaterial
Defined in
src/engine/materials/MaterialBase.ts:35
receiveEnv
• receiveEnv: boolean
= true
是否接收Env
Inherited from
PhysicMaterial.receiveEnv
Defined in
src/engine/materials/MaterialBase.ts:44
renderPasses
• renderPasses: Map
<RendererType
, MaterialPass
[]>
Inherited from
PhysicMaterial.renderPasses
Defined in
src/engine/materials/MaterialPass.ts:7
transparent
• transparent: boolean
= false
是否透明
Inherited from
PhysicMaterial.transparent
Defined in
src/engine/materials/MaterialPass.ts:13
enable
• enable: boolean
= true
材质是否启用
Inherited from
PhysicMaterial.enable
Defined in
src/engine/materials/MaterialPass.ts:18
renderShader
• renderShader: RenderShader
Inherited from
PhysicMaterial.renderShader
Defined in
src/engine/materials/MaterialPass.ts:20
Constructors
constructor
• new GlassMaterial()
创建新的pbr材质对象
Overrides
PhysicMaterial.constructor
Defined in
src/engine/materials/GlassMaterial.ts:22
Methods
clone
▸ clone(): GlassMaterial
Returns
Overrides
PhysicMaterial.clone
Defined in
src/engine/materials/GlassMaterial.ts:52
debug
▸ debug(): void
启用GUI调试
Returns
void
Overrides
PhysicMaterial.debug
Defined in
src/engine/materials/GlassMaterial.ts:86
useDefine
▸ useDefine(define
, value?
): void
启用材质球的定义
Memberof
MaterialBase
Parameters
Name | Type | Default value |
---|---|---|
define | string | undefined |
value? | boolean | true |
Returns
void
Inherited from
PhysicMaterial.useDefine
Defined in
src/engine/materials/MaterialBase.ts:155
getTextures
▸ getTextures(): Object
获取纹理
Returns
Object
返回材质纹理
Inherited from
PhysicMaterial.getTextures
Defined in
src/engine/materials/MaterialBase.ts:300
setDefine
▸ setDefine(define
, bool
): void
设置当前定义状态
Parameters
Name | Type |
---|---|
define | string |
bool | boolean |
Returns
void
Inherited from
PhysicMaterial.setDefine
Defined in
src/engine/materials/MaterialBase.ts:309
addPass
▸ addPass(passType
, pass
, index?
): MaterialPass
[]
Parameters
Name | Type | Default value |
---|---|---|
passType | RendererType | undefined |
pass | MaterialPass | undefined |
index | number | -1 |
Returns
Inherited from
PhysicMaterial.addPass
Defined in
src/engine/materials/MaterialBase.ts:313
removePass
▸ removePass(passType
, index
): void
Parameters
Name | Type |
---|---|
passType | RendererType |
index | number |
Returns
void
Inherited from
PhysicMaterial.removePass
Defined in
src/engine/materials/MaterialBase.ts:329
destroy
▸ destroy(): void
材质球资源回收
Returns
void
Inherited from
PhysicMaterial.destroy
Defined in
src/engine/materials/MaterialBase.ts:342
serialization
▸ serialization(): SerializeMaterialInstance
Returns
Inherited from
PhysicMaterial.serialization
Defined in
src/engine/materials/MaterialBase.ts:357
unSerialization
▸ unSerialization(instance
, data
): void
Parameters
Name | Type |
---|---|
instance | SerializeMaterialInstance |
data | UnSerializeData |
Returns
void
Inherited from
PhysicMaterial.unSerialization
Defined in
src/engine/materials/MaterialBase.ts:373
setShader
▸ setShader(vs
, fs
): RenderShader
Parameters
Name | Type |
---|---|
vs | string |
fs | string |
Returns
Inherited from
PhysicMaterial.setShader
Defined in
src/engine/materials/MaterialPass.ts:42
getShader
▸ getShader(): RenderShader
Returns
Inherited from
PhysicMaterial.getShader
Defined in
src/engine/materials/MaterialPass.ts:49
useCleanCoat
▸ useCleanCoat(): void
Returns
void
Inherited from
PhysicMaterial.useCleanCoat
Defined in
src/engine/materials/PhysicMaterial.ts:311
Accessors
shaderState
• get
shaderState(): ShaderState
Returns
ShaderState
Inherited from
PhysicMaterial.shaderState
Defined in
src/engine/materials/MaterialBase.ts:49
• set
shaderState(value
): void
Parameters
Name | Type |
---|---|
value | ShaderState |
Returns
void
Inherited from
PhysicMaterial.shaderState
Defined in
src/engine/materials/MaterialBase.ts:53
tintColor
• get
tintColor(): Color
Returns
Inherited from
PhysicMaterial.tintColor
Defined in
src/engine/materials/MaterialBase.ts:57
• set
tintColor(value
): void
Parameters
Name | Type |
---|---|
value | Color |
Returns
void
Inherited from
PhysicMaterial.tintColor
Defined in
src/engine/materials/MaterialBase.ts:61
shadowMap
• set
shadowMap(texture
): void
设置阴影贴图
Parameters
Name | Type |
---|---|
texture | Texture |
Returns
void
Inherited from
PhysicMaterial.shadowMap
Defined in
src/engine/materials/MaterialBase.ts:68
envMap
• set
envMap(texture
): void
设置环境贴图
Parameters
Name | Type |
---|---|
texture | Texture |
Returns
void
Inherited from
PhysicMaterial.envMap
Defined in
src/engine/materials/MaterialBase.ts:75
baseMap
• get
baseMap(): Texture
获取基础贴图
Returns
Inherited from
PhysicMaterial.baseMap
Defined in
src/engine/materials/MaterialBase.ts:89
• set
baseMap(texture
): void
设置基础贴图
Parameters
Name | Type |
---|---|
texture | Texture |
Returns
void
Inherited from
PhysicMaterial.baseMap
Defined in
src/engine/materials/MaterialBase.ts:82
normalMap
• get
normalMap(): Texture
获取法线贴图
Returns
Inherited from
PhysicMaterial.normalMap
Defined in
src/engine/materials/MaterialBase.ts:96
• set
normalMap(value
): void
设置法线贴图
Parameters
Name | Type |
---|---|
value | Texture |
Returns
void
Inherited from
PhysicMaterial.normalMap
Defined in
src/engine/materials/MaterialBase.ts:103
emissiveColor
• get
emissiveColor(): Color
获取发光颜色
Returns
Inherited from
PhysicMaterial.emissiveColor
Defined in
src/engine/materials/MaterialBase.ts:118
• set
emissiveColor(value
): void
设置发光颜色
Parameters
Name | Type |
---|---|
value | Color |
Returns
void
Inherited from
PhysicMaterial.emissiveColor
Defined in
src/engine/materials/MaterialBase.ts:125
emissiveIntensity
• get
emissiveIntensity(): number
获取发光强度
Returns
number
Inherited from
PhysicMaterial.emissiveIntensity
Defined in
src/engine/materials/MaterialBase.ts:145
• set
emissiveIntensity(value
): void
设置发光强度
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.emissiveIntensity
Defined in
src/engine/materials/MaterialBase.ts:135
alphaCutoff
• get
alphaCutoff(): number
获取alphaCutoff,通道透明阈值参数
Returns
number
Inherited from
PhysicMaterial.alphaCutoff
Defined in
src/engine/materials/MaterialBase.ts:199
• set
alphaCutoff(value
): void
设置alphaCutoff,通道透明阈值参数
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.alphaCutoff
Defined in
src/engine/materials/MaterialBase.ts:206
irradianceMap
• get
irradianceMap(): Texture
获取irradiance发光贴图
Returns
Inherited from
PhysicMaterial.irradianceMap
Defined in
src/engine/materials/MaterialBase.ts:213
• set
irradianceMap(value
): void
设置irradiance发光贴图
Parameters
Name | Type |
---|---|
value | Texture |
Returns
void
Inherited from
PhysicMaterial.irradianceMap
Defined in
src/engine/materials/MaterialBase.ts:220
irradianceDepthMap
• get
irradianceDepthMap(): Texture
获取发光深度贴图
Returns
Inherited from
PhysicMaterial.irradianceDepthMap
Defined in
src/engine/materials/MaterialBase.ts:229
• set
irradianceDepthMap(value
): void
设置发光深度贴图
Parameters
Name | Type |
---|---|
value | Texture |
Returns
void
Inherited from
PhysicMaterial.irradianceDepthMap
Defined in
src/engine/materials/MaterialBase.ts:236
baseColor
• get
baseColor(): Color
获取基础颜色
Returns
Inherited from
PhysicMaterial.baseColor
Defined in
src/engine/materials/MaterialBase.ts:245
• set
baseColor(value
): void
设置基础颜色
Parameters
Name | Type |
---|---|
value | Color |
Returns
void
Inherited from
PhysicMaterial.baseColor
Defined in
src/engine/materials/MaterialBase.ts:252
sort
• get
sort(): number
Returns
number
Inherited from
PhysicMaterial.sort
Defined in
src/engine/materials/MaterialPass.ts:26
• set
sort(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.sort
Defined in
src/engine/materials/MaterialPass.ts:30
shaderID
• get
shaderID(): string
Returns
string
Inherited from
PhysicMaterial.shaderID
Defined in
src/engine/materials/MaterialPass.ts:34
• set
shaderID(value
): void
Parameters
Name | Type |
---|---|
value | string |
Returns
void
Inherited from
PhysicMaterial.shaderID
Defined in
src/engine/materials/MaterialPass.ts:38
blendMode
• get
blendMode(): BlendMode
获取混合模式
Returns
Inherited from
PhysicMaterial.blendMode
Defined in
src/engine/materials/MaterialPass.ts:56
• set
blendMode(value
): void
设置混合模式
Parameters
Name | Type |
---|---|
value | BlendMode |
Returns
void
Inherited from
PhysicMaterial.blendMode
Defined in
src/engine/materials/MaterialPass.ts:63
frontFace
• get
frontFace(): GPUFrontFace
获取面朝向
Returns
GPUFrontFace
Inherited from
PhysicMaterial.frontFace
Defined in
src/engine/materials/MaterialPass.ts:72
• set
frontFace(value
): void
设置面朝向
Parameters
Name | Type |
---|---|
value | GPUFrontFace |
Returns
void
Inherited from
PhysicMaterial.frontFace
Defined in
src/engine/materials/MaterialPass.ts:79
doubleSide
• get
doubleSide(): boolean
获取是否为双面模式
Returns
boolean
Inherited from
PhysicMaterial.doubleSide
Defined in
src/engine/materials/MaterialPass.ts:86
• set
doubleSide(value
): void
设置是否为双面模式
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
PhysicMaterial.doubleSide
Defined in
src/engine/materials/MaterialPass.ts:93
cullMode
• get
cullMode(): GPUCullMode
获取剔除模式
Returns
GPUCullMode
Inherited from
PhysicMaterial.cullMode
Defined in
src/engine/materials/MaterialPass.ts:100
• set
cullMode(value
): void
设置剔除模式
Parameters
Name | Type |
---|---|
value | GPUCullMode |
Returns
void
Inherited from
PhysicMaterial.cullMode
Defined in
src/engine/materials/MaterialPass.ts:107
depthBias
• get
depthBias(): number
Returns
number
Inherited from
PhysicMaterial.depthBias
Defined in
src/engine/materials/MaterialPass.ts:111
• set
depthBias(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.depthBias
Defined in
src/engine/materials/MaterialPass.ts:115
depthCompare
• get
depthCompare(): GPUCompareFunction
获取剔除模式
Returns
GPUCompareFunction
Inherited from
PhysicMaterial.depthCompare
Defined in
src/engine/materials/MaterialPass.ts:122
• set
depthCompare(value
): void
设置剔除模式
Parameters
Name | Type |
---|---|
value | GPUCompareFunction |
Returns
void
Inherited from
PhysicMaterial.depthCompare
Defined in
src/engine/materials/MaterialPass.ts:129
uvTransform_1
• get
uvTransform_1(): Vector4
获取uvTransform_1
Returns
Vector4
Inherited from
PhysicMaterial.uvTransform_1
Defined in
src/engine/materials/PhysicMaterial.ts:22
• set
uvTransform_1(value
): void
设置uvTransform_1
Parameters
Name | Type |
---|---|
value | Vector4 |
Returns
void
Inherited from
PhysicMaterial.uvTransform_1
Defined in
src/engine/materials/PhysicMaterial.ts:29
uvTransform_2
• get
uvTransform_2(): Vector4
获取uvTransform_2
Returns
Vector4
Inherited from
PhysicMaterial.uvTransform_2
Defined in
src/engine/materials/PhysicMaterial.ts:37
• set
uvTransform_2(value
): void
设置uvTransform_2
Parameters
Name | Type |
---|---|
value | Vector4 |
Returns
void
Inherited from
PhysicMaterial.uvTransform_2
Defined in
src/engine/materials/PhysicMaterial.ts:44
materialF0
• get
materialF0(): Vector4
获取材质反射率
Returns
Vector4
Inherited from
PhysicMaterial.materialF0
Defined in
src/engine/materials/PhysicMaterial.ts:56
• set
materialF0(value
): void
设置材质反射率
Parameters
Name | Type |
---|---|
value | Vector4 |
Returns
void
Inherited from
PhysicMaterial.materialF0
Defined in
src/engine/materials/PhysicMaterial.ts:63
roughness
• get
roughness(): number
获取材质粗糙程度
Returns
number
Inherited from
PhysicMaterial.roughness
Defined in
src/engine/materials/PhysicMaterial.ts:70
• set
roughness(value
): void
设置材质粗糙程度
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.roughness
Defined in
src/engine/materials/PhysicMaterial.ts:77
metallic
• get
metallic(): number
获取材质金属度
Returns
number
Inherited from
PhysicMaterial.metallic
Defined in
src/engine/materials/PhysicMaterial.ts:84
• set
metallic(value
): void
设置材质金属度
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.metallic
Defined in
src/engine/materials/PhysicMaterial.ts:91
ao
• get
ao(): number
获取Ambient Occlussion, 处理环境光对物体遮挡的效果
Returns
number
Inherited from
PhysicMaterial.ao
Defined in
src/engine/materials/PhysicMaterial.ts:98
• set
ao(value
): void
设置Ambient Occlussion, 处理环境光对物体遮挡的效果
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.ao
Defined in
src/engine/materials/PhysicMaterial.ts:105
metallic_min
• get
metallic_min(): number
获取最小金属度
Returns
number
Inherited from
PhysicMaterial.metallic_min
Defined in
src/engine/materials/PhysicMaterial.ts:112
• set
metallic_min(value
): void
设置最小金属度
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.metallic_min
Defined in
src/engine/materials/PhysicMaterial.ts:119
metallic_max
• get
metallic_max(): number
获取最大金属度
Returns
number
Inherited from
PhysicMaterial.metallic_max
Defined in
src/engine/materials/PhysicMaterial.ts:126
• set
metallic_max(value
): void
设置最大金属度
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.metallic_max
Defined in
src/engine/materials/PhysicMaterial.ts:133
roughness_min
• get
roughness_min(): number
设置最小粗糙程度
Returns
number
Inherited from
PhysicMaterial.roughness_min
Defined in
src/engine/materials/PhysicMaterial.ts:140
• set
roughness_min(value
): void
设置最小粗糙程度
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.roughness_min
Defined in
src/engine/materials/PhysicMaterial.ts:147
roughness_max
• get
roughness_max(): number
获取最大粗糙程度
Returns
number
Inherited from
PhysicMaterial.roughness_max
Defined in
src/engine/materials/PhysicMaterial.ts:154
• set
roughness_max(value
): void
设置最大粗糙程度
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.roughness_max
Defined in
src/engine/materials/PhysicMaterial.ts:161
normalScale
• get
normalScale(): number
获取法线贴图对材质的影响程度
Returns
number
Inherited from
PhysicMaterial.normalScale
Defined in
src/engine/materials/PhysicMaterial.ts:168
• set
normalScale(value
): void
设置法线贴图对材质的影响程度
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.normalScale
Defined in
src/engine/materials/PhysicMaterial.ts:175
maskMap
• get
maskMap(): Texture
获取遮罩贴图
Returns
Inherited from
PhysicMaterial.maskMap
Defined in
src/engine/materials/PhysicMaterial.ts:204
• set
maskMap(value
): void
设置遮罩贴图 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/engine/materials/PhysicMaterial.ts:215
aoMap
• get
aoMap(): Texture
获取ao贴图
Returns
Inherited from
PhysicMaterial.aoMap
Defined in
src/engine/materials/PhysicMaterial.ts:234
• set
aoMap(value
): void
设置ao贴图
Parameters
Name | Type |
---|---|
value | Texture |
Returns
void
Inherited from
PhysicMaterial.aoMap
Defined in
src/engine/materials/PhysicMaterial.ts:223
clearCoatRoughnessMap
• get
clearCoatRoughnessMap(): Texture
获取clearCoatRoughnessMap贴图
Returns
Inherited from
PhysicMaterial.clearCoatRoughnessMap
Defined in
src/engine/materials/PhysicMaterial.ts:250
• set
clearCoatRoughnessMap(value
): void
设置clearCoatRoughnessMap贴图
Parameters
Name | Type |
---|---|
value | Texture |
Returns
void
Inherited from
PhysicMaterial.clearCoatRoughnessMap
Defined in
src/engine/materials/PhysicMaterial.ts:241
brdfLUT
• get
brdfLUT(): Texture
获取brdf查询表
Returns
Inherited from
PhysicMaterial.brdfLUT
Defined in
src/engine/materials/PhysicMaterial.ts:257
• set
brdfLUT(value
): void
设置brdf查询表
Parameters
Name | Type |
---|---|
value | Texture |
Returns
void
Inherited from
PhysicMaterial.brdfLUT
Defined in
src/engine/materials/PhysicMaterial.ts:264
emissiveMap
• get
emissiveMap(): Texture
获取发光贴图
Returns
Inherited from
PhysicMaterial.emissiveMap
Defined in
src/engine/materials/PhysicMaterial.ts:272
• set
emissiveMap(value
): void
设置发光贴图
Parameters
Name | Type |
---|---|
value | Texture |
Returns
void
Inherited from
PhysicMaterial.emissiveMap
Defined in
src/engine/materials/PhysicMaterial.ts:279
envIntensity
• get
envIntensity(): number
获取环境强度
Returns
number
Inherited from
PhysicMaterial.envIntensity
Defined in
src/engine/materials/PhysicMaterial.ts:293
• set
envIntensity(value
): void
设置环境强度
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.envIntensity
Defined in
src/engine/materials/PhysicMaterial.ts:286
ior
• get
ior(): number
获取折射系数
Returns
number
Inherited from
PhysicMaterial.ior
Defined in
src/engine/materials/PhysicMaterial.ts:307
• set
ior(value
): void
设置折射系数
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.ior
Defined in
src/engine/materials/PhysicMaterial.ts:300
clearcoatFactor
• get
clearcoatFactor(): number
获取透明涂层强度系数
Returns
number
Inherited from
PhysicMaterial.clearcoatFactor
Defined in
src/engine/materials/PhysicMaterial.ts:325
• set
clearcoatFactor(value
): void
设置透明涂层强度系数
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.clearcoatFactor
Defined in
src/engine/materials/PhysicMaterial.ts:318
clearcoatRoughnessFactor
• get
clearcoatRoughnessFactor(): number
获取透明涂层粗糙程度系数
Returns
number
Inherited from
PhysicMaterial.clearcoatRoughnessFactor
Defined in
src/engine/materials/PhysicMaterial.ts:339
• set
clearcoatRoughnessFactor(value
): void
设置透明涂层粗糙程度系数
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.clearcoatRoughnessFactor
Defined in
src/engine/materials/PhysicMaterial.ts:332
clearcoatWeight
• get
clearcoatWeight(): number
获取透明涂层权重
Returns
number
Inherited from
PhysicMaterial.clearcoatWeight
Defined in
src/engine/materials/PhysicMaterial.ts:353
• set
clearcoatWeight(value
): void
设置透明涂层权重
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
PhysicMaterial.clearcoatWeight
Defined in
src/engine/materials/PhysicMaterial.ts:346
clearcoatColor
• get
clearcoatColor(): Color
获取透明涂层颜色
Returns
Inherited from
PhysicMaterial.clearcoatColor
Defined in
src/engine/materials/PhysicMaterial.ts:367
• set
clearcoatColor(value
): void
设置透明涂层颜色
Parameters
Name | Type |
---|---|
value | Color |
Returns
void
Inherited from
PhysicMaterial.clearcoatColor