Repository navigation
65-visuals: fluid shader backgrounds (M2) + smoke/ink fluid layer and particle flow fields (M6) - #438
Merged
Merged
Conversation
… node, pattern nodes, compiler Background output + Pointer / Scroll / Aspect-correct UV (background stage only), and fBm, Domain warp, Mesh gradient, Metaballs, Smooth min, Film grain, Rotate for every stage that has a pixel. compileBackgroundGraphToIR emits a whole fragment shader for the layer material; preludeDeps hoists a shared helper once; TP_OCTAVE_CAP is the budget knob. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nter + scroll, budget tier, packs preset loader shaderGraphs['background'] (domain 'background') carries the layer settings, so wire, undo, saves and late join are inherited. Configure Scene ▸ Background + a Background tab in the shader editor. Fixes shaderGraphsSnapshot pruning post/background documents as orphans (a selection still carries none). e2e background-layer written, first run pending. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…Flow field / Swirl ribbon presets Divergence-free curl of a trigonometric potential with analytic derivatives, integrated in uFlowSteps midpoint steps (4; 2 on a headset or when the governor caps particles). Inspector Particles: Flow field / Swirl size / Field speed. e2e owed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…d yet) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…reens, a world panel in VR - fluidLayer.js: one shared FluidSim, stirred by the local pointer (or the VR controller rays) and an optional automatic stirrer. Look kind `fluid` (Stylize): its Effect steps the solver in update() and composites the dye (smoke adds light, ink mixes pigment). In a headset (no composer) the same entry becomes a panel ~3 m ahead under background-root, stepped from the Scene useTask with xr.enabled off for the passes. Nothing composited for 500 ms = no steps; 10 s = targets freed. - fluidLayerCore.js (pure): params normalize, the budget tiers (128/512/20 desktop, 96/384/14 at dpr <= 0.72, 64/256/8 phone/XR, none in XR once particles are capped), palettes, the auto stirrer, pointer -> splat. - fluidSim.js: fields declared for the checker. backgroundLayer: backgroundRootGroup(). - particleEntries() reports flow / flowSteps. debugHooks row fluidLayer. - tests: unit fluidLayer (15), e2e fluid-layer (desktop) + visuals-xr-iwer (Quest profile). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… frames) and visuals-two-peer (scene data shared, pointer/smoke local) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- background-layer 2.10 measured the built-in Soft gradient, which is still by design (it moves only with the pointer); it now applies Noise flow first, with a usesClock premise (backgroundLayerDebug reports usesClock). - fluid-layer 2.4: left-to-right strokes throw their own smoke rightwards (measured left 93.9 / right 144.8, the screenshot shows it); the strokes are vertical on the left now. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…) and 4.1 expects the preset 2.10 leaves (58/58) Co-Authored-By: Claude Opus 5.5 (1M context) <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.
Roadmap 65 M2 fluid shader backgrounds + M6 2D VFX (lane 65-visuals), into
feat/65. Packs half: theprototype-app/packs#20.What it adds
compileBackgroundGraphToIRbuilds the whole fragment shader.preludeDepsputs a shared GLSL helper in once, andTP_OCTAVE_CAPis the budget knob.backgroundLayer.js+ purebackgroundLayerCore.js):shaderGraphs['background'], so it rides the existing shader-graph sync, undo and the four save paths. No new wire message.backgroundPresets.js): readsPACKS_BASE/backgrounds/index.json(packs#20). Applying a preset COPIES its graph into the scene, so peers never need the CDN. One built-in preset (Soft gradient) means an offline build is never empty.fluidSim.js,fluidLayer.js, purefluidLayerCore.js):update()and composites the dye: smoke adds light, ink mixes pigment in.particleShader/Runtime/Presets,ParticleMotionRows): the curl of an analytic potential (divergence-free) integrated in 4 steps, or 2 in VR or under the particle cap. New configflow/flowScale/flowSpeed, presets Flow field and Swirl ribbon, and three Inspector rows.shaderGraphsSnapshot({pruneMissing})dropped every non-object key, so autosave and session saves silently lost every post graph (post:<id>). Pruning now applies to surface-domain keys only, andbuildSelectionPayloadkeeps surface documents only, so a prefab carries no look or background.Shared-file touch points (small, additive)
Scene.svelte: 2 imports, 2 useTask lines, 1<T.Group name="background-root">.Inspector.svelte: the section.debugHooks.js: 3 rows.shaderGraph.js:registerGraphDomain, the background domain in normalize, the prune fix.sessions.js: the selection filter.postGraphs.js: the domain.ShaderEditor.svelte: the tab.particleRuntime.js:particleEntriesreports flow.shaderCatalog/shaderCompile,particleShader/Presets,ParticleMotionRows.svelte.Proof
FPS rows (
tests/e2e/visuals-perf.cjsundere2e-slot --exclusive, Chromium uncapped:--disable-frame-rate-limit --disable-gpu-vsync; Deck GPU, RADV):* On the desktop the composer's last fullscreen pass is what
renderer.inforeports (the 37-fx note). Uncapped desktop frames are CPU-bound, so the rows sit inside the baseline's own spread. The Quest rows render directly: the sphere costs +0.5–0.8 ms and +4.4k triangles, and the panel +0.4 ms. Everything is far inside the Quest budget (≤ 150 calls, ≤ 300k tris, ≤ 13.9 ms). These are the Deck's GPU running the headset workload, a proxy rather than a Quest measurement.Unit:
tests/unit/backgroundGraph,backgroundLayer,fluidLayer: 41 pass.Node:
background-presets(every packs file loads, compiles and passes glslangValidator at both tiers),shader-compile,shader-node-docs(the docs-table half SKIPS here: no docs checkout). The 19 fluid shaders also pass glslangValidator.New e2e:
background-layerfluid-layervisuals-xr-iwervisuals-two-peerRegression battery: shader-graph 67, shader-persist 19, shader-post-domain 48, shader-editor 66, shader-window 40, shader-sync 20 (two-peer), post-backends 21, particles 17, particles-fx 20, save-as-formats 39, session-scene-data 27. All pass.
A/B against v1.41.0, same remote browser:
Checks:
npm run buildpasses; check-ratchet 299/39 = baseline; check-tokens, check-storage and check-zindex are clean.For the integrator
format-1and purge jsDelivr forbackgrounds/*, then check each file's content. Until then the section offers only the built-in preset, with a Retry line.docs-fragment.md.shader-node-docswill compare the node table once the docs checkout is present.backgroundLayer.setBackgroundScroll(progress|null)drives the Scroll input from a scroll-hero page.🤖 Generated with Claude Code