Skip to main content

create_render_texture

Function create_render_texture 

Source
pub fn create_render_texture(
    device: &Device,
    width: u32,
    height: u32,
    format: TextureFormat,
    label: Option<&str>,
) -> Texture
Expand description

Create an RGBA texture with render target usage.

Similar to create_rgba_texture but also includes RENDER_ATTACHMENT usage for use as a render target (e.g., for intermediate textures in shader pipelines).

ยงArguments

  • device - The wgpu device
  • width - Texture width in pixels
  • height - Texture height in pixels
  • format - Texture format (usually matches surface format)
  • label - Optional debug label