Repository navigation
Bake: one place for plants' materials; the circuit's grass and woods sway; circuit refuses land of its own - #78
Merged
Merged
Conversation
…sway; circuit and terrain refuse each other The woods in land.rs and circuit.rs were the same thirty lines, and forest.rs made the same bark, leaf and blade materials again. They are now in foliage.rs: grow() puts a wood's species into a scene, Grown::place() an instance of one, and bark(), leaves() and blades() make the materials. The circuit's copies had never been given the sway flags, so its verge grass and its woods stood still in any wind. Through the shared materials they now sway as the cove's and the forest's do. A scene file with both terrain and circuit built both, one inside the other, and the terrain's heights won as the ground cars drive on. It is now an error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s for foliage From review: the terrain check came after every model was imported, and land, path, yard, clear, meadow, wood and water lines were silently dropped beside a circuit too. Each is now refused at the line that brings the two together, before anything is imported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A follow-up from the review of #75. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # apps/bake/src/scene_file.rs
1 task done
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 and why
Part of a maintenance pass over the engine. It covers two loose ends from earlier reviews of circuits (#64) and some duplication left by the Cove's land (#72, #73).
land.rsandcircuit.rswere the same thirty lines, andforest.rsbuilt the same bark, leaf and blade materials a third time. They now live inapps/bake/src/foliage.rs:grow()puts a wood's species into a scene;Grown::place()places one copy;bark(),leaves()andblades()make the materials, each flagged to sway.SWAYS, orTREEfor trees, so its verge grass and woods stood still in any wind. This is a deliberate visible change, for circuit scenes only.circuitrefuses land of the file's own. A scene file with bothterrainandcircuitbuilt both, one inside the other, and the terrain's heights won as the ground cars drive on.land,path,yard,clear,meadow,woodandwaterlines beside a circuit were silently dropped. Each is now an error at the line that brings the two together, before anything is imported.bake --onlywithout--plants(or--species/--grass) was silently ignored. It is now an error. This is a follow-up from the review of Ponds in scene files, mirror reflections, willows and old oaks #75.Verified
Cove and Forest baked from this branch are byte-identical (sha1) to the same scenes baked from main, so the refactor changes nothing there.
New tests:
Grown::placepicks the copy and order;woodline after it, is refused at the right line.The new tests were mutation-checked.
cargo test --workspace --releasepasses. fmt and clippy (-D warnings) are clean natively and for both wasm32 builds.The renderer is untouched. The pass's shared before/after numbers follow.
Measured in Chrome on the RTX 5080
Main (8731867) against this pass's three branches merged together (#77, #78, #79), on the same scene files, each config run back to back. GPU time is the sum of every pass's timestamps per frame (a profiler injected into the page adds
timestampWritesto each pass), averaged over 250 to 500 frames after streaming settles. Fixed view:?time=12:00&day-length=0&weather=fair, default camera.?limits=webgpu?limits=webgpu?limits=webgpu--no-taa. Every after-vs-main PSNR falls inside main's own run-to-run spread, for example Temple 54–58 dB against 55.5–56.7 dB, and Cove storm 60.6–61.1 dB against 60.4 dB.screen gisplits into integrate 1.04 ms (its occlusion search is 0.27 ms of that), reflections 0.67 ms and trace 0.55 ms.Authorship
Written by: Claude Opus 5.5 through Claude Code
Reviewed by: Claude Sonnet 5.5. Approved with no correctness issues. It confirmed:
copy % variantsmatches both callers' old arithmetic;solstice-render/src/scene.rsreadsSWAYSandTREE, so nothing else in these scenes depended on the old flags.Fixed from its points:
The terrain check ran after every model was imported. Land lines beside a circuit were dropped silently. Both are now refused as soon as they are read.
foliage.rshad no tests of its own. It now has two.All code, text and comments in this pull request were written by a frontier AI model, with no human-written code, and will be reviewed by a frontier AI model before merging, as the Code of Conduct requires.
🤖 Generated with Claude Code