Class: ShaderPassBase
Hierarchy
ShaderPassBase
Constructors
Properties
- instanceID
- shaderVariant
- vsEntryPoint
- fsEntryPoint
- bindGroups
- shaderReflection
- defineValue
- constValues
- uniforms
- materialDataUniformBuffer
Methods
- noticeShaderChange
- noticeValueChange
- setStorageBuffer
- setStructStorageBuffer
- setUniformBuffer
- setDefine
- hasDefine
- deleteDefine
- setUniformFloat
- setUniformVector2
- setUniformVector3
- setUniformVector4
- setUniformColor
- setUniformArray
- setUniform
- getUniform
- getUniformFloat
- getUniformVector2
- getUniformVector3
- getUniformVector4
- getUniformColor
- getBuffer
- applyUniform
- destroy
Constructors
constructor
• new ShaderPassBase(): ShaderPassBase
Returns
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:72
Properties
instanceID
• Readonly
instanceID: string
Shader Unique instance id
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:21
shaderVariant
• shaderVariant: string
Shader variant value
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:26
vsEntryPoint
• vsEntryPoint: string
Vertex stage entry point name
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:31
fsEntryPoint
• fsEntryPoint: string
Fragment stage entry point name
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:36
bindGroups
• bindGroups: GPUBindGroup
[]
BindGroup collection
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:41
shaderReflection
• shaderReflection: ShaderReflection
Shader reflection info
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:46
defineValue
• defineValue: Object
The defined syntax value of the Shader when it is precompiled
Index signature
▪ [name: string
]: any
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:51
constValues
• constValues: Object
The constant value of the Shader when it is precompiled
Index signature
▪ [name: string
]: any
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:56
uniforms
• uniforms: Object
Uniforms data collection
Index signature
▪ [name: string
]: UniformNode
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:61
materialDataUniformBuffer
• materialDataUniformBuffer: MaterialDataUniformGPUBuffer
Uniform data for materials
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:66
Methods
noticeShaderChange
▸ noticeShaderChange(): void
notice shader change
Returns
void
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:83
noticeValueChange
▸ noticeValueChange(): void
notice shader state change
Returns
void
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:90
setStorageBuffer
▸ setStorageBuffer(name
, buffer
): void
set storage gpu buffer
Parameters
Name | Type | Description |
---|---|---|
name | string | buffer name |
buffer | StorageGPUBuffer | storage useAge gpu buffer |
Returns
void
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:99
setStructStorageBuffer
▸ setStructStorageBuffer<T
>(name
, buffer
): void
set struct storage gpu buffer
Type parameters
Name | Type |
---|---|
T | extends Struct |
Parameters
Name | Type | Description |
---|---|---|
name | string | buffer name |
buffer | StructStorageGPUBuffer <T > | struct storage useAge gpu buffer |
Returns
void
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:113
setUniformBuffer
▸ setUniformBuffer(name
, buffer
): void
set uniform gpu buffer min size 256
Parameters
Name | Type |
---|---|
name | string |
buffer | UniformGPUBuffer |
Returns
void
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:127
setDefine
▸ setDefine(defineName
, value
): void
set define value
Parameters
Name | Type |
---|---|
defineName | string |
value | any |
Returns
void
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:141
hasDefine
▸ hasDefine(defineName
): boolean
Whether there is a define key
Parameters
Name | Type |
---|---|
defineName | string |
Returns
boolean
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:155
deleteDefine
▸ deleteDefine(defineName
): void
delete define value
Parameters
Name | Type |
---|---|
defineName | string |
Returns
void
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:163
setUniformFloat
▸ setUniformFloat(name
, value
): void
set uniform float value
Parameters
Name | Type |
---|---|
name | string |
value | number |
Returns
void
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:173
setUniformVector2
▸ setUniformVector2(name
, value
): void
set uniform vector2 value
Parameters
Name | Type |
---|---|
name | string |
value | Vector2 |
Returns
void
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:187
setUniformVector3
▸ setUniformVector3(name
, value
): void
set uniform vector3 value
Parameters
Name | Type |
---|---|
name | string |
value | Vector3 |
Returns
void
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:201
setUniformVector4
▸ setUniformVector4(name
, value
): void
set uniform vector4 value
Parameters
Name | Type |
---|---|
name | string |
value | Vector4 |
Returns
void
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:214
setUniformColor
▸ setUniformColor(name
, value
): void
set uniform color value
Parameters
Name | Type |
---|---|
name | string |
value | Color |
Returns
void
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:227
setUniformArray
▸ setUniformArray(name
, value
): void
set uniform array value
Parameters
Name | Type |
---|---|
name | string |
value | Float32Array |
Returns
void
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:240
setUniform
▸ setUniform(name
, value
): void
Parameters
Name | Type |
---|---|
name | string |
value | any |
Returns
void
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:248
getUniform
▸ getUniform(name
): any
Parameters
Name | Type |
---|---|
name | string |
Returns
any
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:256
getUniformFloat
▸ getUniformFloat(name
): number
Parameters
Name | Type |
---|---|
name | string |
Returns
number
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:260
getUniformVector2
▸ getUniformVector2(name
): Vector2
Parameters
Name | Type |
---|---|
name | string |
Returns
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:264
getUniformVector3
▸ getUniformVector3(name
): Vector3
Parameters
Name | Type |
---|---|
name | string |
Returns
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:268
getUniformVector4
▸ getUniformVector4(name
): Vector4
Parameters
Name | Type |
---|---|
name | string |
Returns
Vector4
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:272
getUniformColor
▸ getUniformColor(name
): Color
Parameters
Name | Type |
---|---|
name | string |
Returns
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:276
getBuffer
▸ getBuffer(name
): GPUBufferBase
Parameters
Name | Type |
---|---|
name | string |
Returns
GPUBufferBase
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:280
applyUniform
▸ applyUniform(): void
Returns
void
Defined in
src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:288
destroy
▸ destroy(force?
): void
destroy
Parameters
Name | Type |
---|---|
force? | boolean |
Returns
void