跳到主要内容
版本:v10.0

M3D / M3D / Render / GLShaders

Class: GLShaders

M3D.Render.GLShaders

Memberof

M3D.Render

Description

WEBGL着色器管理类

Date

2022-5-11

Version

1.0

Copyright

All Rights Reserved. Copyright (C) 2022 HOTEAMSOFT, Ltd

Hierarchy​

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new GLShaders(context): GLShaders

Parameters​

NameType
contextRenderContext

Returns​

GLShaders

Description

构造函数

Overrides​

Shaders.constructor

Properties​

axis​

▪ Static axis: string

Inherited from​

Shaders.axis


background​

▪ Static background: string

Inherited from​

Shaders.background


backgroundImage​

▪ Static backgroundImage: string

Inherited from​

Shaders.backgroundImage


base​

▪ Static base: string

Inherited from​

Shaders.base


baseVertex​

▪ Static baseVertex: string

Inherited from​

Shaders.baseVertex


blur​

▪ Static blur: string

Inherited from​

Shaders.blur


brdf​

▪ Static brdf: string

Inherited from​

Shaders.brdf


combineOutline​

▪ Static combineOutline: string

Inherited from​

Shaders.combineOutline


compareDepthMap​

▪ Static compareDepthMap: string

Inherited from​

Shaders.compareDepthMap


compareMap​

▪ Static compareMap: string

Inherited from​

Shaders.compareMap


compareNormalMap​

▪ Static compareNormalMap: string

Inherited from​

Shaders.compareNormalMap


cubeMap​

▪ Static cubeMap: string

Inherited from​

Shaders.cubeMap


depth​

▪ Static depth: string

Inherited from​

Shaders.depth


depthMap​

▪ Static depthMap: string

Inherited from​

Shaders.depthMap


depthMaterial​

▪ Static depthMaterial: string

Inherited from​

Shaders.depthMaterial


depthNormals​

▪ Static depthNormals: string

Inherited from​

Shaders.depthNormals


depthedEdgeLine​

▪ Static depthedEdgeLine: string

Inherited from​

Shaders.depthedEdgeLine


diamondBack​

▪ Static diamondBack: string

Inherited from​

Shaders.diamondBack


diamondBlendQuad​

▪ Static diamondBlendQuad: string

Inherited from​

Shaders.diamondBlendQuad


diamondFront​

▪ Static diamondFront: string

Inherited from​

Shaders.diamondFront


diamondFrontInfo​

▪ Static diamondFrontInfo: string

Inherited from​

Shaders.diamondFrontInfo


diamondStar​

▪ Static diamondStar: string

Inherited from​

Shaders.diamondStar


dragger​

▪ Static dragger: string

Inherited from​

Shaders.dragger


edge​

▪ Static edge: string

Inherited from​

Shaders.edge


edgeDetection​

▪ Static edgeDetection: string

Inherited from​

Shaders.edgeDetection


edgePoint​

▪ Static edgePoint: string

Inherited from​

Shaders.edgePoint


fboDebug​

▪ Static fboDebug: string

Inherited from​

Shaders.fboDebug


fboDebugDepth​

▪ Static fboDebugDepth: string

Inherited from​

Shaders.fboDebugDepth


flatColor​

▪ Static flatColor: string

Inherited from​

Shaders.flatColor


gaussianBlur​

▪ Static gaussianBlur: string

Inherited from​

Shaders.gaussianBlur


gaussianBlur2​

▪ Static gaussianBlur2: string

Inherited from​

Shaders.gaussianBlur2


gaussianBlurOutline​

▪ Static gaussianBlurOutline: string

Inherited from​

Shaders.gaussianBlurOutline


groundGrid​

▪ Static groundGrid: string

Inherited from​

Shaders.groundGrid


groundMirror​

▪ Static groundMirror: string

Inherited from​

Shaders.groundMirror


groundMirrorShadow​

▪ Static groundMirrorShadow: string

Inherited from​

Shaders.groundMirrorShadow


groundShadow​

▪ Static groundShadow: string

Inherited from​

Shaders.groundShadow


groundShadowBlur​

▪ Static groundShadowBlur: string

Inherited from​

Shaders.groundShadowBlur


groundShadowMap​

▪ Static groundShadowMap: string

Inherited from​

Shaders.groundShadowMap


hightlight​

▪ Static hightlight: string

Inherited from​

Shaders.hightlight


image​

▪ Static image: string

Inherited from​

Shaders.image


instanceEdge​

▪ Static instanceEdge: string

Inherited from​

Shaders.instanceEdge


jewelBack​

▪ Static jewelBack: string

Inherited from​

Shaders.jewelBack


jewelBlendQuad​

▪ Static jewelBlendQuad: string

Inherited from​

Shaders.jewelBlendQuad


jewelFinalQuad​

▪ Static jewelFinalQuad: string

Inherited from​

Shaders.jewelFinalQuad


jewelFront​

▪ Static jewelFront: string

Inherited from​

Shaders.jewelFront


jewelHighLight​

▪ Static jewelHighLight: string

Inherited from​

Shaders.jewelHighLight


jewelType​

▪ Static jewelType: string

Inherited from​

Shaders.jewelType


lightWithTexture​

▪ Static lightWithTexture: string

Inherited from​

Shaders.lightWithTexture


lightWithoutTexture​

▪ Static lightWithoutTexture: string

Inherited from​

Shaders.lightWithoutTexture


matCapMaterial​

▪ Static matCapMaterial: string

Inherited from​

Shaders.matCapMaterial


meshPhong​

▪ Static meshPhong: string

Inherited from​

Shaders.meshPhong


multilight​

▪ Static multilight: string

Inherited from​

Shaders.multilight


noteEdge​

▪ Static noteEdge: string

Inherited from​

Shaders.noteEdge


noteImage​

▪ Static noteImage: string

Inherited from​

Shaders.noteImage


outline​

▪ Static outline: string

Inherited from​

Shaders.outline


pbrMaterial​

▪ Static pbrMaterial: string

Inherited from​

Shaders.pbrMaterial


phongMaterial​

▪ Static phongMaterial: string

Inherited from​

Shaders.phongMaterial


planeShadow​

▪ Static planeShadow: string

Inherited from​

Shaders.planeShadow


quad​

▪ Static quad: string

Inherited from​

Shaders.quad


ring​

▪ Static ring: string

Inherited from​

Shaders.ring


sceneGround​

▪ Static sceneGround: string

Inherited from​

Shaders.sceneGround


shadowDepthMap​

▪ Static shadowDepthMap: string

Inherited from​

Shaders.shadowDepthMap


specular​

▪ Static specular: string

Inherited from​

Shaders.specular


ssaoBlur​

▪ Static ssaoBlur: string

Inherited from​

Shaders.ssaoBlur


ssaoDepthMap​

▪ Static ssaoDepthMap: string

Inherited from​

Shaders.ssaoDepthMap


ssaoEffect​

▪ Static ssaoEffect: string

Inherited from​

Shaders.ssaoEffect


textureQuad​

▪ Static textureQuad: string

Inherited from​

Shaders.textureQuad


wireframe​

▪ Static wireframe: string

Inherited from​

Shaders.wireframe


xray​

▪ Static xray: string

Inherited from​

Shaders.xray


xrayEdge​

▪ Static xrayEdge: string

Inherited from​

Shaders.xrayEdge

Methods​

acquireProgram​

▸ acquireProgram(material, vsh, fsh, code): ShaderProgram

Parameters​

NameType
materialBaseMaterial
vshstring
fshstring
codestring

Returns​

ShaderProgram

Description

获取着色器

Inherited from​

Shaders.acquireProgram


createParameters​

▸ createParameters(material, isHightlight?): void

Parameters​

NameTypeDefault valueDescription
materialBaseMaterialundefined基础材质类
isHightlight?booleanfalse

Returns​

void

Description

创建参数

Overrides​

Shaders.createParameters


getCurrentAction​

▸ getCurrentAction(): any

Returns​

any

Description

获取当前动作

Inherited from​

Shaders.getCurrentAction


getEffect​

▸ getEffect(material, renderInfo, programType): ShaderProgram

Parameters​

NameType
materialBaseMaterial
renderInfoRenderInfo
programTypestring

Returns​

ShaderProgram

Description

获取材质对应的着色器

▸ getEffect(name): ShaderProgram

Parameters​

NameTypeDescription
namestring着色器名称

Returns​

ShaderProgram

Description

获取对应的着色器


getMaterialProgram​

▸ getMaterialProgram(material, renderInfo, programType): GLShaderProgram

Parameters​

NameType
materialBaseMaterial
renderInfoRenderInfo
programTypestring

Returns​

GLShaderProgram

Description

获取材质对应着色器

Overrides​

Shaders.getMaterialProgram


getProgramCode​

▸ getProgramCode(material): string

Parameters​

NameType
materialBaseMaterial

Returns​

string

Description

获取program编码

Inherited from​

Shaders.getProgramCode


getProgramName​

▸ getProgramName(material, renderInfo): string

Parameters​

NameType
materialBaseMaterial
renderInfoRenderInfo

Returns​

string

Description

获取着色器名称


getShaderProgram​

▸ getShaderProgram(material, renderInfo): any

Parameters​

NameType
materialBaseMaterial
renderInfoRenderInfo

Returns​

any

Description

获取着色器

Overrides​

Shaders.getShaderProgram

▸ getShaderProgram(name): any

Parameters​

NameType
namestring

Returns​

any

Description

获取着色器

Overrides​

Shaders.getShaderProgram


getTextureEncodingFromMap​

▸ getTextureEncodingFromMap(imageSource, gammaOverrideLinear): number

Parameters​

NameType
imageSourceTextureObject | ImageSource | ImageSource[]
gammaOverrideLinearboolean

Returns​

number

Description

从Map中获取纹理编码

Inherited from​

Shaders.getTextureEncodingFromMap


setCurrentAction​

▸ setCurrentAction(action): void

Parameters​

NameType
actionany

Returns​

void

Description

设置当前动作

Inherited from​

Shaders.setCurrentAction