Use proper gamma correction mode in image::Atlas::grow

This commit is contained in:
Héctor Ramón Jiménez 2023-05-31 21:45:12 +02:00
parent f1b259a28f
commit c528f2129e
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -351,7 +351,11 @@ impl Atlas {
mip_level_count: 1,
sample_count: 1,
dimension: wgpu::TextureDimension::D2,
format: wgpu::TextureFormat::Rgba8UnormSrgb,
format: if color::GAMMA_CORRECTION {
wgpu::TextureFormat::Rgba8UnormSrgb
} else {
wgpu::TextureFormat::Rgba8Unorm
},
usage: wgpu::TextureUsages::COPY_DST
| wgpu::TextureUsages::COPY_SRC
| wgpu::TextureUsages::TEXTURE_BINDING,