Skip to content

Class: ShaderPassBase

Hierarchy

Constructors

Properties

Methods

Constructors

constructor

new ShaderPassBase()

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

NameTypeDescription
namestringbuffer name
bufferStorageGPUBufferstorage 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

NameType
Textends Struct<T>

Parameters

NameTypeDescription
namestringbuffer name
bufferStructStorageGPUBuffer<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

NameType
namestring
bufferUniformGPUBuffer

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:127


setDefine

setDefine(defineName, value): void

set define value

Parameters

NameType
defineNamestring
valueany

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:141


hasDefine

hasDefine(defineName): boolean

Whether there is a define key

Parameters

NameType
defineNamestring

Returns

boolean

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:155


deleteDefine

deleteDefine(defineName): void

delete define value

Parameters

NameType
defineNamestring

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:163


setUniformFloat

setUniformFloat(name, value): void

set uniform float value

Parameters

NameType
namestring
valuenumber

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:173


setUniformVector2

setUniformVector2(name, value): void

set uniform vector2 value

Parameters

NameType
namestring
valueVector2

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:187


setUniformVector3

setUniformVector3(name, value): void

set uniform vector3 value

Parameters

NameType
namestring
valueVector3

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:201


setUniformVector4

setUniformVector4(name, value): void

set uniform vector4 value

Parameters

NameType
namestring
valueVector4

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:214


setUniformColor

setUniformColor(name, value): void

set uniform color value

Parameters

NameType
namestring
valueColor

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:227


setUniformArray

setUniformArray(name, value): void

set uniform array value

Parameters

NameType
namestring
valueFloat32Array

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:240


setUniform

setUniform(name, value): void

Parameters

NameType
namestring
valueany

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:248


getUniform

getUniform(name): any

Parameters

NameType
namestring

Returns

any

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:256


getUniformFloat

getUniformFloat(name): number

Parameters

NameType
namestring

Returns

number

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:260


getUniformVector2

getUniformVector2(name): Vector2

Parameters

NameType
namestring

Returns

Vector2

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:264


getUniformVector3

getUniformVector3(name): Vector3

Parameters

NameType
namestring

Returns

Vector3

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:268


getUniformVector4

getUniformVector4(name): Vector4

Parameters

NameType
namestring

Returns

Vector4

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:272


getUniformColor

getUniformColor(name): Color

Parameters

NameType
namestring

Returns

Color

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:276


getBuffer

getBuffer(name): GPUBufferBase

Parameters

NameType
namestring

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

NameType
force?boolean

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/ShaderPassBase.ts:297