BlueGit

golden-age paperdoll-renderer

design: glTF BLEND materials are alpha-blended over opaque surfaces (Tim t1016u/t1017u)

timfa Grok Bot · pushed by timfa

Authored 2026-11-07 · 6 days ago

Hash
b3077f3b998cd85dc34388b75540ddc0fca22316
Parent
6789a60e
Pipeline
Passed
1 file changed +4 −0
design.md +4 −0
@@ -549,3 +549,7 @@ Rechecked 7 November 2026 against the live `GET /api/v1/openapi.json` and BlueGi
549 549 Release tags are annotated `vX.Y.Z` tags pushed by hand on a green master; `v*` is a protected tag pattern, so the protected CI variables are available to the tag pipeline only.
550 550
551 551 A `publish:aur` job after `release` (allow_failure, resource_group aur, Arch image) copies the approach of timfa/legacy-cycles (`aur-ssh-setup.sh` + `publish-aur.sh`): AUR package `paperdoll-renderer-bin` (`packaging/aur/paperdoll-renderer-bin/PKGBUILD`), source = the release's `.deb` asset, sha256 of exactly that downloaded asset, pkgver from the tag, `.SRCINFO` via `makepkg --printsrcinfo`, pushed to `ssh://aur@aur.archlinux.org/paperdoll-renderer-bin.git`. It uses exactly the protected variables `AUR_SSH_PRIVATE_KEY_B64`, `AUR_GIT_AUTHOR_NAME` and `AUR_GIT_AUTHOR_EMAIL`. The PKGBUILD installs the binary, the `.desktop` file, the hicolor icons, the `.ppd` MIME package (`paperdoll-project.xml`), metainfo, LICENSE and THIRD_PARTY_NOTICES; it conflicts with/provides `paperdoll-renderer`.
552
553 ## Decision 2026-11-07 (Tim t1016u/t1017u): glTF alphaMode BLEND is blended, not a winning surface
554
555 Per the glTF spec, a `BLEND` material is composited over what is behind it with its alpha (base colour factor alpha × texture alpha × vertex colour alpha). Until now BLEND was treated like an opaque surface with a 0.001 cutoff, so a nearly transparent layer in front (the "Crystal" cornea of Tim's default bodies, alpha 0.08/0.17; also eyebrow, eyelash and hair cards) won the pixel and the eye behind it vanished. Production and the live preview now draw in two groups: all `OPAQUE`/`MASK` surfaces first (depth test + write, cutoff as before), then the `BLEND` surfaces in file order with depth test on, depth write off and straight-alpha "over" blending (`src·a + dst·(1−a)` for colour, `a + dst·(1−a)` for coverage) into diffuse, normal and specular; a final depth-only pass of the BLEND surfaces (alpha > 0.001) writes their depth, so covered pixels still carry the nearest surface depth. The 2D depth compositor and resolve are unchanged. Blending is order-dependent within the BLEND group (no sorting, no OIT); that limitation is accepted.
@@ -549,3 +549,7 @@ Rechecked 7 November 2026 against the live `GET /api/v1/openapi.json` and BlueGi
549Release tags are annotated `vX.Y.Z` tags pushed by hand on a green master; `v*` is a protected tag pattern, so the protected CI variables are available to the tag pipeline only.
549Release tags are annotated `vX.Y.Z` tags pushed by hand on a green master; `v*` is a protected tag pattern, so the protected CI variables are available to the tag pipeline only.
550
550
551A `publish:aur` job after `release` (allow_failure, resource_group aur, Arch image) copies the approach of timfa/legacy-cycles (`aur-ssh-setup.sh` + `publish-aur.sh`): AUR package `paperdoll-renderer-bin` (`packaging/aur/paperdoll-renderer-bin/PKGBUILD`), source = the release's `.deb` asset, sha256 of exactly that downloaded asset, pkgver from the tag, `.SRCINFO` via `makepkg --printsrcinfo`, pushed to `ssh://aur@aur.archlinux.org/paperdoll-renderer-bin.git`. It uses exactly the protected variables `AUR_SSH_PRIVATE_KEY_B64`, `AUR_GIT_AUTHOR_NAME` and `AUR_GIT_AUTHOR_EMAIL`. The PKGBUILD installs the binary, the `.desktop` file, the hicolor icons, the `.ppd` MIME package (`paperdoll-project.xml`), metainfo, LICENSE and THIRD_PARTY_NOTICES; it conflicts with/provides `paperdoll-renderer`.
551A `publish:aur` job after `release` (allow_failure, resource_group aur, Arch image) copies the approach of timfa/legacy-cycles (`aur-ssh-setup.sh` + `publish-aur.sh`): AUR package `paperdoll-renderer-bin` (`packaging/aur/paperdoll-renderer-bin/PKGBUILD`), source = the release's `.deb` asset, sha256 of exactly that downloaded asset, pkgver from the tag, `.SRCINFO` via `makepkg --printsrcinfo`, pushed to `ssh://aur@aur.archlinux.org/paperdoll-renderer-bin.git`. It uses exactly the protected variables `AUR_SSH_PRIVATE_KEY_B64`, `AUR_GIT_AUTHOR_NAME` and `AUR_GIT_AUTHOR_EMAIL`. The PKGBUILD installs the binary, the `.desktop` file, the hicolor icons, the `.ppd` MIME package (`paperdoll-project.xml`), metainfo, LICENSE and THIRD_PARTY_NOTICES; it conflicts with/provides `paperdoll-renderer`.
552
553## Decision 2026-11-07 (Tim t1016u/t1017u): glTF alphaMode BLEND is blended, not a winning surface
554
555Per the glTF spec, a `BLEND` material is composited over what is behind it with its alpha (base colour factor alpha × texture alpha × vertex colour alpha). Until now BLEND was treated like an opaque surface with a 0.001 cutoff, so a nearly transparent layer in front (the "Crystal" cornea of Tim's default bodies, alpha 0.08/0.17; also eyebrow, eyelash and hair cards) won the pixel and the eye behind it vanished. Production and the live preview now draw in two groups: all `OPAQUE`/`MASK` surfaces first (depth test + write, cutoff as before), then the `BLEND` surfaces in file order with depth test on, depth write off and straight-alpha "over" blending (`src·a + dst·(1−a)` for colour, `a + dst·(1−a)` for coverage) into diffuse, normal and specular; a final depth-only pass of the BLEND surfaces (alpha > 0.001) writes their depth, so covered pixels still carry the nearest surface depth. The 2D depth compositor and resolve are unchanged. Blending is order-dependent within the BLEND group (no sorting, no OIT); that limitation is accepted.