M3D / M3D / Render / GLShaders
Class: GLShaders
Memberof
M3D.Render
Description
WEBGL着色器管理类
Date
2022-5-11
Version
1.0
Copyright
All Rights Reserved. Copyright (C) 2022 HOTEAMSOFT, Ltd
Hierarchy
-
↳
GLShaders
Table of contents
Constructors
Properties
- axis
- background
- backgroundImage
- base
- baseVertex
- blur
- brdf
- combineOutline
- compareDepthMap
- compareMap
- compareNormalMap
- cubeMap
- depth
- depthMap
- depthMaterial
- depthNormals
- depthedEdgeLine
- diamondBack
- diamondBlendQuad
- diamondFront
- diamondFrontInfo
- diamondStar
- dragger
- edge
- edgeDetection
- edgePoint
- fboDebug
- fboDebugDepth
- flatColor
- gaussianBlur
- gaussianBlur2
- gaussianBlurOutline
- groundGrid
- groundMirror
- groundMirrorShadow
- groundShadow
- groundShadowBlur
- groundShadowMap
- hightlight
- image
- instanceEdge
- jewelBack
- jewelBlendQuad
- jewelFinalQuad
- jewelFront
- jewelHighLight
- jewelType
- lightWithTexture
- lightWithoutTexture
- matCapMaterial
- meshPhong
- multilight
- noteEdge
- noteImage
- outline
- pbrMaterial
- phongMaterial
- planeShadow
- quad
- ring
- sceneGround
- shadowDepthMap
- specular
- ssaoBlur
- ssaoDepthMap
- ssaoEffect
- textureQuad
- wireframe
- xray
- xrayEdge
Methods
- acquireProgram
- createParameters
- getCurrentAction
- getEffect
- getMaterialProgram
- getProgramCode
- getProgramName
- getShaderProgram
- getTextureEncodingFromMap
- setCurrentAction
Constructors
constructor
• new GLShaders(context
): GLShaders
Parameters
Name | Type |
---|---|
context | RenderContext |
Returns
Description
构造函数
Overrides
Properties
axis
▪ Static
axis: string
Inherited from
background
▪ Static
background: string
Inherited from
backgroundImage
▪ Static
backgroundImage: string
Inherited from
base
▪ Static
base: string
Inherited from
baseVertex
▪ Static
baseVertex: string
Inherited from
blur
▪ Static
blur: string
Inherited from
brdf
▪ Static
brdf: string
Inherited from
combineOutline
▪ Static
combineOutline: string
Inherited from
compareDepthMap
▪ Static
compareDepthMap: string
Inherited from
compareMap
▪ Static
compareMap: string
Inherited from
compareNormalMap
▪ Static
compareNormalMap: string
Inherited from
cubeMap
▪ Static
cubeMap: string
Inherited from
depth
▪ Static
depth: string
Inherited from
depthMap
▪ Static
depthMap: string
Inherited from
depthMaterial
▪ Static
depthMaterial: string
Inherited from
depthNormals
▪ Static
depthNormals: string
Inherited from
depthedEdgeLine
▪ Static
depthedEdgeLine: string
Inherited from
diamondBack
▪ Static
diamondBack: string
Inherited from
diamondBlendQuad
▪ Static
diamondBlendQuad: string
Inherited from
diamondFront
▪ Static
diamondFront: string
Inherited from
diamondFrontInfo
▪ Static
diamondFrontInfo: string
Inherited from
diamondStar
▪ Static
diamondStar: string
Inherited from
dragger
▪ Static
dragger: string
Inherited from
edge
▪ Static
edge: string
Inherited from
edgeDetection
▪ Static
edgeDetection: string
Inherited from
edgePoint
▪ Static
edgePoint: string
Inherited from
fboDebug
▪ Static
fboDebug: string
Inherited from
fboDebugDepth
▪ Static
fboDebugDepth: string
Inherited from
flatColor
▪ Static
flatColor: string
Inherited from
gaussianBlur
▪ Static
gaussianBlur: string
Inherited from
gaussianBlur2
▪ Static
gaussianBlur2: string
Inherited from
gaussianBlurOutline
▪ Static
gaussianBlurOutline: string
Inherited from
groundGrid
▪ Static
groundGrid: string
Inherited from
groundMirror
▪ Static
groundMirror: string
Inherited from
groundMirrorShadow
▪ Static
groundMirrorShadow: string
Inherited from
groundShadow
▪ Static
groundShadow: string
Inherited from
groundShadowBlur
▪ Static
groundShadowBlur: string
Inherited from
groundShadowMap
▪ Static
groundShadowMap: string
Inherited from
hightlight
▪ Static
hightlight: string
Inherited from
image
▪ Static
image: string
Inherited from
instanceEdge
▪ Static
instanceEdge: string
Inherited from
jewelBack
▪ Static
jewelBack: string
Inherited from
jewelBlendQuad
▪ Static
jewelBlendQuad: string
Inherited from
jewelFinalQuad
▪ Static
jewelFinalQuad: string
Inherited from
jewelFront
▪ Static
jewelFront: string
Inherited from
jewelHighLight
▪ Static
jewelHighLight: string
Inherited from
jewelType
▪ Static
jewelType: string
Inherited from
lightWithTexture
▪ Static
lightWithTexture: string
Inherited from
lightWithoutTexture
▪ Static
lightWithoutTexture: string
Inherited from
matCapMaterial
▪ Static
matCapMaterial: string
Inherited from
meshPhong
▪ Static
meshPhong: string
Inherited from
multilight
▪ Static
multilight: string
Inherited from
noteEdge
▪ Static
noteEdge: string
Inherited from
noteImage
▪ Static
noteImage: string
Inherited from
outline
▪ Static
outline: string
Inherited from
pbrMaterial
▪ Static
pbrMaterial: string
Inherited from
phongMaterial
▪ Static
phongMaterial: string
Inherited from
planeShadow
▪ Static
planeShadow: string
Inherited from
quad
▪ Static
quad: string
Inherited from
ring
▪ Static
ring: string
Inherited from
sceneGround
▪ Static
sceneGround: string
Inherited from
shadowDepthMap
▪ Static
shadowDepthMap: string
Inherited from
specular
▪ Static
specular: string
Inherited from
ssaoBlur
▪ Static
ssaoBlur: string
Inherited from
ssaoDepthMap
▪ Static
ssaoDepthMap: string
Inherited from
ssaoEffect
▪ Static
ssaoEffect: string
Inherited from
textureQuad
▪ Static
textureQuad: string
Inherited from
wireframe
▪ Static
wireframe: string
Inherited from
xray
▪ Static
xray: string
Inherited from
xrayEdge
▪ Static
xrayEdge: string
Inherited from
Methods
acquireProgram
▸ acquireProgram(material
, vsh
, fsh
, code
): ShaderProgram
Parameters
Name | Type |
---|---|
material | BaseMaterial |
vsh | string |
fsh | string |
code | string |
Returns
Description
获取着色器
Inherited from
createParameters
▸ createParameters(material
, isHightlight?
): void
Parameters
Name | Type | Default value | Description |
---|---|---|---|
material | BaseMaterial | undefined | 基础材质类 |
isHightlight? | boolean | false |
Returns
void
Description
创建参数
Overrides
getCurrentAction
▸ getCurrentAction(): any
Returns
any
Description
获取当前动作
Inherited from
getEffect
▸ getEffect(material
, renderInfo
, programType
): ShaderProgram
Parameters
Name | Type |
---|---|
material | BaseMaterial |
renderInfo | RenderInfo |
programType | string |
Returns
Description
获取材质对应的着色器
▸ getEffect(name
): ShaderProgram
Parameters
Name | Type | Description |
---|---|---|
name | string | 着色器名称 |
Returns
Description
获取对应的着色器
getMaterialProgram
▸ getMaterialProgram(material
, renderInfo
, programType
): GLShaderProgram
Parameters
Name | Type |
---|---|
material | BaseMaterial |
renderInfo | RenderInfo |
programType | string |
Returns
Description
获取材质对应着色器
Overrides
Shaders.getMaterialProgram
getProgramCode
▸ getProgramCode(material
): string
Parameters
Name | Type |
---|---|
material | BaseMaterial |
Returns
string
Description
获取program编码
Inherited from
getProgramName
▸ getProgramName(material
, renderInfo
): string
Parameters
Name | Type |
---|---|
material | BaseMaterial |
renderInfo | RenderInfo |
Returns
string
Description
获取着色器名称
getShaderProgram
▸ getShaderProgram(material
, renderInfo
): any
Parameters
Name | Type |
---|---|
material | BaseMaterial |
renderInfo | RenderInfo |
Returns
any
Description
获取着色器
Overrides
▸ getShaderProgram(name
): any
Parameters
Name | Type |
---|---|
name | string |
Returns
any
Description
获取着色器
Overrides
Shaders.getShaderProgram
getTextureEncodingFromMap
▸ getTextureEncodingFromMap(imageSource
, gammaOverrideLinear
): number
Parameters
Name | Type |
---|---|
imageSource | TextureObject | ImageSource | ImageSource [] |
gammaOverrideLinear | boolean |
Returns
number
Description
从Map中获取纹理编码
Inherited from
Shaders.getTextureEncodingFromMap
setCurrentAction
▸ setCurrentAction(action
): void
Parameters
Name | Type |
---|---|
action | any |
Returns
void
Description
设置当前动作