blade: Switch to linear color space (#11534)
Release Notes: - N/A ## What Addresses a long-standing issue of doing the blending operations in sRGB space. Currently, the input HSL colors are provided in sRGB space and converted to linear in the vertex shader. Conversion back to sRGB, which is required on most platforms today, happens at the very end of the pipeline when writing into sRGB render target. Note-1: in the future we may consider doing HSL -> sRGB -> Linear transform on CPU before feeding into shaders. However, I don't expect any significant difference here given that we are likely bound by fill rate and pixel shaders, anyway. Note-2: the graphics stack is programmed to detect if the platform supports presenting in linear color space and avoids converting to sRGB at the end in this case. However, on my Z13 laptop this isn't supported by the RADV driver. Closes #7684 Closes #11462 @jansol please confirm if you can! ## Comparison Screenshot of the Glazier theme before the change:  Same theme after the change: 
This commit is contained in:
parent
d103903229
commit
a89dc8c42e
5 changed files with 23 additions and 12 deletions
|
@ -360,9 +360,7 @@ impl BladeRenderer {
|
|||
size: config.size,
|
||||
usage: gpu::TextureUsage::TARGET,
|
||||
display_sync: gpu::DisplaySync::Recent,
|
||||
//Note: this matches the original logic of the Metal backend,
|
||||
// but ultimaterly we need to switch to `Linear`.
|
||||
color_space: gpu::ColorSpace::Srgb,
|
||||
color_space: gpu::ColorSpace::Linear,
|
||||
allow_exclusive_full_screen: false,
|
||||
transparent: config.transparent,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue