Realistic Vision Shaders (draft build - updated)
================================================
For Minecraft Java 1.21.11 - Iris or OptiFine

INSTALL
1. Put this .zip file (unmodified, do not extract it) into your
   .minecraft/shaderpacks/ folder.
2. In-game: Options > Video Settings > Shaders, select this pack,
   then open its settings.
3. Choose a Profile: Low / Medium / High / Intense.

WHAT CHANGED IN THIS UPDATE
- Underwater god rays: real light shafts now. They are raymarched against
  the depth buffer the same way the above-water ones are, so the surface
  and any geometry between you and the sun actually break the beams up,
  and a drifting two-octave caustic pattern is layered over them. The old
  version was a fixed sin() fan that ignored the scene entirely.
- Lens flare on sun AND moon: core bloom, a five-ghost chain mirrored
  through screen centre, an anamorphic horizontal streak and a faint halo
  ring. Occlusion is a 5-tap depth test so it fades behind terrain instead
  of popping. Moon flare is dimmer and cool-tinted. Suppressed in rain,
  underwater and while blind.
- Much softer shadows: hardware depth comparison is now on
  (shadowHardwareFiltering=true), so every tap is bilinearly filtered by
  the GPU instead of returning a hard 0 or 1. Sampling moved from a square
  3x3 grid to a per-pixel-rotated two-ring disk with slope-scaled bias,
  distance-widened penumbra and a smoothstep ramp. The square grid of
  hard compares is exactly what was producing the blob look.
- Darker lighting: ambient 0.60 -> 0.38, direct 1.25 -> 0.85, exposure
  0.82 -> 0.62, plus an extended Reinhard curve so highlights roll off
  instead of clamping to flat white. Roughly half the old brightness.
  If it is now too dark, raise EXPOSURE in the settings screen.

OPTIMIZATIONS
- Terrain: fragments facing away from the sun skip shadow sampling
  entirely (roughly half of visible terrain on typical builds).
- God rays: early-out when the sun is behind the camera or the fragment
  is too far from it; jittered ray start means 8 samples now look like
  the old 24, so sample counts came down at every quality level.
- Depth of field: 25-tap 5x5 grid replaced with a 9-tap ring.
- Motion blur: skipped entirely when the camera is not moving; velocity
  is clamped so fast turns cannot smear the whole screen.
- Vertex stage: one shared model-view transform instead of three separate
  matrix chains; exposure and white balance folded into one multiply.

NEW SETTINGS
EXPOSURE, SHADOW_SOFTNESS, SHADOW_DARKNESS, LENS_FLARE,
LENS_FLARE_STRENGTH, UNDERWATER_GODRAYS, UNDERWATER_GODRAY_STRENGTH.
SHADOW_QUALITY now selects tap count (4 / 8 / 12 / 20) - every level is
soft now, the old "sharp" and "pixelated" modes are gone since they were
the source of the blob edges.

NOTE
If you change shadowDistance in shaders.properties, also change
SHADOW_DIST in shaders/lib/settings.glsl to match - the shadow fade uses it.

UPDATE 2 - shadow acne / detached blob shadow fix
The previous PCF softening still left isolated dark patches on open
ground and an oversized shadow shape near buildings at low sun angles.
That was shadow acne: flat ground partially shadowing itself because
depth bias alone can't fully cover shallow, grazing sun angles.
gbuffers_terrain.vsh now applies a normal-offset bias - it nudges each
sample point slightly along its surface normal before projecting into
the shadow map - which is the standard fix that holds up at any sun
angle without shadows visibly detaching from what's casting them. The
fragment shader's depth bias was reduced to match, since it no longer
needs to do that job on its own. Only gbuffers_terrain.vsh/.fsh changed.

UPDATE - grass striping fix
Terrain fragments now blend into Minecraft's own gl_Fog instead of
ignoring it. That fog is what normally hides distant texture aliasing;
without it, flat grass viewed at a shallow angle showed a visible
banded/striped pattern. Only gbuffers_terrain.fsh changed - nothing
else was touched.

STATUS
Written directly to files and not test-compiled in Minecraft. If you get
shader compile errors in the Iris/OptiFine log, paste them back and I will
fix the specific lines. The one thing most likely to complain on an old
driver is the sampler2DShadow / shadow2D path; if that errors, say so and
I will ship a non-hardware-filtering fallback.
