mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-14 19:27:05 -04:00
Cause: CC Particle World projected its particles through a fixed camera (distance 2 layer widths, looking at the layer centre) and never asked the host for the comp camera, so moving or orbiting a camera layer left the particles flat on the layer. It also had no Extras > Effect Camera. Separately, the layer cache key ignored the comp camera and lights, so the effects that read them (Card Dance / Shatter / Card Wipe Comp Camera, First Comp Light, Caustics) kept a stale frame when the camera, a light or the layer moved. Fix: as the Cycore manual describes, Particle World sees its particles through the comp's active camera layer when there is one (EffectHost::comp_scene now says whether its camera is a camera layer's, CompScene::camera_layer), through card3d's comp-camera projection (factored out of Card Dance as comp_proj, with Proj::view for depth, size scale and screen velocity). Otherwise it uses the new Extras > Effect Camera: Distance (2), Rotation X / Y / Z (0) and FOV (50) orbit the world origin; FOV moves the camera so the origin's plane keeps the scale Distance gives it, so the defaults reproduce the old fixed camera bit for bit (golden hashes unchanged) and old projects render as before. The Effect Camera is left out of the simulation cache key, so animating it doesn't restart the simulation. The plan is shared, so the GPU compositor follows too. The layer cache folds the comp scene into the key of layers running an effect in effects::READS_COMP_SCENE (render::comp_scene is shared with the host). Tests: sim particle_world_follows_the_comp_camera (panning a camera layer moves the particles, zooming spreads them, the Effect Camera is ignored then, the default view keeps the Effect Camera, cameras facing away / zero / NaN draw nothing) and particle_world_effect_camera (missing params = defaults, rotation, distance and FOV change the view, extremes stay finite, the sim key ignores the camera); render particle_world_follows_the_comp_camera (a real camera layer panned 40 px moves the particles left, and the cached render after the move equals an uncached one: it failed with the old cache key); gpu particle_world_through_the_comp_camera (CPU vs GPU at 8 / 32 bpc, full and half resolution). particle_golden / sim_golden unchanged. effects.md regenerated; parity.md and gaps.md describe the fix. Co-Authored-By: Claude Opus 5.5 <[email protected]>