Skip to content

feat(registry): eight more WebGPU shader backgrounds, from blob to fractal noise - #5192

Open
miguel-heygen wants to merge 6 commits into
feat/registry-shaders-30from
feat/registry-shaders2
Open

miguel-heygen wants to merge 6 commits into
feat/registry-shaders-30from
feat/registry-shaders2

Conversation

@miguel-heygen

@miguel-heygen miguel-heygen commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

What

Eight more 2-second WebGPU background blocks from the MIT Shaders library (shaders@4.0.0), used with their default settings: Blob, Swirl, Lens Flare, Waveform, Goo, Holographic, Sine Wave and Fractal Noise. They show up in Desktop's Shaders section with no Desktop change.

Stacked on #5191, which adds the shared bundle with all thirty new shaders; this merges after it.

How

  • Each block is the Godrays block with its name and data-shader changed: 1920x1080, data-requires-webgpu, tags webgpu and webgpu-shader, license Apache-2.0 AND MIT.
  • lib/ is a byte copy of feat(registry): eight more WebGPU shader backgrounds and a bundle with thirty new shaders #5191's bundle and third-party license file. This PR does not rebuild or edit the bundle.
  • preview.video points at the docs CDN; there is no poster. Catalog pages for all thirty come in one docs PR after the four block PRs merge.

Verification

  • Seek order. For every block, t = 1.5 s is pixel-identical whether reached from 0, from 1.9 s, or in steps (0, 0.25, 1.0, 1.5). Frames at 1.0 and 1.75 s differ, so the check is not vacuous. The same check flagged Chevron, the original pick for this group, as a still image (its default speed is 0); Sine Wave replaced it.
  • Render matches preview. The rendered frame at t = 1 s (24 fps, frame 25) is pixel-identical to the browser seeking the block to t = 1 s, for all eight; the frame before it differs.
  • No GPU. On a GPU-less Linux host with the software WebGPU opt-in (feat(engine): render WebGPU compositions on SwiftShader behind an opt-in #5133), each block renders the same frames as on Metal (mean difference about 0, largest single pixel 10/255) at 0, 1 and 1.5 s. Each takes 3 to 8 s for 4 frames.
  • Previews are hyperframes render of each block at 24 fps, encoded like the existing six (1280x720, H.264 High). They go to the docs CDN together with the other new blocks' previews.
  • Bundle tests. feat(registry): eight more WebGPU shader backgrounds and a bundle with thirty new shaders #5191's registryBlocks.test.ts (every shader block ships the same lib/ and names a shader in the bundle) passes with these eight, three runs in a row. Renaming one block's shader or changing one byte of one block's bundle each fail it.
  • hyperframes check: 0 errors and 0 warnings on each block.
  • Source-only. node scripts/check-catalog-source-pr.mjs against feat(registry): eight more WebGPU shader backgrounds and a bundle with thirty new shaders #5191's branch passes; oxfmt --check passes.

Limits

Same as #5138: one shader block per page, the shader runs on the film's time, and a host without a GPU renders these only with the software WebGPU opt-in.

@miguel-heygen
miguel-heygen force-pushed the feat/registry-shaders2 branch 2 times, most recently from 3ca6c8a to 00fdbf9 Compare October 8, 2026 08:19
@miguel-heygen
miguel-heygen force-pushed the feat/registry-shaders2 branch from 00fdbf9 to b076e0a Compare October 8, 2026 08:38
@miguel-heygen
miguel-heygen force-pushed the feat/registry-shaders-30 branch from 8be63b4 to 38814cc Compare October 8, 2026 15:17
…eat/registry-shaders2

# Conflicts:
#	registry/blocks/aurora/lib/shaders.iife.js
#	registry/blocks/flowing-gradient/lib/shaders.iife.js
#	registry/blocks/frost/lib/shaders.iife.js
#	registry/blocks/godrays/lib/shaders.iife.js
#	registry/blocks/godrays/source/build.mjs
#	registry/blocks/liquid-metal/lib/shaders.iife.js
#	registry/blocks/marble/lib/shaders.iife.js
#	registry/blocks/mesh-gradient/lib/shaders.iife.js
#	registry/blocks/nebula/lib/shaders.iife.js
#	registry/blocks/plasma/lib/shaders.iife.js
#	registry/blocks/prism/lib/shaders.iife.js
#	registry/blocks/strands/lib/shaders.iife.js
#	registry/blocks/stripes/lib/shaders.iife.js
#	registry/blocks/voronoi/lib/shaders.iife.js
#	registry/blocks/water/lib/shaders.iife.js
@miguel-heygen
miguel-heygen marked this pull request as ready for review October 8, 2026 15:26

@somanshreddy somanshreddy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 1b130425, the delta over #5191 (fcd2add8). No blockers.

Checked:

  • Bundle: in all eight blocks, lib/shaders.iife.js and lib/shaders.THIRD-PARTY-LICENSES.txt are byte-identical to the bundle the existing shader blocks ship on #5191 (sha256 6ad60b5f… / ace6fbd1…).
  • HTML: each block's HTML differs from godrays.html in exactly three places: the composition id in the CSS selector, data-composition-id, and data-shader.
  • Shader names: all eight data-shader names (Blob, Swirl, LensFlare, Waveform, Goo, Holographic, SineWave, FractalNoise) appear in the bundle.
  • Registry items: each registry-item.json differs from Godrays only in name, title, description, tags, file path/target and the preview URL. All eight preview MP4s on static.heygen.ai return 200.
  • Catalog: registry/registry.json doesn't list them, but it's generated (catalog-generated-paths.mjs), and Godrays is listed while the other #5191 shader blocks aren't either. So that's consistent with a source-only PR.

Tests: registryBlocks.test.ts + validation.test.ts 9/9. Two mutants, both caught by registryBlocks.test.ts:

  • renaming Blob's data-shader to a name not in the bundle;
  • appending one byte to Goo's bundle.

Not checked: I didn't re-run the seek-order, render-vs-preview or software-WebGPU frame checks. I'm relying on the body's results for those.

CI: at this head, 6 checks succeeded and 4 were skipped. That's because it's stacked on feat/registry-shaders-30, so the full main matrix runs on #5191, not here.

— Somu

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants