===============================================================================
  ZAZA SHADERS
  by WetCardboardMC
  Progressive impairment and overload, on a real absorption curve
===============================================================================

A visual effects pack. It simulates what being high looks like from the
inside, from the pleasant end all the way through to greening out, with a
dose model that behaves like the real pharmacokinetics rather than a timer.


INSTALLING
----------
Drop the .zip into .minecraft/shaderpacks and select it in
Options > Video Settings > Shaders. Requires Iris or OptiFine.

It ships ready to go: press F1 to take a hit.


THE SHORT VERSION
-----------------
  F1                   take a hit (10 second cooldown)
  ~3 seconds later     you exhale, and smoke fills the screen
  ~10 seconds later    it actually starts doing something
  ~20 minutes later    that hit peaks
  90 minute half-life  so it takes hours to fully wear off

  Level meter          off by default. Turn it on in the settings if you
                       want to watch the curve work.

One hit is a light, relaxed high. Two is a comfortable moderate one. Four is
clearly noticeable but still manageable. Eight and the game starts glitching.
Twenty and you are greening out.


MODE
----
  Yart (F1)             Default. Press F1 to take a hit and let the
                        simulation run. The Dose slider is ignored.
  Slow Release (Dose Slider)  F1 is ignored and you sit at whatever the Dose
                        slider says. This is the one to use for testing,
                        screenshots, or just holding a chosen level.

If you were wondering why the Dose slider did nothing before - it only
applies in Slow Release mode, and there was no way to select it. That is what this
setting is for.

WHY F1
------
A shader pack cannot read a custom keybind or write to chat - shaders get no
keyboard input at all and only produce pixels. F1 is used because the Toggle
HUD key is the one dedicated key press every shader host exposes to shaders.
Both edges of the toggle count, so one press is one hit rather than needing a
press and a release. It does also hide your HUD, which is the price of not
needing a companion mod.


SETTINGS
--------
Shader options > Zaza

  Mode                Yart (F1), or Slow Release (Strength slider)
  Yart Strength       Weak, Mild (default), Moderate or Strong
  Dose                fixed level, used in Dose Slider mode
  Blinker Mode        off by default. See below
  Level Meter         the bar in the bottom left. Off by default
  Overall Intensity   scales everything without moving the dose curve

  Session & Smoke     cooldown, onset delay, absorption half-life,
                      elimination half-life, exhale and blinker timing
  Visuals             colour, soft focus, delay, trails, drift, tunnel
  Glitch & Frames     judder, holds and skips, repeating patterns, warp
  Greening Out        the bad end


YART STRENGTH
-------------
Four presets. Mild is the default and deliberately gentle - you have to
actually commit to a session to get anywhere.

    preset      4 pulls                 16 pulls
    --------    --------------------    --------------
    Weak        moderate                glitching
    Mild        noticeable, manageable  overload
    Moderate    glitching               overload
    Strong      overload                overload

On Mild, a session looks like this:

    pulls   what it looks like
    -----   ---------------------------------------------
      1     light and relaxed. Colours lift and deepen, the camera
            settles into a slow drift
      2     balanced and moderate. Real delay, softer edges
      4     clearly noticeable but still manageable
      8     glitching. Judder, holds, repeating patterns
     12     heavy, on the edge
     20     overload
     40     deep overload
     80     saturated. It stops getting worse, it just stays bad

Step up a preset to find the deep end faster. Strong does in four pulls
roughly what Mild does in sixteen.

BLINKER MODE
------------
Off by default. Turning it on:

  - doubles the dose of every hit, so you reach the bad end twice as fast
  - delays the exhale to 7 seconds, matching a longer draw
  - adds a small green indicator light that starts blinking 5 seconds after
    you pull and blinks for 2 seconds

All four timings are adjustable on the Session & Smoke page.


HOW THE DOSE SIMULATION WORKS
-----------------------------
Four stages, which is what makes a hit behave like a hit rather than like a
timer:

    hit -> T1 -> T2 -> T3 -> A -> C
            \_______  _______/    \_ effect site, cleared at ke
                    \/          \_ absorption, transfers at ka
                transit chain

The three transit compartments model the absorption LAG. A hit dropped into
the front of the chain has to walk along it before any of it reaches the
effect site, so nothing happens at all for the first several seconds. Mean
transit time is the Onset Delay setting, default 10 seconds.

This is also what makes hits stack properly. Every hit drops its own parcel
into the front of the chain and each one walks it independently, so a second
hit taken while the first is still coming up gives you two overlapping
come-ups rather than one merged lump.

A single hit, second by second:

    t =  2 s    nothing
    t =  8 s     1% of that hit
    t = 10 s     2%      <- it starts
    t = 20 s    10%
    t = 45 s    35%
    t = 60 s    49%
    t = 20 min  peak

Absorption Half-Life (default 5 min) shapes the come-up: half the remaining
buffer crosses to the effect site every interval. Half-Life (default 90 min)
governs the way down. Both are in real-world minutes and both are driven by
real frame time, so a 12 hit session looks like this:

    t =  20 min    30 mg    peak
    t =  60 min    24 mg
    t =  90 min    19 mg
    t = 150 min    12 mg
    t = 210 min     8 mg

A NOTE ON PRECISION
-------------------
The dose state lives in two RGBA32F buffers, and the 32 is not optional. In
16 bit half float, a single frame's decay at 200fps is smaller than one unit
of precision, so the level would never decay at all - and worse, the elapsed
time counter would silently stop advancing once it passed about 16 seconds,
which breaks the cooldown, the exhale timing and the blinker light together.
If you ever fork this, do not drop those buffers to 16F.

THE EFFECTS, IN THE ORDER THEY ARRIVE
-------------------------------------
Every effect has its own onset threshold, so raising the dose recruits new
symptoms rather than just amplifying one.

  Colour           first to arrive, and the pleasant part. Everything warms
                   up, colour gets noticeably deeper and more saturated, and
                   bright lights bloom. Present from a single hit. This
                   reverses on its own later.

  Drift            a slow relaxed wander with a gentle breathing scale,
                   arriving right behind the colour. Deliberately not violent
                   - being high is not being drunk, the world drifts and lags
                   rather than lurching.

  Visual Delay     the image arrives late, so the world lags behind your own
                   movement. Framerate independent.

  Soft Focus       nothing quite crisps up. Weakest at the centre of your
                   view, worst at the edges, which is the order acuity
                   actually degrades in.

  Trails           bright things smear along their path.

  Frame Judder     the displayed image only refreshes on a virtual frame
                   boundary, so at high doses you are watching a 7fps
                   slideshow of a game that is still running at full speed.

  Repeating        colour quantises into visible bands and a mirrored tiling
  Patterns         of the scene ghosts over the top, so shapes start
                   repeating where they should not.

  Holds & Skips    the image stops updating entirely for up to about a
                   second, then snaps forward to the present. That snap is
                   the lurch of having lost a moment. Higher up, the hold
                   breaks into sub-pulses and stutters in place first.

  Tunnel Vision    the periphery narrows, with a heartbeat pulse on it.

  Greening Out     colour drains and slides toward a sick green-grey,
                   contrast collapses, the field closes in, brightness pulses
                   with your heartbeat, and waves of near-blackout come and
                   go.

  Psychedelic      mild wave distortion, only at the very top. Kept subtle
  Warp             on purpose.


IMPORTANT: THE LAG IS FAKE
--------------------------
None of the stutter, judder, holding or skipping touches your actual
framerate. The game keeps running at full speed and your input stays exactly
as responsive as it was - it is the IMAGE that stutters and holds. That is
precisely what makes it feel like the machine is dying when it is not, and it
means you can still play (badly) through the worst of it.

The tunnel vision is deliberately capped short of a pinhole for the same
reason. A green-out should be punishing, not a black screen.


PERFORMANCE
-----------
Cost scales with dose, because effects below their onset threshold are
branched out entirely. At zero the cost is zero and the three temporal
buffers are never written. Soft Focus is the most expensive layer - drop
Quality to Fast first if the framerate suffers.


A NOTE ON FLICKER
-----------------
The frame holds alternate between two nearly identical images rather than
flashing, and the blinker light is a small soft dot at 3Hz. There is no
full-screen strobing anywhere in the pack. If you are photosensitive, the
settings worth turning down first are Holds & Skips and Frame Judder.


KNOWN INTERACTIONS
------------------
- Works in all three dimensions.
- Leave TAA on if you can. It runs before this and keeps the drifting image
  from crawling with aliasing.
- Motion Blur and Depth of Field in the Camera page stack on top of this.
- The level meter is the only feedback you get, since a shader cannot post to
  chat. Turn it off on the Zaza page if you would rather fly blind.


CREDITS
-------
Zaza Shaders by WetCardboardMC.
Built on BSL Shaders v10.1.3 by Capt Tatsu - https://capttatsu.com
Please respect the original pack's terms when sharing this edit.
