Function createTextureRenderTarget
-
createTextureRenderTarget(
_engine: EngineContext,
texture: Texture2D,
options?: TextureRenderTargetOptions,
): RenderTargetParameters
- _engine: EngineContext
- texture: Texture2D
Optionaloptions: TextureRenderTargetOptions
Returns RenderTarget
Wrap one layer and mip level of an existing renderable texture as a
RenderTarget, so a frame-graph task (a render-draw task, an effect task, a clear) can draw into it: a tile slot of a texture array, a mip of a pyramid, or a plain render texture of any size and format.The target holds one reference on the texture (released by
disposeRenderTarget) and owns no attachment: disposing it never destroys the texture another owner still uses. One target per subresource is created once and reused; switching a task between targets of the same format allocates nothing.