Repository navigation
Plug-in effects re-render at every frame time - #1996
Open
storybored379 wants to merge 2 commits into
Open
storybored379 wants to merge 2 commits into
storybored379 wants to merge 2 commits into
Conversation
Plug-in effects get the layer time in render, but the layer cache only put the time into its key for built-in effects listed as time-dependent, so a plug-in animating from `time` alone froze on its first frame. Treat every registered plug-in as time-dependent. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Member
|
Hi @storybored379, thanks for this PR! Most of the conflict comes from the shared module layout (#2491), which moved or split files this PR touches:
When you rebase, please also make sure it fits the other recent changes:
CI ( |
This branch has not been deployed
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.
A plug-in effect gets the layer time in
render(docs/plugins.md: "Time is layer time in seconds"), but the layer cache only folds the time into its key for effects listed inTIME_DEPENDENTor namedec.sim.*. Plug-in ids can't be either, so a plug-in that animates fromtimealone, with static parameters, was rendered once and that frame was reused at every other time.is_time_dependentnow also returns true for a registered plug-in id (newplugin::is_plugin, which reads the plug-in registry and tolerates a poisoned lock). Nothing tells the renderer whether a plug-in readstime, so this takes the safe default the issue suggests; an opt-out manifest flag could come later if caching static plug-ins matters.docs/plugins.mdsays so next to the time contract, and ROADMAP.md has a progress-log line.Validation:
crates/host/tests/plugins.rs::time_dependent_plugins_render_each_frameregisters a Rust plug-in that fills the frame with a grey equal totimeand renders at 0 s, 0.5 s and 0 s again. It fails on main (9db7f3b) with the frame at 0.5 s reusing the 0 s frame, and passes with the fix; the other three plug-in tests (including the example WebAssembly plug-in) still pass.--all-targets --release -D warnings), layers, assets and WASM checks pass.cargo test --workspace --release(LTO off, 16 codegen units): 3,599 passed / 80 failed / 31 ignored. 79 failures are GPU tests (no usable GPU on this Linux box: "the GPU renders the frame") plus two FFmpeg oracle tests (AC-3 downmix gain, Radiance HDR fixture); 77 of them are the same set an earlier run on (older) main hit on this machine, and the other two are GPU tests too. The last one,tests_auto::auto_backend_moves_light_comps_to_the_cpu, is timing-based and passes when rerun alone on the loaded box. None of them registers a plug-in.Fixes #1977 (the first problem it describes; the fuel/instance-pool note is separate).
Found and fixed with Claude Code (AI-assisted).
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Documentation
Tests