Avoid gamma correction when web-colors is enabled for images
This commit is contained in:
parent
faa7627ea4
commit
f1b259a28f
1 changed files with 6 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ use allocator::Allocator;
|
||||||
pub const SIZE: u32 = 2048;
|
pub const SIZE: u32 = 2048;
|
||||||
|
|
||||||
use crate::core::Size;
|
use crate::core::Size;
|
||||||
|
use crate::graphics::color;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Atlas {
|
pub struct Atlas {
|
||||||
|
|
@ -35,7 +36,11 @@ impl Atlas {
|
||||||
mip_level_count: 1,
|
mip_level_count: 1,
|
||||||
sample_count: 1,
|
sample_count: 1,
|
||||||
dimension: wgpu::TextureDimension::D2,
|
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
|
usage: wgpu::TextureUsages::COPY_DST
|
||||||
| wgpu::TextureUsages::COPY_SRC
|
| wgpu::TextureUsages::COPY_SRC
|
||||||
| wgpu::TextureUsages::TEXTURE_BINDING,
|
| wgpu::TextureUsages::TEXTURE_BINDING,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue