From 2bd4066a932ec8fc401e4b85e9f8441b17df3cfb Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 11:34:44 -0300 Subject: effects out, Lift and InactiveDim: the core's per-pane lift springs (Pardes.lifts, lift_serials, Region.lift, Chrome.lift_style) and the unfocused panes' recede (draw.zig's dim, its contrast memo and linear blend) go with the words, their settings and tests; the window loses its soft shadows (addSoft, the lift and rim casting, the shadow a sliding pane cast, the contrast ceilings, decor.frag's Gaussian path) and Chrome.sel_fg and sel_bg, which only the ceilings read; a pane closed mid-lift left its spring unsettled and continuous() true for ever, so a window could never go idle (monkey-gui failed `never settled` in the Lift combinations, and passes now); GUI golden 18-mid-transition changes, its sliding pane casting no shadow (the scene leaves with the transitions); root_ctl's out-of-range case is SearchRows', settings' GUI-only case GripWidth's, the window monkey loses its Lift axis Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- shaders/decor.frag.glsl | 43 +------------------------------------------ 1 file changed, 1 insertion(+), 42 deletions(-) (limited to 'shaders') diff --git a/shaders/decor.frag.glsl b/shaders/decor.frag.glsl index bb1ef0d6..72083ffe 100644 --- a/shaders/decor.frag.glsl +++ b/shaders/decor.frag.glsl @@ -9,14 +9,6 @@ // result is the overlay pipeline's exactly. // // Checker (flag 0x08000000): two colours in squares, or in stripes, see main. -// -// Soft (flag 0x10000000): a rectangle's shadow, rim or glow blurred by a Gaussian, -// in closed form (the product of two erf edges), on one quad grown by 3 -// sigma: no blur pass. Everything is in the quad's own 0..1 space, so a -// track's transform carries it: sigma per axis in the uv, the caster's -// offset from its shadow in fg.gb, the strength in fg.r. The caster's own -// rectangle is left alone (it is drawn already), and the alpha is pre-warped -// so black darkens in linear light, then dithered so it never bands. layout(std140, set = 3, binding = 0) uniform UiUniforms { float background_opacity; @@ -31,24 +23,6 @@ layout(location = 5) flat in vec4 v_clip; layout(location = 0) out vec4 o_col; -// erf to about 4e-4 (Winitzki's approximation): smooth, cheap, odd. -float erfApprox(float x) { - float x2 = x * x; - const float a = 0.147; - float e = sqrt(1.0 - exp(-x2 * (1.2732395 + a * x2) / (1.0 + a * x2))); - return x < 0.0 ? -e : e; -} - -// How much of [lo, hi] a Gaussian of sigma s centred at x covers. -float edge(float x, float lo, float hi, float s) { - float k = 0.70710678 / s; - return 0.5 * (erfApprox((x - lo) * k) - erfApprox((x - hi) * k)); -} - -float ign(vec2 p) { - return fract(52.9829189 * fract(dot(p, vec2(0.06711056, 0.00583715)))); -} - void main() { if (v_clip.z >= v_clip.x && (gl_FragCoord.x < v_clip.x || gl_FragCoord.x >= v_clip.z || gl_FragCoord.y < v_clip.y || gl_FragCoord.y >= v_clip.w)) discard; @@ -64,20 +38,5 @@ void main() { o_col = vec4(((k & 1) == 0 ? v_bg : v_fg) * opacity, 1.0); return; } - if ((v_effect.x & 0x10000000u) == 0u) { - o_col = vec4(v_bg * opacity, v_fg.r); - return; - } - vec2 s = v_uv; - vec2 m = 3.0 * s; - vec2 p = v_cell_uv; - vec2 caster0 = m - v_fg.gb; - vec2 caster1 = 1.0 - m - v_fg.gb; - if (all(greaterThanEqual(p, caster0)) && all(lessThan(p, caster1))) discard; - float a = v_fg.r * edge(p.x, m.x, 1.0 - m.x, s.x) * edge(p.y, m.y, 1.0 - m.y, s.y); - // Black darkens in linear light; a light colour (a rim, a glow) is laid - // on as it is, within ยง8.2's 25%. - if (all(equal(v_bg, vec3(0.0)))) a = 1.0 - pow(max(1.0 - a, 0.0), 1.0 / 2.2); - a = clamp(a + (ign(gl_FragCoord.xy) - 0.5) / 255.0, 0.0, 1.0); - o_col = vec4(v_bg * opacity, a); + o_col = vec4(v_bg * opacity, v_fg.r); } -- cgit v1.3