summaryrefslogtreecommitdiffstats
path: root/wgpu/src/image
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-31 21:45:12 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-31 21:45:12 +0200
commitc528f2129e5ce3b30e313f731588082c49beb30b (patch)
tree1dc1c0e445d4f834e883d47dbacd4a90ae3342a6 /wgpu/src/image
parentf1b259a28fdb92ce62ceb6fcea9547b52ecc77d3 (diff)
downloadiced-c528f2129e5ce3b30e313f731588082c49beb30b.tar.gz
iced-c528f2129e5ce3b30e313f731588082c49beb30b.tar.bz2
iced-c528f2129e5ce3b30e313f731588082c49beb30b.zip
Use proper gamma correction mode in `image::Atlas::grow`
Diffstat (limited to 'wgpu/src/image')
-rw-r--r--wgpu/src/image/atlas.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/wgpu/src/image/atlas.rs b/wgpu/src/image/atlas.rs
index 28bc4943..e3de1290 100644
--- a/wgpu/src/image/atlas.rs
+++ b/wgpu/src/image/atlas.rs
@@ -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,