diff options
| -rw-r--r-- | src/bin/tsv_view.rs | 4 | ||||
| -rw-r--r-- | src/gpu.rs | 10 | ||||
| -rw-r--r-- | src/uniform.rs | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/bin/tsv_view.rs b/src/bin/tsv_view.rs index 885a8c4..13cb06d 100644 --- a/src/bin/tsv_view.rs +++ b/src/bin/tsv_view.rs @@ -72,7 +72,7 @@ impl ApplicationHandler for App { let surface_format = surface_caps .formats .iter() - .find(|f| f.is_srgb()) + .find(|f| !f.is_srgb()) .copied() .unwrap_or(surface_caps.formats[0]); @@ -91,7 +91,7 @@ impl ApplicationHandler for App { mip_level_count: 1, sample_count: 1, dimension: wgpu::TextureDimension::D2, - format: wgpu::TextureFormat::Rgba8UnormSrgb, + format: wgpu::TextureFormat::Rgba8Unorm, usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_DST, view_formats: &[], }); @@ -129,14 +129,14 @@ pub const TSV_FORMAT: ImgFormat = ImgFormat::R8G8B8A8; /// Convert a TSV ImgFormat to a wgpu TextureFormat. pub fn img_format_to_wgpu(fmt: ImgFormat) -> wgpu::TextureFormat { match fmt { - ImgFormat::R8G8B8A8 => wgpu::TextureFormat::Rgba8UnormSrgb, - ImgFormat::R8G8B8 => wgpu::TextureFormat::Rgba8UnormSrgb, - ImgFormat::B8G8R8A8 => wgpu::TextureFormat::Bgra8UnormSrgb, - ImgFormat::B8G8R8 => wgpu::TextureFormat::Bgra8UnormSrgb, + ImgFormat::R8G8B8A8 => wgpu::TextureFormat::Rgba8Unorm, + ImgFormat::R8G8B8 => wgpu::TextureFormat::Rgba8Unorm, + ImgFormat::B8G8R8A8 => wgpu::TextureFormat::Bgra8Unorm, + ImgFormat::B8G8R8 => wgpu::TextureFormat::Bgra8Unorm, ImgFormat::BC1_RGBA => wgpu::TextureFormat::Bc1RgbaUnorm, ImgFormat::BC3_RGBA => wgpu::TextureFormat::Bc3RgbaUnorm, ImgFormat::BC7_RGBA => wgpu::TextureFormat::Bc7RgbaUnorm, - ImgFormat::Undefined => wgpu::TextureFormat::Rgba8UnormSrgb, + ImgFormat::Undefined => wgpu::TextureFormat::Rgba8Unorm, } } diff --git a/src/uniform.rs b/src/uniform.rs index a428102..c8f55c2 100644 --- a/src/uniform.rs +++ b/src/uniform.rs @@ -412,7 +412,7 @@ pub struct TextureResource { impl TextureResource { pub fn new(device: &wgpu::Device, id: String, tsv_name: String) -> Self { - let format = wgpu::TextureFormat::Rgba8UnormSrgb; + let format = wgpu::TextureFormat::Rgba8Unorm; let view_dimension = wgpu::TextureViewDimension::D2; let dimension = view_dimension_to_texture_dimension(view_dimension); let (texture, view) = @@ -1140,7 +1140,7 @@ fn create_placeholder_texture( slot: &TextureBindingSlot, ) -> (wgpu::Texture, wgpu::TextureView) { let format = match slot.sample_type { - wgpu::TextureSampleType::Float { .. } => wgpu::TextureFormat::Rgba8UnormSrgb, + wgpu::TextureSampleType::Float { .. } => wgpu::TextureFormat::Rgba8Unorm, wgpu::TextureSampleType::Sint => wgpu::TextureFormat::Rgba8Sint, wgpu::TextureSampleType::Uint => wgpu::TextureFormat::Rgba8Uint, wgpu::TextureSampleType::Depth => wgpu::TextureFormat::Depth32Float, |
