Repository navigation
Give the rooms PBR surfaces, AgX tone mapping and a post-processing chain - #38
Merged
Merged
Conversation
The wallpaper, carpet and ceiling tile are seeded, periodic height fields that give each surface a colour, normal and occlusion-roughness map, so the rooms have relief without fetching any assets. Both Canvases now share one AgX colour pipeline at one exposure: the renderer tone-maps at the low quality, and at high a post-processing chain (n8ao ambient occlusion, bloom off the fixtures, grain, vignette, lens fringing) tone-maps last. The haze past the fog is a sphere around the camera, tone-mapped like the walls at either quality. Q toggles the quality, kept in localStorage. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The lattice noise precomputes its per-axis cells and blends, the blur runs with a running sum, and the maps are 512 texels across (2 mm on a 1 m tile): the nine maps now take about 190 ms instead of 7 s. Finer wallpaper grain and sparse, shallow ceiling fissures keep the stripe and diamond motif and the tile readable; exposure 1.15 brings AgX level with the previous look. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Set AgX on the renderer only at the low quality: the composer, a child, turns tone mapping off before the parent effect ran, so re-applying AgX there mapped the frame twice. Build the n8ao pass once per Canvas and keep it across quality changes, as Pass.dispose does not reach its fullscreen objects and every rebuild leaked them. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 141abaa2c8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
On a real screen the grain read as noise and the post chain cost a frame on top of the frame, so the default is now low (the old single pass with the new materials) and high is opted into with Q: its grain drops from 3.5 % to 1 % and the ambient occlusion takes 8 samples and 4 denoise taps. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Set the renderer's tone mapping in a layout effect, before the World's passive shader precompile, so it warms the variants the first frame uses: AgX at low, none at high where the composer maps. Multisample the composer's off-screen buffer (4 samples): the Canvas's own antialiasing does not reach it, so high rendered aliased edges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
height-field.ts) that give each surface a colour, normal and occlusion-roughness map; nothing is fetched, the maps tile without a seam, and all nine generate in ~190 ms (512², 2 mm per texel).low; athigha composer (n8ao ambient occlusion at half resolution, bloom off the fixtures, grain, vignette, lens fringing) tone-maps last. The haze past the fog is a sphere around the camera so it is tone-mapped like the walls at both levels. Measured headlessly on seed 7:highis ~4 % darker thanlow(the AO and vignette) and returns to the same values after toggling; high costs ~1.8× low on software GL.Qtoggles the quality (kept inlocalStorage); the HUD shows it.n8aoships no types, so the renderer declares the module and the app's tsconfig lists it undertypes.How to test
pnpm typecheck
pnpm lint
pnpm knip
pnpm test
pnpm build
pnpm --filter web dev # open ?seed=7&rooms=12, press Q to compare levels
Security review
No security-impacting changes.
🤖 Generated with Claude Code