summaryrefslogtreecommitdiff
path: root/shaders/post/bloom.glsl
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 10:46:03 -0300
committerGabriel Schneider <[email protected]>2026-11-05 15:12:36 -0300
commit11204e1206f7f7ffeaa861c1a442a312e563d3ed (patch)
treef788736bf5b6a56694563b664b5db73bc54bff72 /shaders/post/bloom.glsl
parentc9b9dad8469f5d654c31d688d7e2d93da8325f39 (diff)
downloadpardes-11204e1206f7f7ffeaa861c1a442a312e563d3ed.tar.gz
pardes-11204e1206f7f7ffeaa861c1a442a312e563d3ed.zip
effects out, the post chain: Crt, Bloom, Vignette, Grain, Shader and ShaderAnimation go with src/gui/Post.zig, src/ShaderBuild.zig (the run-time glslc spawn and its watched files), shaders/post/, post.vert, bloom-down and bloom-up and their prebuilt .spv, the window's scene texture and its post-chain-only redraw (level A), the disable_scene_effects tape site and Pardes.disableSceneEffects; EffectCode goes with src/effect_sources.zig, which only embedded the effects' sources (/virtual keeps src/); the corner-click test keeps its point without a chain, the window monkey loses its Bloom axis; macOS's post-processor (ScenePostprocessor.swift, crt.ci.metal, pardes_scene) is a change of its own
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'shaders/post/bloom.glsl')
-rw-r--r--shaders/post/bloom.glsl40
1 files changed, 0 insertions, 40 deletions
diff --git a/shaders/post/bloom.glsl b/shaders/post/bloom.glsl
deleted file mode 100644
index d54a0aac..00000000
--- a/shaders/post/bloom.glsl
+++ /dev/null
@@ -1,40 +0,0 @@
-// Bloom: the brightest ink glows, a little. The glow itself is made by the
-// shell at half resolution and below (bloom-down, bloom-up: a dual Kawase
-// filter over a bright pass, in linear light) and arrives here in
-// pardesBloom; this pass adds it to the frame. Only true highlights pass
-// the threshold, and the strength stays in ยง8.2's budget (at most 5%) and
-// under pardesCap, so no text or selection loses contrast below its own or
-// 4.5. Tags, grips, notices and the cursor are left alone (pardesSpare).
-// It is a Shadertoy file: pardes puts its prefix before it.
-
-layout(set = 2, binding = 1) uniform sampler2D pardesBloom;
-
-float strength() { return min(pardesByLevel(0.02, 0.035, 0.05), pardesCap); }
-
-vec3 toLinear(vec3 c) {
- return mix(pow((c + 0.055) / 1.055, vec3(2.4)), c / 12.92, lessThanEqual(c, vec3(0.04045)));
-}
-
-vec3 toSrgb(vec3 c) {
- c = max(c, vec3(0.0));
- return mix(1.055 * pow(c, vec3(1.0 / 2.4)) - 0.055, c * 12.92, lessThanEqual(c, vec3(0.0031308)));
-}
-
-float ign(vec2 p) {
- return fract(52.9829189 * fract(dot(p, vec2(0.06711056, 0.00583715))));
-}
-
-void mainImage(out vec4 fragColor, in vec2 fragCoord) {
- vec2 uv = fragCoord / iResolution.xy;
- vec4 frame = texture(iChannel0, uv);
- if (pardesSpared(fragCoord)) {
- fragColor = frame;
- return;
- }
- vec3 glow = texture(pardesBloom, uv).rgb;
- vec3 col = toLinear(frame.rgb) + glow * strength();
- vec3 srgb = toSrgb(col);
- // Dithered: a glow's long falloff never bands.
- srgb += (ign(fragCoord) - 0.5) / 255.0 * step(1e-4, dot(glow, vec3(1.0)));
- fragColor = vec4(clamp(srgb, 0.0, 1.0), frame.a);
-}