summaryrefslogtreecommitdiff
path: root/shaders/image.frag.glsl
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 11:50:43 -0300
committerGabriel Schneider <[email protected]>2026-11-05 15:17:05 -0300
commitecdb0996147f319a4427273bf276e1fc5bf89156 (patch)
tree0b1be457ce4b8ce99db4acd713ff2620cde2d015 /shaders/image.frag.glsl
parent2bd4066a932ec8fc401e4b85e9f8441b17df3cfb (diff)
downloadpardes-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/image.frag.glsl')
-rw-r--r--shaders/image.frag.glsl28
1 files changed, 0 insertions, 28 deletions
diff --git a/shaders/image.frag.glsl b/shaders/image.frag.glsl
index 0cc1b2ee..38a95da6 100644
--- a/shaders/image.frag.glsl
+++ b/shaders/image.frag.glsl
@@ -6,40 +6,12 @@ layout(std140, set = 3, binding = 0) uniform UiUniforms {
} u_ui;
layout(location = 0) in vec2 v_uv;
-layout(location = 1) in vec2 v_panel_uv;
-layout(location = 2) flat in uvec4 v_effect;
layout(location = 0) out vec4 o_col;
-float cellNoise(uint serial, uint col, uint row) {
- uint x = serial ^ (col * 0x9e3779b9u) ^ (row * 0x85ebca6bu);
- x ^= x >> 16;
- x *= 0x7feb352du;
- x ^= x >> 15;
- x *= 0x846ca68bu;
- x ^= x >> 16;
- return float(x & 0xffffu) / 65535.0;
-}
-
void main() {
vec4 source = texture(u_image, v_uv);
// Keep source coverage for destination subtraction; the pipeline scales
// source alpha by the same opacity through its alpha blend constant.
source.rgb *= clamp(u_ui.background_opacity, 0.0, 1.0);
- uint effect = v_effect.x & 0x7fffffffu;
- bool oldLayer = (v_effect.x & 0x80000000u) != 0u;
- float progress = clamp(uintBitsToFloat(v_effect.y), 0.0, 1.0);
- uvec2 dimensions = max(
- uvec2(v_effect.w & 0xffffu, v_effect.w >> 16),
- uvec2(1u));
- uvec2 cellCoord = min(
- uvec2(floor(max(v_panel_uv, vec2(0.0)) * vec2(dimensions))),
- dimensions - 1u);
- float noise = cellNoise(v_effect.z, cellCoord.x, cellCoord.y);
- if (effect == 3u) {
- bool reveal = progress >= 1.0 || (progress > 0.0 && noise < progress);
- if (oldLayer == reveal) discard;
- o_col = source;
- return;
- }
o_col = source;
}