diff --git a/pipelined/bevy_render2/src/texture/image.rs b/pipelined/bevy_render2/src/texture/image.rs index 61416694727a16..11c98f1b2b3c41 100644 --- a/pipelined/bevy_render2/src/texture/image.rs +++ b/pipelined/bevy_render2/src/texture/image.rs @@ -25,15 +25,17 @@ pub struct Image { impl Default for Image { fn default() -> Self { + let format = wgpu::TextureFormat::Rgba8UnormSrgb; + let data = vec![0; format.pixel_size() as usize]; Image { - data: Default::default(), + data, texture_descriptor: wgpu::TextureDescriptor { size: wgpu::Extent3d { width: 1, height: 1, depth_or_array_layers: 1, }, - format: wgpu::TextureFormat::Rgba8UnormSrgb, + format, dimension: wgpu::TextureDimension::D2, label: None, mip_level_count: 1,