Skip to content

@orillusion/core


Class: ShaderUtil

Defined in: src/gfx/graphics/webGpu/shader/util/ShaderUtil.ts:32

Holds the per-context caches of compiled GPU shader modules and render shader passes.

Constructors

Constructor

new ShaderUtil(): ShaderUtil

Returns

ShaderUtil

Methods

renderShaderModulePool()

static renderShaderModulePool(ctx): Map<string, GPUShaderModule>

Defined in: src/gfx/graphics/webGpu/shader/util/ShaderUtil.ts:38

Per-Context3D shader state accessors. Device-bound GPU shader modules are keyed per-device; the RenderShaderPass cache is also per-device (since the passes internally hold device-bound pipelines).

Parameters

ctx

Context3D

Returns

Map<string, GPUShaderModule>


renderShader()

static renderShader(ctx): Map<string, RenderShaderPass>

Defined in: src/gfx/graphics/webGpu/shader/util/ShaderUtil.ts:45

Get the per-context cache of render shader passes.

Parameters

ctx

Context3D

the rendering context

Returns

Map<string, RenderShaderPass>


init()

static init(ctx): void

Defined in: src/gfx/graphics/webGpu/shader/util/ShaderUtil.ts:60

Initialize the per-context shader state caches.

Parameters

ctx

Context3D

the rendering context

Returns

void