Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

Every release is for Minecraft 26.4-snapshot-3 with Fabric. Versions: the middle number goes up for new features, the last one for fixes. Jars are on the [Releases](https://github.com/Atomsk-debug/Etna/releases) page.

## 0.8.1 (unreleased)

Fixes for 0.8.0's water, and shadows that soften with distance.

* **Shadows soften with distance, as real ones do.** A shadow is sharp where it meets what casts it and blurs the further it reaches: a tree's shadow is crisp at the trunk and a soft smudge at its far end, and long evening shadows lose their detail and fade towards the tip. Before, every shadow edge had the same blur. Shadow Softness now also sets how quickly they soften; at its lowest, edges stay hard everywhere.
* **Steadier, cheaper soft shadows.** The test build turned its shadow reads every frame and gave up where its few reads found nothing, so the softened edges shimmered and cost up to 2.5 ms a frame. Now the search for what casts a shadow reads the same spots every frame, open ground and the inside of shadows skip the wide blur, and only very wide evening blurs still turn, gently. In Etna's shadow test bench the flicker after anti-aliasing is 35 to 65 % lower than the test build's and, with the sun low, lower than 0.8.0's too.
* **Sharper far shadows.** The shadow map is spread over the land in a new way: about as sharp round you as before, two to five times sharper towards the corners of the shadowed area, and the whole map is used (before, about 6 % of it was never filled).
* **Long low-sun shadows are fainter.** Below about 20 degrees the sky fills shadows in a little, up to a third lighter at the horizon.
* Far shadows fade out instead of stopping at a straight line about 180 blocks away when looking towards or away from a low sun, and ground more than 320 blocks below the camera along the light (far away under a low sun, or seen from very high up) no longer turns dark.

* **Reflections keep their shapes.** The shore, trees and hills mirrored in the water came out as scattered dark dots. Each reflected ray now takes the same fixed steps every frame and counts as a hit only where it really runs into something, rays that find nothing are averaged in instead of dropped, and the mirror image follows a calmer copy of the waves, so it wobbles as a whole instead of breaking up.
* **Steadier reflections.** Reflections in the water no longer flicker where a reflected edge (a tree, a roof, the shore) only just meets the water's ray: each spot of the water now blends its reflection over the last few frames, and the rays are traced from where the picture really is, not from where the anti-aliasing has moved it this frame.
* **Shadows on water make sense.** The water's own colour now takes the shade of the water under the surface, where its light comes from: on clear shallow water a tree's shadow is the one on the bottom, seen through the water, and on deep or murky water a soft shadow in the water itself. Before, the surface carried a second, sharp copy of each shadow next to the one on the bottom, and the two crossed each other out in strange shapes. Water in a wide shade (under a cliff, a big tree or a roof) also keeps the clarity of the water around it instead of turning murky in the shadow's shape.
* **Foam, redone.** Only a thin, faint, bubbly line where still water meets the shore, in a pale colour that no longer glows. Shallow water stays clear (0.8.0 foamed every floor just under the surface into a milky haze), and water flowing down a slope has no foam.

## 0.8.0 (2026-10-10), "Enchanted"

Magic, and closing the gap with the most popular shader packs. Every new effect has its own setting, none of them is part of the Look, and with Etna off none of them is left.
Expand Down
18 changes: 14 additions & 4 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
# Credits

Etna is original code under the MIT licence (`LICENSE`), with these exceptions: the temporal anti-aliasing
pass, the shadow map distortion and the water's Fresnel function are ported from another shader pack, under
that pack's own licence; the sky's star hash is David Hoskins's, under the MIT licence; and the terrain and
pass is ported from another shader pack, under that pack's own licence; the sky's star hash is David Hoskins's, under the MIT licence; and the terrain and
cloud shaders are based on Minecraft's own, which Etna's licence doesn't cover.

## Code ported from other projects

| Etna file | Source | Licence |
|---|---|---|
| `src/main/resources/assets/etna/shaders/post/taa.fsh` | [Photon Shaders](https://github.com/sixthsurge/photon) by SixthSurge: `program/c4_taa_exposure.fsh` (TAA, neighbourhood and variance clipping, offcenter rejection) and `include/utility/bicubic.glsl` (fast Catmull-Rom history filter), adapted to Minecraft's reversed depth buffer and Etna's camera matrices | Photon Shaders License, see `LICENSE-PHOTON.txt` |
| `src/main/resources/assets/etna/shaders/include/shadow_distortion.glsl`: `etnaShadowFactor`, used in `src/main/resources/assets/etna/shaders/core/terrain.vsh` (shadow pass), `src/main/resources/assets/etna/shaders/include/terrain_shadow.glsl` (shadow map lookups) and `src/main/resources/assets/etna/shaders/post/shafts.fsh` (the light shafts' lookups) | [Photon Shaders](https://github.com/sixthsurge/photon) by SixthSurge: `include/lighting/shadows/distortion.glsl` (quartic-length shadow map distortion) | Photon Shaders License, see `LICENSE-PHOTON.txt` |
| `src/main/resources/assets/etna/shaders/core/sky.fsh`: `hash33` (where the stars sit, how bright they are, their colour) | "Hash without Sine" by David Hoskins ([shadertoy.com/view/4djSRW](https://www.shadertoy.com/view/4djSRW)), `hash33`, unchanged | MIT, Copyright (c) 2014 David Hoskins, licence text as in `LICENSE` |
| `src/main/resources/assets/etna/shaders/core/sky.vsh`: `hash41` (when and where a shooting star flares, which way it falls) | "Hash without Sine" by David Hoskins ([shadertoy.com/view/4djSRW](https://www.shadertoy.com/view/4djSRW)), `hash41`, unchanged | MIT, Copyright (c) 2014 David Hoskins, licence text as in `LICENSE` |
| `src/main/resources/assets/etna/shaders/include/terrain_water.glsl`: `fresnelDielectric` | [Photon Shaders](https://github.com/sixthsurge/photon) by SixthSurge: `include/lighting/bsdf.glsl`, `fresnel_dielectric_n` (Fresnel reflectance with total internal reflection, for Snell's window seen from under water), with floored divisors and a clamp added | Photon Shaders License, see `LICENSE-PHOTON.txt` |
| `src/main/resources/assets/etna/shaders/post/shafts.fsh`: `SUBPIXEL` (the order in which the light shafts' half-resolution pixels take turns) | [Photon Shaders](https://github.com/sixthsurge/photon) by SixthSurge: `checkerboard.glsl`, the same 2×2 order | Photon Shaders License, see `LICENSE-PHOTON.txt` |
| `src/main/resources/assets/etna/shaders/core/terrain.vsh`, `terrain.fsh`, `clouds.vsh`, `clouds.fsh`, `weather.vsh`, `weather.fsh` | Minecraft's vanilla `terrain`, `clouds` and `particle` core shaders, which Etna replaces while it is on and extends (`weather` is made from `particle`, which vanilla draws rain and snow with) | Based on Minecraft's vanilla shader, (c) Mojang AB, not covered by Etna's MIT licence |

Expand Down Expand Up @@ -59,6 +56,14 @@ first, or original replacements for them.
depth buffer, signed so each line falls on the nearer side. The pack families and their colour traits come
from Etna's own study of the packs' published screenshots; no pack assets are used.
* Noise: interleaved gradient noise (Jorge Jimenez, 2014).
* Shadows (`shadow_distortion.glsl`, `terrain_shadow.glsl`, 0.8.1): the shadow map's distortion is Etna's
own. A texel's size grows as (r + c)², which keeps up with the ground's foreshortening away from the camera
(the classic perspective-matching idea of shadow map warping); r is sqrt(1 - (1 - x²)(1 - y²)), which is
the plain distance from the map's centre near it and reaches 1 all along the map's square edge, so the
whole map is used and it never folds over. The soft edges are an area-weighted box of texels against a
receiver plane, and contact hardening follows percentage-closer soft shadows (Randima Fernando,
"Percentage-Closer Soft Shadows", NVIDIA, 2005), with a fixed search pattern and a disc turned only where
it is wide.
* Shadow casters (`EtnaShadows.java`): only the chunk sections whose shadow can fall on something the
camera sees are drawn into the shadow map. The view is extruded towards the light: the sides of the view
that face away from the light, and a plane along the light through each edge where such a side meets one
Expand Down Expand Up @@ -98,6 +103,11 @@ first, or original replacements for them.
depth as the guide (Johannes Kopf, Michael F. Cohen, Dani Lischinski and Matt Uyttendaele, "Joint Bilateral
Upsampling", SIGGRAPH 2007). The mist's look (valley mist at dawn and dusk, haze at night and in rain, cave
fog) follows Complementary Reimagined; no code from it.
* Water Fresnel (`terrain_water.glsl`, `fresnelDielectric`, 0.8.1): the exact Fresnel reflectance of
unpolarised light at a dielectric boundary, in the form Robert Cook and Kenneth Torrance give ("A
Reflectance Model for Computer Graphics", 1982; also Walter, Marschner, Li and Torrance, "Microfacet
Models for Refraction through Rough Surfaces", 2007, eq. 22), with total internal reflection for
Snell's window seen from under water.
* Under water (`terrain_water.glsl`), ideas after Photon with Etna's own code: the phase function of the
light shafts, 0.7 × Henyey-Greenstein (g = 0.5) + 0.3 isotropic, as Photon's water; caustics as the
change in area of light refracted by the surface (the idea of Photon's `program/shadow.fsh`,
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ No. Etna works on its own; Vesuvio makes the game, and Etna's shadows, faster.

Etna's own code is under the MIT licence, see [LICENSE](LICENSE). Its terrain and cloud shaders are based on
Minecraft's vanilla shaders (© Mojang AB), which Etna's licence doesn't cover. A few small parts are ported from
[Photon Shaders](https://github.com/sixthsurge/photon) by SixthSurge (temporal anti-aliasing, shadow map
distortion, the water's Fresnel function) and stay under the Photon Shaders License (`LICENSE-PHOTON.txt`).
[Photon Shaders](https://github.com/sixthsurge/photon) by SixthSurge (temporal anti-aliasing, the order of
the light shafts' half-resolution pixels) and stay under the Photon Shaders License (`LICENSE-PHOTON.txt`).
Complementary Reimagined inspired the look; none of its code is used. Everything taken from other projects and
every technique Etna follows is listed in [CREDITS.md](CREDITS.md).
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ loom_version=1.18-SNAPSHOT
# Mod Properties
# Bump on every build handed out for testing: patch for fixes, minor for new features. The jar and the
# version shown in the game's mod list both become <mod_version>+mc<minecraft_version>.
mod_version=0.8.0
mod_version=0.8.1
group=it.cosimo.etna

# Dependencies
Expand Down
Loading