Interface RenderTargetDescriptor
interface RenderTargetDescriptor {
depthClearValue?: number;
depthCompare?: GPUCompareFunction;
dFormat?: GPUTextureFormat;
format?: GPUTextureFormat;
lbl?: string;
samples: number;
size:
| SurfaceContext
| RenderTargetSurfaceSize
| { height: number; width: number };
}
depthClearValue?: number;
depthCompare?: GPUCompareFunction;
dFormat?: GPUTextureFormat;
format?: GPUTextureFormat;
lbl?: string;
samples: number;
size:
| SurfaceContext
| RenderTargetSurfaceSize
| { height: number; width: number };
}
Properties
Optionaldepth Clear Value
depthClearValue?: number
Depth clear value. Defaults to reverse-Z far depth 0. Standard-Z targets normally use 1.
Optionaldepth Compare
depthCompare?: GPUCompareFunction
Depth compare for pipelines targeting this RT. Defaults to reverse-Z "greater-equal".
Optionald Format
dFormat?: GPUTextureFormat
Depth/stencil attachment format (e.g. "depth24plus-stencil8"). Omit for a color-only target (e.g. the swapchain).
Optionalformat
format?: GPUTextureFormat
Color attachment texture format (e.g. "bgra8unorm", "rgba16float"). Omit for a depth-only target.
Optionallbl
lbl?: string
Debug label applied to the allocated GPU color/depth textures.
samples
samples: number
MSAA sample count: 1 = single-sample (no multisampling), 4 = 4x MSAA.
size
A SurfaceContext for full surface dimensions, { surface, scale } for
scaled live dimensions, or explicit { width, height } device pixels.
Surface-backed sizes are re-resolved on every buildRenderTarget.
Describes a render target — what attachments to create, not the GPU objects themselves. GPU textures are allocated later by
buildRenderTarget.