Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
cf376cc
feat(hq): a tone curve that shows mid-grey as the game does
stellarfeline Oct 20, 2026
a86e929
feat(hq): the game's sky, lit as the pinned client lights its tick
stellarfeline Oct 20, 2026
f291590
feat(hq): the game's sky is HQ mode's default, with the tone curve th…
stellarfeline Oct 20, 2026
2d77030
docs: the game's sky, its method, its departures from the engine, and…
stellarfeline Oct 20, 2026
845d5c8
docs(benchmark): a designed benchmark, measured, on its own page
stellarfeline Oct 20, 2026
58be8f4
fix(kernel): rust-version is 1.88, the first release the kernel build…
stellarfeline Oct 20, 2026
255495f
docs(readme): the front page is the renders, Install and a Quick star…
stellarfeline Oct 20, 2026
0752459
docs(renders): the four HQ Treehouse Camp frames under the game's sky
stellarfeline Oct 20, 2026
4d1f6bd
feat(hq): the default sky goes by the time of day, Chunky's by day an…
stellarfeline Oct 21, 2026
fc28a6c
feat(hq): the game look's lanterns, fitted to the engine's reference …
stellarfeline Oct 21, 2026
0cd2b54
chore(release): 0.2.0 publishes lumenwright-cli with the library and …
stellarfeline Oct 21, 2026
712de69
docs: the sky by the time of day, the fitted lanterns, and the defaul…
stellarfeline Oct 21, 2026
08afb1b
docs(renders): the four HQ Treehouse Camp frames under the sky by the…
stellarfeline Oct 21, 2026
fc5ae38
test(parity): the mixed sky on Metal and CUDA against the CPU
stellarfeline Oct 21, 2026
9263872
fix(docs): Sky::Vanilla's sun_dir links SkyLook::Game, which exists
stellarfeline Oct 21, 2026
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
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
# on their "no GPU adapter" branch; the test job prints that skip count in its log
# instead of letting it pass unseen. GPU behaviour is verified on a developer machine.
#
# Toolchain: the repository carries no rust-toolchain.toml and no rust-version, so the
# version the local gate runs used (1.97.1) is pinned here.
# Toolchain: the repository carries no rust-toolchain.toml; each crate's rust-version is the
# floor it builds on, not the version tested, so the version the local gate runs used
# (1.97.1) is pinned here.
name: ci

on:
Expand Down
67 changes: 37 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
# Lumenwright release: publishes lumenwright-kernel, then lumenwright, to crates.io, then tags
# v<version> and creates the GitHub Release. lumenwright-cli is not published.
# Lumenwright release: publishes lumenwright-kernel, then lumenwright, then lumenwright-cli
# (each after the one it depends on is in the crates.io index), then tags v<version> and
# creates the GitHub Release.
#
# Run it from the Actions tab (or `gh workflow run release.yml -f version=X.Y.Z`) on main.
# Nothing is published, tagged or released until every refusal below has passed:
# * the run is not on main;
# * the input is not a version, or differs from the version of either published crate;
# * the input is not a version, or differs from the version of any of the three crates, or
# a crate is marked publish = false;
# * main's CI (ci.yml, on push) did not succeed at this commit;
# * the version of either crate is already on crates.io, or the tag v<version> exists;
# * any of the three crates already has the version on crates.io, or the tag v<version>
# exists;
# * CHANGELOG.md has no dated section for the version (a section still marked Unreleased
# is refused);
# * the test suite (ci.yml, run again here) fails.
#
# Secret: CARGO_REGISTRY_TOKEN, a crates.io API token with the publish-update scope for both
# crates (publish-new for a first release), stored as a repository secret.
# Secret: CARGO_REGISTRY_TOKEN, a crates.io API token with the publish-update scope for the
# three crates (publish-new for a crate's first release, lumenwright-cli's at 0.2.0), stored
# as a repository secret.
name: release

on:
Expand Down Expand Up @@ -59,18 +63,18 @@ jobs:
exit 1
fi
meta=$(cargo metadata --no-deps --format-version 1)
for crate in lumenwright-kernel lumenwright; do
for crate in lumenwright-kernel lumenwright lumenwright-cli; do
have=$(jq -r --arg n "$crate" '.packages[] | select(.name==$n) | .version' <<<"$meta")
if [ "$have" != "$VERSION" ]; then
echo "::error::refused: $crate is at '$have' in the workspace, the input is $VERSION"
exit 1
fi
publish=$(jq -r --arg n "$crate" '.packages[] | select(.name==$n) | .publish | tostring' <<<"$meta")
if [ "$publish" != "null" ]; then
echo "::error::refused: $crate may not be published (its publish field reads $publish)"
exit 1
fi
done
cli=$(jq -r '.packages[] | select(.name=="lumenwright-cli") | .publish | tostring' <<<"$meta")
if [ "$cli" != "[]" ]; then
echo "::error::refused: lumenwright-cli must carry publish = false (its publish field reads $cli)"
exit 1
fi
- name: Refuse a commit whose CI on main did not succeed
env:
GH_TOKEN: ${{ github.token }}
Expand All @@ -87,7 +91,7 @@ jobs:
- name: Refuse a version already on crates.io, or a tag that exists
run: |
set -euo pipefail
for crate in lumenwright-kernel lumenwright; do
for crate in lumenwright-kernel lumenwright lumenwright-cli; do
# The sparse index: a 404 is the only answer read as "absent".
path="$(cut -c1-2 <<<"$crate")/$(cut -c3-4 <<<"$crate")/$crate"
code=$(curl -sS -o index.txt -w '%{http_code}' "https://index.crates.io/$path")
Expand Down Expand Up @@ -139,27 +143,30 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- run: rustup toolchain install "$RUSTUP_TOOLCHAIN" --profile minimal
- name: Publish lumenwright-kernel
- name: Publish lumenwright-kernel, lumenwright and lumenwright-cli, each once the index serves the one before
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --locked -p lumenwright-kernel
- name: Wait until the index serves lumenwright-kernel at the version
run: |
set -euo pipefail
for _ in $(seq 60); do
if curl -fsS https://index.crates.io/lu/me/lumenwright-kernel 2>/dev/null \
| jq -e --arg v "$VERSION" 'select(.vers==$v)' >/dev/null; then
echo "lumenwright-kernel $VERSION is in the index"
exit 0
fi
sleep 10
done
echo "::error::lumenwright-kernel $VERSION did not reach the index within 10 minutes"
exit 1
- name: Publish lumenwright
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --locked -p lumenwright
wait_for() {
path="$(cut -c1-2 <<<"$1")/$(cut -c3-4 <<<"$1")/$1"
for _ in $(seq 60); do
if curl -fsS "https://index.crates.io/$path" 2>/dev/null \
| jq -e --arg v "$VERSION" 'select(.vers==$v)' >/dev/null; then
echo "$1 $VERSION is in the index"
return 0
fi
sleep 10
done
echo "::error::$1 $VERSION did not reach the index within 10 minutes"
return 1
}
cargo publish --locked -p lumenwright-kernel
wait_for lumenwright-kernel
cargo publish --locked -p lumenwright
wait_for lumenwright
cargo publish --locked -p lumenwright-cli
wait_for lumenwright-cli

release:
needs: publish
Expand Down
27 changes: 25 additions & 2 deletions ACKNOWLEDGEMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ Code, algorithms and constants Lumenwright takes from other works, with their li
per step (`Octree.enterBlock`), the grass block's overlay over its side
(`GrassBlockModel.java`), and the unknown biome's climate (`Biomes.java`).

## Delvewright's engine

* Source: <https://github.com/stellarfeline/delvewright>, read at revision `0fd300da7`.
* Licence: GNU General Public License, version 3. The repository's `LICENSE` is the GPL-3.0
text; its README states GPL-3.0-or-later and its `Cargo.toml` `GPL-3.0-only`. The ported
code is used under the GPL-3.0, which Lumenwright's GPL-3.0-or-later admits.
* Ported into HQ mode's game sky ([docs/research/game-sky.md](docs/research/game-sky.md); each
port names its engine file in a code comment):
* the Hable curve read brighter by the gain that shows mid-grey as the game's transfer does,
in closed form (`HableCurve::brightened`, `mid_grey_gain`, `tone_curve` in
`crates/delvec/src/compiler/view/scene.rs`), copied into `render/post.rs`;
* the method that lights a scene as the 1.21.11 client lights a tick: no sunlight, the
lightmap's colour for a cell open to the sky as the light (`lightmap_sky`, `sky_cell` in
`scene.rs`, transcribed again from the client's `lightmap.fsh` in `render/sky.rs`), and
the client's sky plus the least uniform veil, scaled, as that light's directions
(`sky_map` in `crates/delvec/src/compiler/view/sky_image.rs`).

## The Preetham sky model

* A. J. Preetham, P. Shirley and B. Smits, "A Practical Analytic Model for Daylight",
Expand All @@ -45,5 +62,11 @@ Code, algorithms and constants Lumenwright takes from other works, with their li
## Twilight

* The end of civil twilight, the sun's centre 6 degrees below the horizon, at which HQ
mode's sky reaches a night's light: the definition the US Naval Observatory publishes
(a fact, not a work; no licence applies).
mode's Chunky sky (`--sky chunky`) reaches a night's light: the definition the US Naval
Observatory publishes (a fact, not a work; no licence applies).

## Mid-grey

* Linear 0.18, the reflectance of the photographic grey card exposure is metered against
(Kodak Gray Card, publication R-27), the value the game's tone curve is anchored at (a fact,
not a work; no licence applies).
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,51 @@ All notable changes to Lumenwright are recorded here. The format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow
[Semantic Versioning](https://semver.org/).

## [0.2.0] - Unreleased

### Added

- HQ mode draws the game's own sky (`HqSkyModel::Game`, `--sky game`), lit as the 1.21.11
client lights the tick, by the method Delvewright's engine lights its Chunky scenes with
(`docs/research/game-sky.md`): the sun casts no light; the sky casts the colour the
client's lightmap gives a cell open to it, from the jar's `visual/sky_light_factor` and
`visual/sky_light_color` (now in `EnvironmentState`), with the directions of the client's
sky; the lens sees the client's sky as quick mode draws it, its disc, fog, sunrise glow,
sun, moon and stars. The host draws the sky into two equirectangular maps that every
backend reads (`Params::sky_map`; `integrator::sky_lens`, `sky_light`). A jar without
environment attributes is refused under it.
- The game look's emitter intensity, `GAME_EMITTER_INTENSITY` = 137.9628 (13 × 10.6125),
authored by Lumenwright: fitted so that the Treehouse Camp's lantern-lit pixels at dusk
read as Delvewright's engine's Chunky render of the frame does. `--emitter-intensity`
takes any value over it.
- `--tonemap filmic-mid-grey` (`Tonemap::FilmicMidGrey`, `post::game_tone_curve`): Chunky's
Hable curve read 1.463761 times brighter, so linear 0.18 shows at 0.18^(1/2.2) as the
game's transfer shows it.

### Changed

- HQ mode's default sky goes by the time of day (`SkyLook::ByTime`, `--sky auto`): Chunky's
Preetham sky and sun on the client's day plateau (ticks 730 to 11270, where
`visual/sky_light_factor` is 1), the game's sky on the night plateau, and between them one
render mixing the two by where the factor stands between its night and day values, with no
jump from one tick to the next. `--sky chunky` and `--sky game` force either look.
`HqSkyModel` is a struct (`look`, `render_distance`, `sun_intensity`, `sky_intensity`);
`Sky::Vanilla` carries it in place of `sun_intensity` and `sky_intensity`.
`--sun-intensity` and `--sky-intensity` are refused only under `--sky game`.
- `HqOptions::tonemap` and `emitter_intensity` are `Option`s: unstated, each look takes its
own (`gamma` and 13 for Chunky's, `filmic-mid-grey` and `GAME_EMITTER_INTENSITY` for the
game's), mixed by the day weight.
- `Params` is 26 vec4s (416 bytes): `sky_map` gives the sizes of the sky's maps. A sun of
colour 0 draws no next-event sample.
- `Tonemap::Filmic` is evaluated as Chunky's `processPixel` evaluates it (the parameter
products in float, the rest in double) through the one `HableCurve`.
- The HQ timing stage `sky cache` is `sky`.
- `lumenwright-cli` is published to crates.io with the other two crates (`cargo install
lumenwright-cli`); the release workflow publishes `lumenwright-kernel`, `lumenwright` and
`lumenwright-cli` in that order and refuses unless all three are absent at the version.
- `lumenwright-kernel` declares `rust-version` 1.88, the first release it builds on (its `if let`
chains); 0.1.0 declared 1.85, on which it does not compile.

## [0.1.0] - 2026-10-20

The first release. The `lumenwright` library and its kernel `lumenwright-kernel` are published on
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exclude = ["crates/lumenwright-ptx"]

[workspace.package]
edition = "2024"
version = "0.1.0"
version = "0.2.0"
license = "GPL-3.0-or-later"
repository = "https://github.com/stellarfeline/lumenwright"

Expand Down
Loading
Loading