Skip to content

TgpuRenderPipeline

  • TgpuNamable.SelfResolvable.Timeable

Targets = never

readonly [$internal]: RenderPipelineInternals

SelfResolvable.[$internal]

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


readonly hasIndexBuffer: boolean

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


readonly resourceType: "render-pipeline"

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

[$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:173


toString(): string

string

SelfResolvable.toString

packages/typegpu/src/types.ts:320


with<TData>(vertexLayout, buffer): this

TData extends WgslArray<BaseData> | Disarray<BaseData>

TgpuVertexLayout<TData>

TgpuBuffer<TData> & VertexFlag

this

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

with<Entries>(bindGroupLayout, bindGroup): this

Entries extends Record<string, null | TgpuLayoutEntry>

TgpuBindGroupLayout<Entries>

TgpuBindGroup<Entries>

this

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

with(bindGroup): this

TgpuBindGroup

this

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


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:155


withDepthStencilAttachment(attachment): this

DepthStencilAttachment

this

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


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

TgpuBuffer<BaseData> & IndexFlag

number

number

TgpuRenderPipeline<Targets> & HasIndexBuffer

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

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

GPUBuffer

GPUIndexFormat

number

number

TgpuRenderPipeline<Targets> & HasIndexBuffer

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


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:159


withTimestampWrites(options): this

number

number

TgpuQuerySet<"timestamp"> | GPUQuerySet

this

Timeable.withTimestampWrites

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