diff --git a/examples/hello-world.rs b/examples/hello-world.rs index b414644..3c5c6fd 100644 --- a/examples/hello-world.rs +++ b/examples/hello-world.rs @@ -49,8 +49,7 @@ async fn run() { .await .unwrap(); let surface = unsafe { instance.create_surface(&window) }; - // TODO: handle srgb - let swapchain_format = TextureFormat::Bgra8Unorm; + let swapchain_format = TextureFormat::Bgra8UnormSrgb; let mut config = SurfaceConfiguration { usage: TextureUsages::RENDER_ATTACHMENT, format: swapchain_format, diff --git a/src/text_atlas.rs b/src/text_atlas.rs index 526ff17..777f6d9 100644 --- a/src/text_atlas.rs +++ b/src/text_atlas.rs @@ -45,7 +45,7 @@ impl InnerAtlas { dimension: TextureDimension::D2, format: match num_atlas_channels { 1 => TextureFormat::R8Unorm, - 4 => TextureFormat::Rgba8Unorm, + 4 => TextureFormat::Rgba8UnormSrgb, _ => panic!("unexpected number of channels"), }, usage: TextureUsages::TEXTURE_BINDING | TextureUsages::COPY_DST,