Repository navigation
Render: one copy of shared helpers; every shader the renderer loads is tested; GPU devices made one at a time - #79
Merged
Merged
Conversation
…s tested - hash4 was written out in both rain shaders, and remap in two cloud shaders: both now live in common/math.wgsl. - The weather, sea-state and particle-effect readers each had their own number(): one, in text.rs. - Three unit-test modules each made their own test GPU: one, gpu::test_gpu(), which also makes devices one at a time, as does the GPU suite's. Made at once from many threads, the Vulkan loader, validation layer and driver here crash or deadlock (the intermittent GPU test crash). - all_entry_points_compile said it caught every WGSL error, and the browser operator check walks the same list, but the three masked raster shaders (alpha cutouts) were not on it. They are now, and a test fails if a shader the renderer makes a module of is ever left off. - docs/weather-effects.md still read as a plan for work not yet built, and named three files that never came to be. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lank lines 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 and why
Part of a maintenance pass over the engine after the weather, trees, land and phone work (#64 to #75). This PR covers duplicated code, a test that didn't test what it claimed, flaky GPU tests, and stale docs.
hash4was written out in both rain shaders, andremapin two cloud shaders. Each now lives once incommon/math.wgsl, andclouds/noise.wgslincludes it.number(). There is now one, intext.rs.gpu::test_gpu(). It makes devices one at a time, as does the GPU suite'srequest_gpu/request_gpu_within. Made at once from many test threads, the Vulkan loader, validation layer and driver on this machine crash or deadlock, which was the intermittent GPU test crash.all_entry_points_compilesays it catches every WGSL error, and the check for operators browsers reject walks the same list. Neither saw the three masked raster shaders used for alpha cutouts. They are on the list now, and a new test fails if a shader the renderer loads by name is ever left off it.docs/weather-effects.mdstill read as a plan for work not yet built, and named three files that never came to be.Nothing here runs differently per frame. The WGSL functions moved unchanged.
Verified
cargo test -p solstice-render --lib: 281 passed. GPU suite on the RTX 5080 (--test gpu): 92 passed, 1 ignored.raster_hw_masked.wgslfrom the list fails it.cargo test --workspace --releasepasses. fmt and clippy (-D warnings) are clean natively and for both wasm32 builds.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, nothing blocking. It checked:
common/math.wgsldefineshash4orremapalready;clouds/noise.wgslshares no names with it;Fixed from its points:
The scan test only sees shaders named by a literal. Its comment now says so, since
clouds/mod.rspasses one path in a variable.The moved functions left double blank lines behind.
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