Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
gpui: Improve underline appearance (#17586)
ensi3ac201e448fd
diff --git a/crates/gpui/src/platform/blade/shaders.wgsl b/crates/gpui/src/platform/blade/shaders.wgslindex c3983c7acc6..6099cbd93ad 100644--- a/crates/gpui/src/platform/blade/shaders.wgsl+++ b/crates/gpui/src/platform/blade/shaders.wgsl@@ -488,8 +488,8 @@ fn fs_underline(input: UnderlineVarying) -> @location(0) vec4<f32> {let half_thickness = underline.thickness * 0.5;let st = (input.position.xy - underline.bounds.origin) / underline.bounds.size.y - vec2<f32>(0.0, 0.5);- let frequency = M_PI_F * 3.0 * underline.thickness / 8.0;- let amplitude = 1.0 / (2.0 * underline.thickness);+ let frequency = M_PI_F * 3.0 * underline.thickness / 3.0;+ let amplitude = 1.0 / (4.0 * underline.thickness);let sine = sin(st.x * frequency) * amplitude;let dSine = cos(st.x * frequency) * amplitude * frequency;let distance = (st.y - sine) / sqrt(1.0 + dSine * dSine);