AdvancedOptions for creating a render target, or a WebGPU-flavored descriptor.
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.
OptionaldepthAn 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.
Optional AdvancedflipOpt-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.
Optionallabela label for debugging — shows up on the render pass in GPU debuggers (WebGPU)
Readonlyuidunique id for this render target
StaticdefaultThe default options for a render target
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.
Whether this target provides a depth buffer — requested via options or implied by its attachment's format.
The stencil and depth buffer will write to this texture in WebGPU.
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.
Whether this target provides a stencil buffer — requested via options or implied by its attachment's format.
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.