===============================================================================
  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: REPLAY LOOPS
------------
The main event. What people describe is not a slow framerate - it is losing
the thread of what they were doing, catching themselves repeating a moment,
and realising time has slipped. Melges and colleagues at Stanford named this
temporal disintegration: a disorganisation of sequential thought that follows
from impaired immediate memory. Alongside it sit dose-dependent time
OVERESTIMATION, where a moment feels longer than it was, and plain memory
gaps. Together those three are exactly a loop.

How it works:

  Eighteen real frames are kept in a ring, spanning about ten seconds of
  play, and the camera angle each one was taken at is stored with it.

  Playback does not just crossfade between frames - that ghosts badly
  whenever the camera moved, and was what made the old loops feel glitchy.
  Both neighbouring frames are first REPROJECTED to a smoothly interpolated
  camera angle, then blended. Turning your head produces no parallax, so this
  is mathematically exact, and the camera glides through the replay at full
  framerate even though frames were only captured every half second. In
  testing it was 34 times more accurate than a straight crossfade.

  Every loop starts and ends exactly where you are looking right now. Entry
  slews smoothly from your current angle to the past one rather than
  retracing every turn you made, and the replay arrives back at the present
  as it fades out. There is no point where the picture cuts.

  Replays run slower than real time, which is the overestimation finding made
  literal.

How it scales:

    level    reaches back   replay speed   coverage   time looping
    -----    ------------   ------------   --------   ------------
    5 mg     -              -              -          none
    10 mg    2.5 s          81%            37%        4%
    15 mg    4.9 s          69%            60%        9%
    20 mg    6.6 s          63%            74%        15%
    30 mg    8.6 s          57%            90%        21%
    50 mg +  9.4 s          55%            95%        24%

So early on a loop is a faint echo laid over the present that you might not
even consciously notice. Near the top it takes over and pulls you nearly ten
seconds back. Loop Reach on the Loops & Time page stretches that further, up
to about fourteen seconds.

LOST MOMENTS
------------
The after-feeling. For a second or so after a loop lets go, the present is
soft and slightly unreal, as though it has not caught up with you yet.

SPATIAL AWARENESS
-----------------
Spatial impairment is one of the most reliably reported effects, and both of
these leave the geometry completely alone. Nothing warps, bends or zooms.

  Depth Confusion   You judge distance mostly from atmospheric perspective -
                    far things are hazier and flatter. This makes those cues
                    contradict each other: nearby things pick up a little haze
                    as if further away, distant ones sharpen as if closer. It
                    looks normal at a glance. Distances just stop being
                    trustworthy, so jumps and ledges get harder to judge.

  Narrow Attention  Things outside the centre of your attention stop
                    registering. Not a dark vignette - detail and colour at the
                    edges quietly settle into the background, and the patch
                    that fades drifts as attention wanders.

MICRO-STUTTER
-------------
What used to be the main event, now defaulted to 30%. Seasoning.

NONE OF IT TOUCHES YOUR FRAMERATE
---------------------------------
The game runs at full speed throughout and input never stops registering.
Only the picture doubles back.

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.
