Class: QuadShader
Hierarchy
↳
QuadShader
Constructors
Properties
Methods
- addRenderPass
- removeShader
- removeShaderByIndex
- getSubShaders
- hasSubShaders
- getDefaultShaders
- getDefaultColorShader
- setDefine
- hasDefine
- deleteDefine
- setUniform
- setUniformFloat
- setUniformVector2
- setUniformVector3
- setUniformVector4
- setUniformColor
- getUniform
- getUniformFloat
- getUniformVector2
- getUniformVector3
- getUniformVector4
- getUniformColor
- setTexture
- getTexture
- setUniformBuffer
- getUniformBuffer
- setStorageBuffer
- getStorageBuffer
- setStructStorageBuffer
- getStructStorageBuffer
- noticeValueChange
- destroy
- clone
- applyUniform
Constructors
constructor
• new QuadShader(vs?
, fs?
): QuadShader
Parameters
Name | Type | Default value |
---|---|---|
vs | string | 'QuadGlsl_vs' |
fs | string | 'QuadGlsl_fs' |
Returns
Overrides
Defined in
src/loader/parser/prefab/mats/shader/QuadShader.ts:15
Properties
computes
• computes: RenderShaderCompute
[]
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:19
passShader
• passShader: Map
<PassType
, RenderShaderPass
[]>
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:21
Methods
addRenderPass
▸ addRenderPass(renderShader
, index?
): void
Parameters
Name | Type | Default value |
---|---|---|
renderShader | RenderShaderPass | undefined |
index | number | -1 |
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:28
removeShader
▸ removeShader(renderShader
, index?
): void
Parameters
Name | Type | Default value |
---|---|---|
renderShader | RenderShaderPass | undefined |
index | number | -1 |
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:38
removeShaderByIndex
▸ removeShaderByIndex(passType
, index?
): void
Parameters
Name | Type | Default value |
---|---|---|
passType | PassType | undefined |
index | number | -1 |
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:52
getSubShaders
▸ getSubShaders(passType
): RenderShaderPass
[]
Parameters
Name | Type |
---|---|
passType | PassType |
Returns
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:63
hasSubShaders
▸ hasSubShaders(passType
): boolean
Parameters
Name | Type |
---|---|
passType | PassType |
Returns
boolean
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:67
getDefaultShaders
▸ getDefaultShaders(): RenderShaderPass
[]
Returns
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:72
getDefaultColorShader
▸ getDefaultColorShader(): RenderShaderPass
Returns
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:76
setDefine
▸ setDefine(arg0
, arg1
): void
Parameters
Name | Type |
---|---|
arg0 | string |
arg1 | boolean |
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:80
hasDefine
▸ hasDefine(arg0
): boolean
Parameters
Name | Type |
---|---|
arg0 | string |
Returns
boolean
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:88
deleteDefine
▸ deleteDefine(arg0
): void
Parameters
Name | Type |
---|---|
arg0 | string |
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:99
setUniform
▸ setUniform(arg0
, arg1
): void
Parameters
Name | Type |
---|---|
arg0 | string |
arg1 | any |
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:107
setUniformFloat
▸ setUniformFloat(arg0
, arg1
): void
Parameters
Name | Type |
---|---|
arg0 | string |
arg1 | number |
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:115
setUniformVector2
▸ setUniformVector2(arg0
, arg1
): void
Parameters
Name | Type |
---|---|
arg0 | string |
arg1 | Vector2 |
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:123
setUniformVector3
▸ setUniformVector3(arg0
, arg1
): void
Parameters
Name | Type |
---|---|
arg0 | string |
arg1 | Vector3 |
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:131
setUniformVector4
▸ setUniformVector4(arg0
, arg1
): void
Parameters
Name | Type |
---|---|
arg0 | string |
arg1 | Vector4 |
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:139
setUniformColor
▸ setUniformColor(arg0
, arg1
): void
Parameters
Name | Type |
---|---|
arg0 | string |
arg1 | Color |
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:147
getUniform
▸ getUniform(arg0
): any
Parameters
Name | Type |
---|---|
arg0 | string |
Returns
any
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:155
getUniformFloat
▸ getUniformFloat(arg0
): number
Parameters
Name | Type |
---|---|
arg0 | string |
Returns
number
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:159
getUniformVector2
▸ getUniformVector2(arg0
): Vector2
Parameters
Name | Type |
---|---|
arg0 | string |
Returns
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:163
getUniformVector3
▸ getUniformVector3(arg0
): Vector3
Parameters
Name | Type |
---|---|
arg0 | string |
Returns
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:167
getUniformVector4
▸ getUniformVector4(arg0
): Vector4
Parameters
Name | Type |
---|---|
arg0 | string |
Returns
Vector4
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:171
getUniformColor
▸ getUniformColor(arg0
): Color
Parameters
Name | Type |
---|---|
arg0 | string |
Returns
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:175
setTexture
▸ setTexture(arg0
, arg1
): void
Parameters
Name | Type |
---|---|
arg0 | string |
arg1 | Texture |
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:179
getTexture
▸ getTexture(arg0
): Texture
Parameters
Name | Type |
---|---|
arg0 | string |
Returns
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:188
setUniformBuffer
▸ setUniformBuffer(arg0
, arg1
): void
Parameters
Name | Type |
---|---|
arg0 | string |
arg1 | UniformGPUBuffer |
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:192
getUniformBuffer
▸ getUniformBuffer(arg0
): GPUBufferBase
Parameters
Name | Type |
---|---|
arg0 | string |
Returns
GPUBufferBase
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:200
setStorageBuffer
▸ setStorageBuffer(arg0
, arg1
): void
Parameters
Name | Type |
---|---|
arg0 | string |
arg1 | StorageGPUBuffer |
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:204
getStorageBuffer
▸ getStorageBuffer(arg0
): StorageGPUBuffer
Parameters
Name | Type |
---|---|
arg0 | string |
Returns
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:212
setStructStorageBuffer
▸ setStructStorageBuffer<T
>(arg0
, arg1
): void
Type parameters
Name | Type |
---|---|
T | extends Struct |
Parameters
Name | Type |
---|---|
arg0 | string |
arg1 | StructStorageGPUBuffer <T > |
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:216
getStructStorageBuffer
▸ getStructStorageBuffer(arg0
): GPUBufferBase
Parameters
Name | Type |
---|---|
arg0 | string |
Returns
GPUBufferBase
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:224
noticeValueChange
▸ noticeValueChange(): void
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:228
destroy
▸ destroy(): void
Returns
void
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:236
clone
▸ clone(): Shader
Returns
Inherited from
Defined in
src/gfx/graphics/webGpu/shader/Shader.ts:240
applyUniform
▸ applyUniform(): void
Returns
void