Interface CopyToTextureTaskConfig
lodLevel?: number;
name?: string;
ownsTargetTexture?: boolean;
resolveTexture?: RenderTarget;
sourceTexture: RenderTarget;
targetTexture?: RenderTarget;
viewport?: NormalizedViewport | null;
}
Index
Properties
Optionallod Level
View-relative source mip level. Default 0. A texture-backed wrapper exposes
one mip, so LOD clamps to zero and both paths read its selected physical mip.
Ordinary sources use this as their source mipLevel or textureSampleLevel LOD.
Optionalname
Optionalowns Target Texture
When true, this task owns targetTexture: it rebuilds the target on every frame-graph build (including
canvas resize) and disposes it with the task. Leave false for externally owned targets.
Optionalresolve Texture
Optional single-sample texture that receives a hardware MSAA-resolve of the task's MSAA color attachment at end-of-pass. Two modes:
-
Blit + resolve:
targetTextureis MSAA andresolveTextureis SS. The shader blit writes intotargetTextureand at end-of-pass the GPU resolvestargetTextureintoresolveTexture. -
Resolve-only:
targetTextureis omitted. The task runs a no-draw render pass withsourceTextureas the color attachment (so the source itself must be MSAA) andresolveTextureas its resolve target.viewportandlodLevelare ignored.sourceTextureandresolveTexturemust have matching dimensions.
In both modes, resolveTexture.format must match the MSAA
attachment's format and resolveTexture must be single-sample.
source Texture
Source render target. The engine swapchain render target is not supported because its GPU texture changes every frame.
Optionaltarget Texture
Target attachment that receives the blit. Required UNLESS resolveTexture
is set, in which case the task does a resolve-only operation and writes
directly into resolveTexture.
Optionalviewport
Viewport applied to the target before the blit. When undefined (default), the whole target is overwritten and the encoder-copy fast path becomes available. When set, the blit path is used.
Options used to create a copy-to-texture frame-graph task. Selects the source render target, the target or resolve target, and optional viewport / mip-level settings for blit and copy paths.