|
|
@ -161,9 +161,8 @@ The `limits` field describes the limit of certain types of resources that we can
|
|
|
|
// one will result in all the colors coming out darker. If you want to support non
|
|
|
|
// one will result in all the colors coming out darker. If you want to support non
|
|
|
|
// sRGB surfaces, you'll need to account for that when drawing to the frame.
|
|
|
|
// sRGB surfaces, you'll need to account for that when drawing to the frame.
|
|
|
|
let surface_format = surface_caps.formats.iter()
|
|
|
|
let surface_format = surface_caps.formats.iter()
|
|
|
|
|
|
|
|
.find(|f| f.is_srgb())
|
|
|
|
.copied()
|
|
|
|
.copied()
|
|
|
|
.filter(|f| f.is_srgb())
|
|
|
|
|
|
|
|
.next()
|
|
|
|
|
|
|
|
.unwrap_or(surface_caps.formats[0]);
|
|
|
|
.unwrap_or(surface_caps.formats[0]);
|
|
|
|
let config = wgpu::SurfaceConfiguration {
|
|
|
|
let config = wgpu::SurfaceConfiguration {
|
|
|
|
usage: wgpu::TextureUsages::RENDER_ATTACHMENT,
|
|
|
|
usage: wgpu::TextureUsages::RENDER_ATTACHMENT,
|
|
|
|