Reject non-finite channels in First Light readbacks (FIRST-LIGHT-FINITE-READBACK) #2040

Open
github-bot wants to merge 1 commit from github-bot/gh-2040 into main AGit
Owner

@⁠alexandersato0830 on GitHub · 2026-11-25 18:47 UTC · original
alexandersato0830:codex/first-light-finite-readback → main · +12 −1 · 2 files · 1 commits · open

Claimed in the coordination issue as: FIRST-LIGHT-FINITE-READBACK

What and why

First Light checks image coverage and selected pixels. A non-finite color outside those probes can leave both checks passing and produce a successful render verdict. Reject non-finite readback channels before calculating coverage or comparing probes. The standalone preview writer still handles those values when it is used for diagnostics.

Tested

  • The new synthetic regression for an unprobed covered pixel fails with NaN and both infinities on 9f9a7c5f3, then passes with the fix.
  • python -I tests/test_first_light.py ran 49 tests with 8 environment-dependent skips. tests/test_first_light_mesh_draw.py (3 tests) and tests/test_first_light_bad_json.py (12 tests) all passed. Tested on Windows 11 with Python 3.11.17.
  • git diff --check and the source-only check passed.

GPUs tested: n/a (synthetic readbacks)

AI-assisted: yes (Codex)

Checklist

  • Based on current main.
  • One topic.
  • No game data, keys or decryption.
**@⁠alexandersato0830** on GitHub · 2026-11-25 18:47 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2040) `alexandersato0830:codex/first-light-finite-readback` → `main` · +12 −1 · 2 files · 1 commits · open Claimed in the coordination issue as: [FIRST-LIGHT-FINITE-READBACK](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why First Light checks image coverage and selected pixels. A non-finite color outside those probes can leave both checks passing and produce a successful render verdict. Reject non-finite readback channels before calculating coverage or comparing probes. The standalone preview writer still handles those values when it is used for diagnostics. ### Tested - The new synthetic regression for an unprobed covered pixel fails with NaN and both infinities on `9f9a7c5f3`, then passes with the fix. - `python -I tests/test_first_light.py` ran 49 tests with 8 environment-dependent skips. `tests/test_first_light_mesh_draw.py` (3 tests) and `tests/test_first_light_bad_json.py` (12 tests) all passed. Tested on Windows 11 with Python 3.11.17. - `git diff --check` and the source-only check passed. GPUs tested: n/a (synthetic readbacks) AI-assisted: yes (Codex) ### Checklist - [x] Based on current `main`. - [x] One topic. - [x] No game data, keys or decryption.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:15:48 +00:00
Author
Owner

@⁠DeadlyChirp on GitHub · 2026-11-26 10:32 UTC · original

Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.

  • tests/test_first_light.py: 45 passed, 8 skipped, 95 subtests passed (main: 44 passed). The skips are environment ones (no symlink privilege, vk_harness not built), the same on main.

(AI-assisted test run; output checked by hand.)

**@⁠DeadlyChirp** on GitHub · 2026-11-26 10:32 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2040#issuecomment-7189504333) Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main. - `tests/test_first_light.py`: 45 passed, 8 skipped, 95 subtests passed (main: 44 passed). The skips are environment ones (no symlink privilege, `vk_harness` not built), the same on main. (AI-assisted test run; output checked by hand.)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2040/head:github-bot/gh-2040'
git switch 'github-bot/gh-2040'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2040'
git switch 'github-bot/gh-2040'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2040'
git switch 'github-bot/gh-2040'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2040'
git switch 'main'
git merge --squash 'github-bot/gh-2040'
git switch 'main'
git merge --ff-only 'github-bot/gh-2040'
git switch 'main'
git merge 'github-bot/gh-2040'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.