Fix window format to Bgra8Unorm (fixes unnecessary sRGB conversion)
This commit is contained in:
parent
0bf02ba93b
commit
d5e9e229dc
|
@ -65,15 +65,11 @@ impl Window {
|
|||
let surface = unsafe { instance.create_surface(&window) };
|
||||
let last_update = Instant::now();
|
||||
|
||||
let format = *surface
|
||||
.get_supported_formats(&adapter)
|
||||
.first()
|
||||
.ok_or(anyhow!("Could not find surface format for new window"))?;
|
||||
let size = window.inner_size();
|
||||
|
||||
let surface_config = wgpu::SurfaceConfiguration {
|
||||
usage: wgpu::TextureUsages::RENDER_ATTACHMENT,
|
||||
format,
|
||||
format: wgpu::TextureFormat::Bgra8Unorm,
|
||||
width: size.width,
|
||||
height: size.height,
|
||||
present_mode: wgpu::PresentMode::Fifo,
|
||||
|
|
|
@ -83,7 +83,7 @@ impl Renderer {
|
|||
module: &shader,
|
||||
entry_point: "fs_main",
|
||||
targets: &[Some(ColorTargetState {
|
||||
format: TextureFormat::Bgra8UnormSrgb,
|
||||
format: TextureFormat::Bgra8Unorm,
|
||||
blend: Some(BlendState::ALPHA_BLENDING),
|
||||
write_mask: ColorWrites::ALL,
|
||||
})],
|
||||
|
|
Loading…
Reference in New Issue