## 🚀 What's New in v1.1.2 — *Render-Distance Shadows & Experimental Distant Horizons (Partial)*
Version **1.1.2** extends shadow rendering to the actual render distance with an adaptive LOD system, fixes HDR/TAA pipeline strictness, cleans up deprecated GLSL, and introduces **partial, experimental Distant Horizons support (WIP)** — without claiming full compatibility yet. Work is ongoing.
### 🌗 Extended Shadow Distance with Adaptive LOD
* **Shadows now reach render distance.** `shadowDistance` was `60-160m` with a hard cutoff at `shadowDistance`. Now it scales with quality profiles: **60m (VERY_LOW/LOW, no shadows) → 120m (MED) → 256m (HIGH/ULTRA) → 384m (EXTREME)**. The cutoff is replaced by a soft fade `smoothstep(far*0.85, far*0.98)`.
* **New `SHADOW_LOD` toggle — Off / Balanced / Aggressive.** Reduces sample count and expands filter radius at distance to keep performance stable:
* Balanced: `>25% far → 16 samples ×1.8 radius, >50% → 8 ×2.8`
* Aggressive: `>15% → 16×2.0, >35% → 8×3.5, >60% → 4×5.0`
* Beyond 95% `far` shadow sampling is skipped entirely.
* **`shadowMapResolution` now includes `8192`.** EXTREME uses 8192 for maximum texel density at 384m. HIGH stays 2048, ULTRA 4096.
* **New `SHADOW_PCSS_BLUR` toggle — fixed softness vs PCSS penumbra softening.** When enabled, penumbra grows with blocker distance and rain. When disabled, shadows use constant softness.
* **PCSS correctness fixes in `composite.fsh:sampleShadow()`:** added UV bounds checks (prevents clamp-to-border artifacts), `avgBlockerDepth` clamped to `1e-4` to avoid NaN, `penumbraSize` clamped `0-2.0`, `lightSize` reduced `140→40` to prevent light bleeding, `actualSpread` capped to `16.0`, out-of-bounds samples counted as unshadowed (1.0) for correct averaging.
* Shadow bias `distBias` now scales with `far` instead of `shadowDistance`, plus extra water receiver bias for tagged water pixels (`colortex2.a≈0.8`).
### 🔧 HDR Pipeline Strictness Fix
* **Dummy `#define RGBA16F 0` guards** added before the `const int colortex*Format = RGBA16F` directives. This satisfies strict GLSL validators (`C1503 undefined variable RGBA16F`) while Iris/OptiFine's parser still reads the format names (spec second clause). In v1.1.1 the directives were inside a `/* */` comment and were ignored by some loaders.
* Now **all used buffers are explicitly `RGBA16F`**: `colortex0/1/2` (main HDR + PBR + material tags), `colortex3/4/5/6` (unused today but set to HDR for a full pipeline), `colortex7` (TAA history, `colortex7Clear=false`), and optional `shadowcolor0/1Format = RGBA16F`.
* Cost noted: ~16MB per 1080p RGBA16F buffer → ~128MB VRAM for 8 buffers.
### 🌍 Experimental — Partial Distant Horizons Support (WIP, not full support)
> ⚠️ AuraLite does **NOT** yet claim full Distant Horizons compatibility. v1.1.2 only adds a **minimal, experimental code path** so LOD chunks are no longer invisible under Iris. It's functional enough for testing, but considered partial and work-in-progress.
* **Why it was needed:** Without `dh_terrain.vsh/.fsh`, `dh_water.vsh/.fsh`, `dh_shadow.vsh/.fsh`, Iris marks the pack as incompatible with DH and simply doesn't draw DH's simplified LOD chunks at all — symptom "shader works but DH chunks invisible". Presence of these files is enough for Iris/DH auto-detection (`dhShadow.enabled` defaults true).
* **What v1.1.2 does:**
* `dh_terrain`/`dh_water` write the same `colortex0/1/2` layout as vanilla passes, so existing lighting/fog/shadow/cloud/godray code in `composite.fsh` applies to LOD geometry without other changes.
* Depth reconciliation in `composite.fsh`: detects `depthtex0>=1.0 && dhDepthTex0<1.0` → `isDHTerrain`, reconstructs viewPos via `dhProjectionInverse` (not `gbufferProjectionInverse` — different far planes) and computes `isSkyPixel`. Fixes DH terrain being treated as sky (flat/washed-out).
* Fog rescale: `effectiveDensity *= far/dhRenderDistance` prevents exponential fog from saturating to white before DH draw distance.
* Emissive fast-path uses `!isSkyPixel` instead of `depth<1.0` so distant `DH_BLOCK_ILLUMINATED` (glowstone/lanterns) is still emissive.
* `final.fsh` heat shimmer now checks `dhDepthTex0` via `isRealGeometry` so distant lava lakes also shimmer.
* Overdraw prevention: `if(dist < far+16.0) discard` in DH passes — DH renders entire world including area already covered by vanilla chunks; without discard both fight over same G-buffer pixel causing Z-fighting / missing water/ice.
* **Current limitations (why it's partial):**
* `gl_MultiTexCoord2` is not guaranteed to carry valid lightmap data for DH programs — v1.1.2 hardcodes `lmcoord = vec2(0.0,1.0)` (open sky, no torch). Correct for exterior DH, but not interior-perfect.
* No LabPBR `normals`/`specular` maps for DH — roughness/metalness approximated per `dhMaterialId` (STONE/WOOD/METAL/SNOW/LEAVES/LAVA...). No POM on DH.
* Water uses flat vertex normal, not procedurally displaced like near water.
* Fog/sky/cloud code paths are shared but DH has coarser geometry.
* **Ongoing work:** proper skylight baking if DH ever exposes it, LabPBR fallback, smoother transition seam, performance tuning. Full support will be announced separately.
### 🛠️ Pipeline Cleanup & Fixes
* **Menu split fix — `[v1.1.1-ui-hotfix]`:** Oversized option screens were split into `[SHADOW_OPTIONS]`, `[PBR_OPTIONS]`, `[AO_REFLECTIONS]`, `[CLOUD_SHAPE]`, `[LIGHT_SHAFTS]`, `[NIGHT_SKY]` because some Iris/OptiFine UI builds silently hide buttons when a screen has too many entries.
* **Deprecated `ftransform()` removed** from `composite.vsh`, `final.vsh`, `gbuffers_clouds.vsh`, `composite1.vsh`, `composite2.vsh`, `gbuffers_weather.vsh` — replaced with explicit `gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex` for broader driver compat (same fix applied to `shadow.vsh` in v1.1.0).
* **Final pass cleanup:** Removed two duplicate copy-pasted post-gamma dither blocks that contradicted the comment about linear-space dither (triangle `±1/255` before tonemap). The single pre-tonemap dither remains — more effective in darks, silent in brights.
* **Bias & stale comment fixes:** Corrected stale `colortex6` hand-off comment (removed in v1.0.3), now notes that `final.fsh` reads normal from `colortex2` and roughness from `colortex1.z`.
* **Rebalanced profiles** to reflect new distances and LOD:
* VERY_LOW/LOW 60m (no shadows), MED 120m Balanced, HIGH 256m Balanced, ULTRA 256m Aggressive, EXTREME 384m Aggressive + 8192 res.
* **Localization:** Bumped `lang/*.lang` headers `v1.0.7 → v1.1.2`, translated previously-English `profile.*.comment` placeholders into native languages (ur_pk, vi_vn, zh_cn, zh_hk, zh_tw and others).
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }