Skip to content

@orillusion/core


Class: GIPass ​

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:64

DDGI probe renderer. Owns the probe-source GBuffer, the cube camera used to render scene radiance for each probe, and the irradiance volume / lighting / multi-bounce / irradiance-compute child passes. Splits the probe budget over multiple frames (probeCountPerFrame) so a 1024-probe scene doesn't burn an entire frame on probe updates.

Extends ​

Constructors ​

Constructor ​

new GIPass(): GIPass

Returns ​

GIPass

Inherited from ​

RenderGraphPass.constructor

Properties ​

materialPasses ​

readonly materialPasses: readonly PassType[] = []

Defined in: src/gfx/renderJob/graph/RenderGraphPass.ts:324

Material-side pass types consumed. Optional; defaults to none for pure compute / copy passes.

Inherited from ​

RenderGraphPass.materialPasses


enabled ​

enabled: boolean = true

Defined in: src/gfx/renderJob/graph/RenderGraphPass.ts:332

Runtime kill switch. graph.disablePass(name) flips this. A disabled pass is treated as if it weren't in the graph: it's filtered out before validation + topo sort, and skipped during execute. Disabling a producer whose output is read by another enabled pass makes the next compile() throw UnresolvedResourceError.

Inherited from ​

RenderGraphPass.enabled


layerMask ​

layerMask: number = VisibleLayer.All

Defined in: src/gfx/renderJob/graph/RenderGraphPass.ts:347

Which scene layers this pass consumes, as a bitmask. Default VisibleLayer.All reproduces the legacy "draw every collected node" behaviour. Custom passes (or custom RendererJobs wiring built-in passes) override this to restrict the pass to specific composition layers — combined with the active camera's cullingMask at execute time via bitwise AND, then matched against each node's visibleLayer:

 (node.visibleLayer & pass.layerMask & camera.cullingMask) !== 0

Use collectLayered from inside execute() to fetch the filtered opaque/transparent lists; it threads layerMask and the camera mask through EntityCollect.getLayerLists.

Inherited from ​

RenderGraphPass.layerMask


reads ​

readonly reads: readonly string[]

Defined in: src/gfx/renderJob/graph/RenderGraphPass.ts:353

Names this pass reads. Populated on the first RenderGraph.compile() that processes this pass, from the b.read(...) calls inside its setup(). Empty frozen array before compile.

Inherited from ​

RenderGraphPass.reads


writes ​

readonly writes: readonly string[]

Defined in: src/gfx/renderJob/graph/RenderGraphPass.ts:358

Names this pass writes (creator + mutator combined). Populated on the first RenderGraph.compile() from the b.write(...) calls inside setup(). Empty frozen array before compile.

Inherited from ​

RenderGraphPass.writes


creates ​

readonly creates: readonly string[]

Defined in: src/gfx/renderJob/graph/RenderGraphPass.ts:363

Subset of writes for which this pass was the creator (called b.write(name, factory), not b.write(name)). The validator's single-creator rule operates on this set.

Inherited from ​

RenderGraphPass.creates


dependencies? ​

optional dependencies?: ReadonlySet<string>

Defined in: src/gfx/renderJob/graph/RenderGraphPass.ts:377

Explicit ordering dependencies on other pass names, set either from setup() via b.dependsOn(name) or by direct assignment before the next compile. Each entry adds a topo-sort edge <name> → this, independent of any resource edge. Use for side-effect dependencies the graph can't see (indirect buffers, off-screen RTs consumed via materials, etc.).

Beyond the edge, an entry here also positions this pass in the compiled schedule: the effective scheduling key collapses to "just after the latest dep", so a late-added pass with explicit dependencies runs next to its dep instead of trailing at the end of the queue. See topoSort for the full rule.

Inherited from ​

RenderGraphPass.dependencies


name ​

readonly name: "GIPass" = 'GIPass'

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:65

Unique pass identifier. Used as the graph-node key and in error messages — prefer PascalCase ending in Pass (e.g. ShadowPass, ColorPass).

Overrides ​

RenderGraphPass.name


positionMap ​

positionMap: RenderTexture

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:67


normalMap ​

normalMap: RenderTexture

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:68


colorMap ​

colorMap: RenderTexture

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:69


irradianceColorMap ​

irradianceColorMap: RenderTexture

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:70


irradianceDepthMap ​

irradianceDepthMap: RenderTexture

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:71


probeNext ​

probeNext: number

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:72


sizeW ​

sizeW: number

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:73


sizeH ​

sizeH: number

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:74


lightingPass ​

lightingPass: DDGILightingPass = null

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:76


bouncePass ​

bouncePass: DDGIMultiBouncePass = null

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:77


irradianceComputePass ​

irradianceComputePass: DDGIIrradianceComputePass = null

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:78

Methods ​

dispatchEvent() ​

dispatchEvent(event): void

Defined in: src/event/CEventDispatcher.ts:24

Dispatch an event to all registered objects with a specific type of listener.

Parameters ​

event ​

CEvent

Returns ​

void

Inherited from ​

RenderGraphPass.dispatchEvent


addEventListener() ​

addEventListener(type, callback, thisObject, param?, priority?): number

Defined in: src/event/CEventDispatcher.ts:78

register an event listener to event distancher.

Parameters ​

type ​

string | number

{string} event type.

callback ​

Function

{Function} The callback function that handles events. This function must accept an Event3D object as its unique parameter and cannot return any result. for example: function(evt:Event3D):void.

thisObject ​

any

{any} Current registration object, it'll call callback function.

param? ​

any = null

{any} the data binded to registered event, the default value is null.

priority? ​

number = 0

{number} The priority of callback function execution, with a larger set value having priority to call

Returns ​

number

Returns register event id

Inherited from ​

RenderGraphPass.addEventListener


removeEventListener() ​

removeEventListener(type, callback, thisObject): void

Defined in: src/event/CEventDispatcher.ts:112

Remove Event Listening

Parameters ​

type ​

string | number

{string} event type

callback ​

Function

{Function} callback function of event register

thisObject ​

any

{any} The current registered object.

Returns ​

void

Inherited from ​

RenderGraphPass.removeEventListener


removeEventListenerAt() ​

removeEventListenerAt(id): boolean

Defined in: src/event/CEventDispatcher.ts:132

Remove an event Listening with id

Parameters ​

id ​

number

Returns ​

boolean

Inherited from ​

RenderGraphPass.removeEventListenerAt


removeAllEventListener() ​

removeAllEventListener(eventType?): void

Defined in: src/event/CEventDispatcher.ts:152

Specify a event type to remove all related event listeners eventType event type, set null to remove all event listeners

Parameters ​

eventType? ​

string | number

Returns ​

void

Inherited from ​

RenderGraphPass.removeAllEventListener


containEventListener() ​

containEventListener(type): boolean

Defined in: src/event/CEventDispatcher.ts:184

whether the target presence of a listener with event type.

Parameters ​

type ​

string

{string} event type.

Returns ​

boolean

Returns a boolean.

Inherited from ​

RenderGraphPass.containEventListener


hasEventListener() ​

hasEventListener(type, callback?, thisObject?): boolean

Defined in: src/event/CEventDispatcher.ts:197

whether the target presence of a listener with event type. it associate more registration parameters.

Parameters ​

type ​

string | number

{string} event name.

callback? ​

Function = null

{Function} callback function of event register.

thisObject? ​

any = null

{any} The registered object.

Returns ​

boolean

Returns a boolean.

Inherited from ​

RenderGraphPass.hasEventListener


setup() ​

setup(b): void

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:94

Allocate GPU resources, declare graph-level dependencies via b.read / b.write. Called from RenderGraph.compile() — setup is deferred from add() so add() call order doesn't constrain resource-dependency order. Forward references (reads to a resource a later-added pass creates) are resolved through a multi-round retry loop in compile().

Parameters ​

b ​

RenderGraphBuilder

Returns ​

void

Overrides ​

RenderGraphPass.setup


setInputTextures() ​

setInputTextures(shadowMap, pointShadowMap): void

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:141

Wire shadow-map inputs into the lighting / bounce / irradiance compute child passes. Called from setup after the shadow textures are registered in the pool. Public so cloud-GI / test harnesses can re-wire if needed.

Parameters ​

shadowMap ​

Depth2DTextureArray

pointShadowMap ​

DepthCubeArrayTexture

Returns ​

void


execute() ​

execute(ctx): void

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:153

Execute the pass for one frame. Implementations build command encoders via ctx.view.engine3D.context3D.gpuContext, read inputs via ctx.get('<name>'), and submit GPU work.

Parameters ​

ctx ​

RenderGraphPassContext

Returns ​

void

Overrides ​

RenderGraphPass.execute


startRenderGI() ​

startRenderGI(index?): void

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:176

Parameters ​

index? ​

number = 0

Returns ​

void


startRenderCloudGI() ​

startRenderCloudGI(): void

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:184

Returns ​

void


setIrradianceData() ​

setIrradianceData(colorData, depthData, width, height): void

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:194

Cloud-GI / scripted reload entry point: write irradiance arrays directly into the GPU textures. Used by the GPU buffer reader pipeline. Layout must match the irradianceColorMap dimensions.

Parameters ​

colorData ​

Float32Array

depthData ​

Float32Array

width ​

number

height ​

number

Returns ​

void


destroy() ​

destroy(): void

Defined in: src/gfx/renderJob/graph/passes/GIPass.ts:364

Optional teardown hook called from graph.destroy() — release orphan Object3Ds / view quads / device resources that the pass owns directly.

Returns ​

void

Overrides ​

RenderGraphPass.destroy