pixi.js
    Preparing search index...

    Class RenderTargetAdvanced

    A class that describes what the renderers are rendering to. This can be as simple as a Texture, or as complex as a multi-texture, multi-sampled render target. Support for stencil and depth buffers is also included.

    If you need something more complex than a Texture to render to, you should use this class. Under the hood, all textures you render to have a RenderTarget created on their behalf.

    Index

    Constructors

    Properties

    colorAttachments: PixiColorAttachment[] = []

    An array of attachments that define exactly how the GPU should render to the color textures. This includes the texture itself, as well as load/store operations and clear values.

    depthStencilAttachment?: PixiDepthStencilAttachment

    An attachment that defines exactly how the GPU should render to the depth/stencil texture. Includes the texture, load/store operations, and depth/stencil specific clear values.

    dirtyId: number = 0
    flipY?: boolean

    Opt-in toggle that inverts this target's Y orientation, resolved at bind time.

    Defaults to undefined/false — a no-op, so rendering is exactly what it has always been (texture targets flip so they sample upright in the 2D pipeline; the screen does not). Set true to invert that automatic orientation — e.g. to store a capture in screen orientation for 3D, where geometry UVs expect the un-flipped result.

    When true, the projection Y-flip and the winding/cull inversion flip together, so a front-facing triangle stays front-facing — back-face culling of content rendered into the target stays correct.

    isRoot: boolean = false
    label?: string

    a label for debugging — shows up on the render pass in GPU debuggers (WebGPU)

    uid: number = ...

    unique id for this render target

    defaultOptions: RenderTargetOptions = ...

    The default options for a render target

    Accessors

    • get colorTextures(): TextureSource<any>[]

      An array of textures that can be written to by the GPU - mostly this has one texture in Pixi, but you could write to multiple if required! (eg deferred lighting). This is a backwards-compatible getter that extracts the textures from colorAttachments.

      Returns TextureSource<any>[]

    • get depth(): boolean

      Whether this target provides a depth buffer — requested via options or implied by its attachment's format.

      Returns boolean

    • get depthStencilTexture(): TextureSource<any>

      The stencil and depth buffer will write to this texture in WebGPU.

      Returns TextureSource<any>

    • get height(): number

      Returns number

    • get pixelHeight(): number

      Returns number

    • get pixelWidth(): number

      Returns number

    • get resolution(): number

      Returns number

    • get size(): [number, number]

      Returns [number, number]

    • get sizeSource(): TextureSource

      The texture that drives size, resolution, and resize events. For standard targets this is colorAttachments[0].texture; for depth-only targets it is depthStencilAttachment.texture.

      Returns TextureSource

    • get stencil(): boolean

      Whether this target provides a stencil buffer — requested via options or implied by its attachment's format.

      Returns boolean

    • get width(): number

      Returns number

    Methods

    • Returns void

    • Parameters

      • width: number
      • height: number
      • resolution: number = ...
      • skipColorTexture: boolean = false

      Returns void