Skip to main content

create_color_target

Function create_color_target 

Source
pub fn create_color_target(
    device: &Device,
    format: TextureFormat,
    width: u32,
    height: u32,
) -> Texture
Expand description

Allocate a persistent color texture for a render target.

It is created with RENDER_ATTACHMENT, COPY_SRC so the frame can be read back, and TEXTURE_BINDING so a later pass can sample it. A frame that draws into it pairs it with the depth and multisample textures create_depth_target and create_msaa_target allocate.