Skip to content

@orillusion/core


Class: RenderGraphRenderPass ​

Defined in: src/gfx/renderJob/graph/RenderGraphRenderPass.ts:95

Handle for "open a render pass driven by a single owned pipeline". The render-side analog of RenderGraphComputePass: owns a GPURenderPipeline + bind-group layouts (built lazily on first begin) and the per-call encoder lifecycle. Encoder lifecycle itself is delegated to the bound RenderGraphRenderTarget so the load-op resolution + RendererPassState caching live on the target where they belong.

Created via b.createRenderPass(name, target, desc, openOpts?) from inside another pass's setup(). Pass authors typically build several of these to compose a custom rendering feature (e.g. a depth-only pre-pass + a fullscreen lighting resolve) without falling back to the heavyweight material-driven pipeline.

Scene passes that draw many heterogeneous materials per frame (the canonical ColorPass-style flow) skip this class and call target.beginPass(ctx, opts) directly — they don't have a single pipeline to own.

Constructors ​

Constructor ​

new RenderGraphRenderPass(name, target, desc, openOptions?): RenderGraphRenderPass

Defined in: src/gfx/renderJob/graph/RenderGraphRenderPass.ts:109

Parameters ​

name ​

string

target ​

RenderGraphRenderTarget

desc ​

RenderPipelineDesc

openOptions? ​

BeginPassOptions = {}

Returns ​

RenderGraphRenderPass

Properties ​

name ​

readonly name: string

Defined in: src/gfx/renderJob/graph/RenderGraphRenderPass.ts:96


target ​

readonly target: RenderGraphRenderTarget

Defined in: src/gfx/renderJob/graph/RenderGraphRenderPass.ts:97


desc ​

readonly desc: Readonly<RenderPipelineDesc>

Defined in: src/gfx/renderJob/graph/RenderGraphRenderPass.ts:98


openOptions ​

readonly openOptions: Readonly<BeginPassOptions>

Defined in: src/gfx/renderJob/graph/RenderGraphRenderPass.ts:99


pipeline ​

pipeline: GPURenderPipeline = null

Defined in: src/gfx/renderJob/graph/RenderGraphRenderPass.ts:101


bindGroupLayouts ​

bindGroupLayouts: GPUBindGroupLayout[] = null

Defined in: src/gfx/renderJob/graph/RenderGraphRenderPass.ts:102


encoder ​

encoder: GPURenderPassEncoder = null

Defined in: src/gfx/renderJob/graph/RenderGraphRenderPass.ts:105

Runtime fields — valid between begin and end.


command ​

command: GPUCommandEncoder = null

Defined in: src/gfx/renderJob/graph/RenderGraphRenderPass.ts:106


passState ​

passState: RendererPassState = null

Defined in: src/gfx/renderJob/graph/RenderGraphRenderPass.ts:107

Methods ​

begin() ​

begin(ctx): GPURenderPassEncoder

Defined in: src/gfx/renderJob/graph/RenderGraphRenderPass.ts:128

Lazily build the pipeline (first call), open a fresh command + render-pass encoder on the bound target with the resolved load-op combination, bind the pipeline, and return the encoder. Pass authors then call draw (or drive the returned encoder directly) before invoking end.

Parameters ​

ctx ​

RenderGraphPassContext

Returns ​

GPURenderPassEncoder


draw() ​

draw(call): void

Defined in: src/gfx/renderJob/graph/RenderGraphRenderPass.ts:148

Convenience: bind groups + (optional) vertex/index buffers + dispatch one draw or drawIndexed call. Equivalent to manually iterating setBindGroup / setVertexBuffer / setIndexBuffer and calling the matching draw* on encoder.

Parameters ​

call ​

RenderDrawCall

Returns ​

void


end() ​

end(ctx): void

Defined in: src/gfx/renderJob/graph/RenderGraphRenderPass.ts:193

Close the render-pass encoder and submit the per-pass command buffer. Clears runtime fields so a stale handle from the previous frame surfaces as a clear error rather than encoder misuse.

Parameters ​

ctx ​

RenderGraphPassContext

Returns ​

void