Skip to content

TgpuRenderPipeline

  • TgpuNamable.SelfResolvable.Timeable

Targets = never

readonly [$internal]: RenderPipelineInternals

SelfResolvable.[$internal]

packages/typegpu/src/core/pipeline/renderPipeline.ts:129


readonly hasIndexBuffer: boolean

packages/typegpu/src/core/pipeline/renderPipeline.ts:131


readonly resourceType: "render-pipeline"

packages/typegpu/src/core/pipeline/renderPipeline.ts:130

[$resolve](ctx): ResolvedSnippet

ResolutionCtx

ResolvedSnippet

SelfResolvable.[$resolve]

packages/typegpu/src/types.ts:319


$name(label): this

string

this

TgpuNamable.$name

packages/typegpu/src/shared/meta.ts:97


draw(vertexCount, instanceCount?, firstVertex?, firstInstance?): void

number

number

number

number

void

packages/typegpu/src/core/pipeline/renderPipeline.ts:181


drawIndexedIndirect(indirectBuffer, indirectOffset?): void

GPUBuffer | TgpuBuffer<BaseData>

number

void

packages/typegpu/src/core/pipeline/renderPipeline.ts:190


drawIndirect(indirectBuffer, indirectOffset?): void

GPUBuffer | TgpuBuffer<BaseData>

number

void

packages/typegpu/src/core/pipeline/renderPipeline.ts:188


toString(): string

string

SelfResolvable.toString

packages/typegpu/src/types.ts:320


with<TData>(vertexLayout, buffer): this

TData extends WgslArray<BaseData> | Disarray<BaseData>

TgpuVertexLayout<TData>

GPUBuffer | TgpuBuffer<TData> & VertexFlag

this

packages/typegpu/src/core/pipeline/renderPipeline.ts:133

with<Entries>(bindGroupLayout, bindGroup): this

Entries extends Record<string, null | TgpuLayoutEntry>

TgpuBindGroupLayout<Entries>

TgpuBindGroup<Entries>

this

packages/typegpu/src/core/pipeline/renderPipeline.ts:141

with(bindGroupLayout, bindGroup): this

TgpuBindGroupLayout

GPUBindGroup

this

packages/typegpu/src/core/pipeline/renderPipeline.ts:145

with(bindGroup): this

TgpuBindGroup

this

packages/typegpu/src/core/pipeline/renderPipeline.ts:146

with(encoder): this

GPUCommandEncoder

this

packages/typegpu/src/core/pipeline/renderPipeline.ts:147

with(pass): this

GPURenderPassEncoder

this

packages/typegpu/src/core/pipeline/renderPipeline.ts:148

with(bundleEncoder): this

GPURenderBundleEncoder

this

packages/typegpu/src/core/pipeline/renderPipeline.ts:149


withColorAttachment(attachment): this

Attaches texture views to the pipeline’s targets (outputs).

FragmentOutToColorAttachment<Targets>

The object should match the shape returned by the fragment shader, with values matching the ColorAttachment type.

this

// Draw 3 vertices onto the context's canvas
pipeline
.withColorAttachment({ view: context })
.draw(3)

packages/typegpu/src/core/pipeline/renderPipeline.ts:163


withDepthStencilAttachment(attachment): this

DepthStencilAttachment

this

packages/typegpu/src/core/pipeline/renderPipeline.ts:165


withIndexBuffer(buffer, offsetElements?, sizeElements?): TgpuRenderPipeline<Targets> & HasIndexBuffer

TgpuBuffer<BaseData> & IndexFlag

number

number

TgpuRenderPipeline<Targets> & HasIndexBuffer

packages/typegpu/src/core/pipeline/renderPipeline.ts:169

withIndexBuffer(buffer, indexFormat, offsetBytes?, sizeBytes?): TgpuRenderPipeline<Targets> & HasIndexBuffer

GPUBuffer

GPUIndexFormat

number

number

TgpuRenderPipeline<Targets> & HasIndexBuffer

packages/typegpu/src/core/pipeline/renderPipeline.ts:174


withPerformanceCallback(callback): this

(start, end) => void | Promise<void>

this

Timeable.withPerformanceCallback

packages/typegpu/src/core/pipeline/timeable.ts:6


withStencilReference(reference): this

number

this

packages/typegpu/src/core/pipeline/renderPipeline.ts:167


withTimestampWrites(options): this

number

number

TgpuQuerySet<"timestamp"> | GPUQuerySet

this

Timeable.withTimestampWrites

packages/typegpu/src/core/pipeline/timeable.ts:8