Repository navigation
Effects: CC Particle World replaces the layer instead of compositing over it (#839) - #1117
Closed
redonion23 wants to merge 1 commit into
Closed
redonion23 wants to merge 1 commit into
redonion23 wants to merge 1 commit into
Conversation
…over it (storytold#839) CC Particle World drew its particles over the layer's own pixels, so a solid it was applied to stayed opaque and hid the layers below. As in After Effects, the particles now replace the layer in every Transfer Mode (Add still accumulates them), and before anything is born the layer is transparent. The GPU compositor follows the same plan. Re-pins the CC Particle World golden hashes that this platform computes identically to aarch64 macOS; 14 32-bpc entries still need re-pinning there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Thank you for this, @redonion23! #1111 landed in the same batch and fixes CC Particle World as well, together with CC Particle Systems II and the Time effects, so it supersedes this PR. If your unit test covers something #1111's tests don't, a small follow-up PR adding just that test would be welcome. Closing this one as superseded. If you are not on our Discord yet, please join us: https://discord.gg/artcraft |
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.
Fixes #839
Cause
particle_world_plan(crates/effects/src/sim.rs) sharedparticle_spriteswith CC Particle Systems II, which maps Transfer Mode toPost::Combine: Composite drew the particles over the layer's own pixels. On a solid (the usual set-up) the layer stayed opaque and hid everything below. Before the first particle was born the plan wasNone, so the solid showed unchanged.Fix
CC Particle World's plan now always uses
Post::Replace: the particles replace the layer in every Transfer Mode (Add still accumulates particles withAcc::Add), and the unborn case is an empty plan, i.e. a transparent layer. The GPU compositor reads the sameSpritePlan, so both paths change together. CC Particle Systems II is left as it was.Tests
sim::tests::particle_world_replaces_the_layer: an opaque black solid in each of the four Transfer Modes leaves transparent pixels between the particles, and the unborn layer is fully transparent. It fails one2f314f7(mode 0: transparent between particles) and passes with the fix.effectcraft-clion Windows 11 (aarch64): red solid below, black solid + CC Particle World (defaults) above,render-frame --time 1 --transparent. Before, 0 red pixels were visible. After, the red layer shows around the particles. Without the lower layer, the output is transparent (min alpha 0).cargo xtask cion Windows 11 aarch64: fmt, clippy, layers, assets and wasm pass.cargo test --workspace --release --no-fail-fasthas six failures, and all six fail the same way on unmodifiede2f314f7. Two assert Windows paths (\?\prefix / absolute script path):effectcraft-clirender_out_is_relative_to_the_working_directoryandeffectcraft-scriptincludes_are_inlined_relative_to_the_script. Four are GPU oracle tests on this adapter:tests_fx_lut::ocio_file_transform,tests_fx_noise::{dust_threshold_on_quantized_input, medians}andtests_fx_stylize::posterize_thresholds_strobe_vignette.Known limits
particle_golden.rs(asserted on aarch64 macOS only): I re-pinned the 54 changed CC Particle World hashes whose pre-change value this machine reproduces exactly. The 14 32-bpc entries this platform already computed differently before the change (libm) still hold the old values and needSIM_GOLDEN_PRINT=1on aarch64 macOS:ccparticleworld/{0/32bpc/t2.2, 1/32bpc/t1.5, 2/32bpc/t0.5, 2/32bpc/t0.8, 2/32bpc/t2.2, 5/32bpc/t2.2, 6/32bpc/t0.5, 6/32bpc/t0.8, 6/32bpc/t2.2, 7/32bpc/t0.5, 7/32bpc/t0.8, 7/32bpc/t2.2, 8/32bpc/t1.5, 8/32bpc/t2.2}.Acchas Over and Add only). Same as before for Black Matte.Prepared with AI assistance (Claude Code).
🤖 Generated with Claude Code