Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
gpui_windows: Fix reversed linear/sRGB transfer functions in shader (#57543)
Minh Vub9419ae72814
diff --git a/crates/gpui_windows/src/shaders.hlsl b/crates/gpui_windows/src/shaders.hlslindex d20cb317dbf..ba89c687335 100644--- a/crates/gpui_windows/src/shaders.hlsl+++ b/crates/gpui_windows/src/shaders.hlsl@@ -127,12 +127,12 @@ float4 distance_from_clip_rect_transformed(float2 unit_vertex, Bounds bounds, Bo// Convert linear RGB to sRGBfloat3 linear_to_srgb(float3 color) {- return pow(color, float3(2.2, 2.2, 2.2));+ return pow(color, float3(1.0 / 2.2, 1.0 / 2.2, 1.0 / 2.2));}// Convert sRGB to linear RGBfloat3 srgb_to_linear(float3 color) {- return pow(color, float3(1.0 / 2.2, 1.0 / 2.2, 1.0 / 2.2));+ return pow(color, float3(2.2, 2.2, 2.2));}/// Hsla to linear RGBA conversion.