diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 11:50:43 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 15:17:05 -0300 |
| commit | ecdb0996147f319a4427273bf276e1fc5bf89156 (patch) | |
| tree | 0b1be457ce4b8ce99db4acd713ff2620cde2d015 /shaders/ui.frag.glsl | |
| parent | 2bd4066a932ec8fc401e4b85e9f8441b17df3cfb (diff) | |
| download | pardes-ecdb0996147f319a4427273bf276e1fc5bf89156.tar.gz pardes-ecdb0996147f319a4427273bf276e1fc5bf89156.zip | |
effects out, the panel transitions: the eleven Panel words in both tracks go, with the core's Presentation (tracks, the frozen previous grid, cell diffs, the acknowledged-geometry pending guard, and the pointer's mapping through a moving pane, so a pointer's cell is the cell it is over), draw.zig's core-composed character effects, animation.zig's transition half, the Surface's tracks and previous grid, the tty's compositor (src/tui/panel_compositor.zig: the glide's rows move into tui.zig) and the window's track groups, frozen old layers, last-frame image snapshot, transition instance fields and shader paths (ui.vert, ui.frag's crossfade, image.vert and image.frag, the transition-<n>.ppm capture); acknowledgePanelPresentation becomes `presented`, which a frontend calls after drawing a frame (a drag's moving end and a look-hover follow what is under the pointer now), and its tape site with it; the pointer tape site goes; GUI golden 18-mid-transition goes, ttyhelp's golden loses the `SPC a` rows (its wait is on `SPC Y` now), the window monkey loses PanelSlide, and the settings behaviour test's floor of on/off words is ten
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'shaders/ui.frag.glsl')
| -rw-r--r-- | shaders/ui.frag.glsl | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/shaders/ui.frag.glsl b/shaders/ui.frag.glsl index 51ec5b8c..68bfe70b 100644 --- a/shaders/ui.frag.glsl +++ b/shaders/ui.frag.glsl @@ -22,7 +22,7 @@ layout(location = 0) in vec2 v_uv; layout(location = 1) in vec3 v_fg; layout(location = 2) in vec3 v_bg; layout(location = 3) in vec2 v_cell_uv; -layout(location = 4) flat in uvec4 v_effect; +layout(location = 4) flat in uvec2 v_effect; layout(location = 5) flat in vec4 v_clip; layout(location = 0) out vec4 o_col; @@ -31,16 +31,13 @@ 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; float a = texture(u_atlas, v_uv).r; - bool oldLayer = (v_effect.x & 0x80000000u) != 0u; // A block cursor is foreground chrome even though its fill occupies the // cell background: keep it visible at WindowOpacity 0. Otherwise a clear // theme ground has no coverage and ordinary backgrounds use the setting. - // The three high flags are shared with ui.vert.glsl and src/gui/gui.zig. + // The high flags are shared with ui.vert.glsl and src/gui/gui.zig. float bgA = (v_effect.x & 0x20000000u) != 0u ? 1.0 : (v_effect.x & 0x40000000u) != 0u ? 0.0 : clamp(u_ui.background_opacity, 0.0, 1.0); - uint effect = v_effect.x & 0x07ffffffu; - float progress = clamp(uintBitsToFloat(v_effect.y), 0.0, 1.0); // Ink over ground, both premultiplied: v_fg*a + (v_bg*bgA)*(1-a), which is // mix() with the ground already premultiplied. At bgA = 1 that is exactly @@ -50,9 +47,9 @@ void main() { // dot every period pixels, fixed to the window, under the text. if ((v_effect.x & 0x10000000u) != 0u) { float period = u_ui.decor_dot_geom.x; - // v_effect.z: how far its pane's text has moved the dots (G13's + // v_effect.y: how far its pane's text has moved the dots (G13's // parallax), in pixels, as a float's bits (0 without). - vec2 at = gl_FragCoord.xy - vec2(0.0, uintBitsToFloat(v_effect.z)); + vec2 at = gl_FragCoord.xy - vec2(0.0, uintBitsToFloat(v_effect.y)); vec2 d = mod(at, period) - 0.5 * period; float dot_a = 1.0 - smoothstep(u_ui.decor_dot_geom.y, u_ui.decor_dot_geom.z, length(d)); ground = mix(ground, u_ui.decor_dots.rgb, u_ui.decor_dots.a * dot_a); @@ -72,21 +69,6 @@ void main() { } vec4 cell = vec4(mix(under.rgb, v_fg, a), mix(under.a, 1.0, a)); - // 3 = dissolve, a crossfade (G7): a changed cell's new form is drawn - // first, whole, and its frozen old one over it at 1 - progress, - // premultiplied (the frame's cells blend over, pipeline_over), so the - // old fades out as the new comes in; at the ends, exactly one of them. - // The tty keeps its per-cell swap (panel_animation.dissolveRevealed). - if (effect == 3u) { - if (!oldLayer) { - o_col = cell; - return; - } - if (progress >= 1.0) discard; - o_col = cell * (1.0 - progress); - return; - } - // FreeType's hinted grayscale bitmap is already the intended coverage. // Preserve it exactly; weight-changing gamma hacks blur small stems. o_col = cell; |
