Used by RenderTarget and the Renderer to render to one or multiple view textures (and optionally a depth texture), using a specific GPURenderPassDescriptor | render pass descriptor.

Constructors

Properties

renderer: Renderer

Renderer used by this RenderPass

type: string

The type of the RenderPass

uuid: string

The universal unique id of this RenderPass

Options used to create this RenderPass

depthTexture: Texture

Depth Texture to use with this RenderPass if it should handle depth

viewTextures: Texture[]

Array of Texture used for this RenderPass color attachments view textures

resolveTargets: Texture[]

Array of Texture used for this RenderPass color attachments resolve textures

descriptor: GPURenderPassDescriptor

The RenderPass GPURenderPassDescriptor | descriptor

Accessors

Methods

  • Set the descriptor GPULoadOp | load operation

    Parameters

    • loadOp: GPULoadOp = 'clear'

      new GPULoadOp | load operation to use

    • colorAttachmentIndex: number = 0

      index of the color attachment for which to use this load operation

    Returns void

  • Set our GPUColor | clear colors value.
    Beware that if the renderer is using premultiplied alpha mode, your R, G and B channels should be premultiplied by your alpha channel.

    Parameters

    • clearValue: GPUColor = ...

      new GPUColor | clear colors value to use

    • colorAttachmentIndex: number = 0

      index of the color attachment for which to use this clear value

    Returns void

  • Set the current descriptor texture GPURenderPassColorAttachment#view | view and GPURenderPassColorAttachment#resolveTarget | resolveTarget (depending on whether we're using multisampling)

    Parameters

    • renderTexture: GPUTexture = null

      GPUTexture to use, or the context GPUTexture | current texture if null.

    Returns GPUTexture

    • the GPUTexture | texture to render to.