Skip to content

Class: Shader

Hierarchy

Constructors

Properties

Methods

Constructors

constructor

new Shader(): Shader

Returns

Shader

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:23

Properties

computes

computes: RenderShaderCompute[]

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:19


passShader

passShader: Map<PassType, RenderShaderPass[]>

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:21

Methods

addRenderPass

addRenderPass(renderShader, index?): void

Parameters

NameTypeDefault value
renderShaderRenderShaderPassundefined
indexnumber-1

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:28


removeShader

removeShader(renderShader, index?): void

Parameters

NameTypeDefault value
renderShaderRenderShaderPassundefined
indexnumber-1

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:38


removeShaderByIndex

removeShaderByIndex(passType, index?): void

Parameters

NameTypeDefault value
passTypePassTypeundefined
indexnumber-1

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:52


getSubShaders

getSubShaders(passType): RenderShaderPass[]

Parameters

NameType
passTypePassType

Returns

RenderShaderPass[]

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:63


hasSubShaders

hasSubShaders(passType): boolean

Parameters

NameType
passTypePassType

Returns

boolean

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:67


getDefaultShaders

getDefaultShaders(): RenderShaderPass[]

Returns

RenderShaderPass[]

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:72


getDefaultColorShader

getDefaultColorShader(): RenderShaderPass

Returns

RenderShaderPass

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:76


setDefine

setDefine(arg0, arg1): void

Parameters

NameType
arg0string
arg1boolean

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:80


hasDefine

hasDefine(arg0): boolean

Parameters

NameType
arg0string

Returns

boolean

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:88


deleteDefine

deleteDefine(arg0): void

Parameters

NameType
arg0string

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:99


setUniform

setUniform(arg0, arg1): void

Parameters

NameType
arg0string
arg1any

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:107


setUniformFloat

setUniformFloat(arg0, arg1): void

Parameters

NameType
arg0string
arg1number

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:115


setUniformVector2

setUniformVector2(arg0, arg1): void

Parameters

NameType
arg0string
arg1Vector2

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:123


setUniformVector3

setUniformVector3(arg0, arg1): void

Parameters

NameType
arg0string
arg1Vector3

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:131


setUniformVector4

setUniformVector4(arg0, arg1): void

Parameters

NameType
arg0string
arg1Vector4

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:139


setUniformColor

setUniformColor(arg0, arg1): void

Parameters

NameType
arg0string
arg1Color

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:147


getUniform

getUniform(arg0): any

Parameters

NameType
arg0string

Returns

any

Defined in

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


getUniformFloat

getUniformFloat(arg0): number

Parameters

NameType
arg0string

Returns

number

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:159


getUniformVector2

getUniformVector2(arg0): Vector2

Parameters

NameType
arg0string

Returns

Vector2

Defined in

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


getUniformVector3

getUniformVector3(arg0): Vector3

Parameters

NameType
arg0string

Returns

Vector3

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:167


getUniformVector4

getUniformVector4(arg0): Vector4

Parameters

NameType
arg0string

Returns

Vector4

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:171


getUniformColor

getUniformColor(arg0): Color

Parameters

NameType
arg0string

Returns

Color

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:175


setTexture

setTexture(arg0, arg1): void

Parameters

NameType
arg0string
arg1Texture

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:179


getTexture

getTexture(arg0): Texture

Parameters

NameType
arg0string

Returns

Texture

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:188


setUniformBuffer

setUniformBuffer(arg0, arg1): void

Parameters

NameType
arg0string
arg1UniformGPUBuffer

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:192


getUniformBuffer

getUniformBuffer(arg0): GPUBufferBase

Parameters

NameType
arg0string

Returns

GPUBufferBase

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:200


setStorageBuffer

setStorageBuffer(arg0, arg1): void

Parameters

NameType
arg0string
arg1StorageGPUBuffer

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:204


getStorageBuffer

getStorageBuffer(arg0): StorageGPUBuffer

Parameters

NameType
arg0string

Returns

StorageGPUBuffer

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:212


setStructStorageBuffer

setStructStorageBuffer<T>(arg0, arg1): void

Type parameters

NameType
Textends Struct

Parameters

NameType
arg0string
arg1StructStorageGPUBuffer<T>

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:216


getStructStorageBuffer

getStructStorageBuffer(arg0): GPUBufferBase

Parameters

NameType
arg0string

Returns

GPUBufferBase

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:224


noticeValueChange

noticeValueChange(): void

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:228


destroy

destroy(): void

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:236


clone

clone(): Shader

Returns

Shader

Defined in

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


applyUniform

applyUniform(): void

Returns

void

Defined in

src/gfx/graphics/webGpu/shader/Shader.ts:249