Skip to content

vat: website demo tabs + MultiMesh perf comparison + web build fixes - #644

Merged
fernandotonon merged 2 commits into
masterfrom
vat/demo-website
May 20, 2026
Merged

vat: website demo tabs + MultiMesh perf comparison + web build fixes#644
fernandotonon merged 2 commits into
masterfrom
vat/demo-website

Conversation

@fernandotonon

Copy link
Copy Markdown
Owner

Summary

Builds on PR #640 (which landed the OpenVAT bake pipeline + Godot harness).
This patch wires the demo into the marketing site as three browser-runnable
tabs
so visitors can compare the techniques side-by-side without leaving
the homepage.

Tab Scene What it shows
Showcase demo_web.tscn One VAT dancer + orbit camera — the canonical OpenVAT replay
1000× VAT demo_perf_vat.tscn MultiMeshInstance3D + INSTANCE_CUSTOM per-instance frame phase
1000× skeletal demo_perf_skeleton.tscn 1000 SkinnedMeshRenderer clones — the "best practice" baseline

Local numbers (M2 Max, ProMotion 120 Hz, vsync OFF):

1000× VAT       ~480 FPS  (1 draw call per surface × N)
1000× skeletal  ~ 80 FPS  (per-instance bone-matrix upload + skin)

Notable fixes shipped here

  • Web build couldn't find the dancer. Raw .gltf / .png aren't
    bundled in Godot's .pck — only the imported .scn / .ctex.
    VATInstance.gd and both perf spawners now go through load("res://...")
    so resources resolve inside the web sandbox.
  • VAT perf demo was slower than skeletal because every instance had
    its own ShaderMaterial. Switched to one shared MultiMesh + per-
    instance phase via INSTANCE_CUSTOM.r — one draw call per surface
    instead of N.
  • Vsync now off at project level (window/vsync/vsync_mode=0). On
    macOS Metal the runtime DisplayServer.window_set_vsync_mode call
    alone is too late: Metal binds vsync at window creation, before any
    GDScript runs.
  • Single Godot web export with URL-based scene routing (?scene=web|perf_vat|perf_skeleton)
    via a tiny Bootstrap.gd entry — avoids shipping 3× the 36 MB WASM
    in website/public/demo/.

Frontend

  • New <VATDemo> React component with tab switcher (proper role="tablist"
    • keyboard nav) and per-tab captions explaining what the visitor is
      looking at.
  • Drops the old static screenshot block from App.jsx / App.module.css.

Test plan

  • cd website && npm run build produces a clean static bundle with public/demo/ copied through
  • Embedded iframe loads index.html?scene=web and animates the Rumba dancer
  • Tab switches to perf_vat → grid of 1000 dancers, FPS overlay shows headroom > display refresh
  • Tab switches to perf_skeleton → identical grid, FPS overlay shows the skinned baseline
  • Cross-browser smoke (Chrome / Safari / Firefox) on a deployed preview

🤖 Generated with Claude Code

Builds on PR #640 (which landed the bake/harness pipeline). This patch
wires the demo into the marketing site as three browser-runnable tabs:

  - "Showcase"      single VAT dancer + orbit camera
  - "1000× VAT"     MultiMeshInstance3D + INSTANCE_CUSTOM frame phase
  - "1000× skeletal" 1000 SkinnedMeshRenderer clones (cached PackedScene)

Notable fixes:

  - Web export couldn't find the dancer (raw .gltf/.png aren't bundled
    in the Godot .pck — only imported .scn/.ctex). VATInstance.gd and
    both perf spawners now go through `load("res://...")` so resources
    resolve in the web sandbox.
  - VAT perf demo was slower than skeletal because every instance had
    its own ShaderMaterial. Switched to a single MultiMesh + per-
    instance phase via INSTANCE_CUSTOM — one draw call per surface
    instead of N.
  - Vsync now off at project level (`window/vsync/vsync_mode=0`) — on
    macOS Metal the runtime DisplayServer call alone is too late.
  - Single Godot web export with URL-based scene routing
    (`?scene=web|perf_vat|perf_skeleton`) via a Bootstrap.gd entry —
    avoids 3× the 36 MB WASM in `website/public/demo/`.

Frontend:

  - New <VATDemo> React component with tab switcher (a11y roles +
    keyboard nav) and per-tab captions explaining what the visitor
    is looking at.
  - Drops the old static screenshot block from App.jsx / App.module.css.
@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@fernandotonon has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 46 minutes and 12 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 93c351ba-1943-49fb-be0c-0d99e2f617e5

📥 Commits

Reviewing files that changed from the base of the PR and between 20f1ec8 and 80af01c.

📒 Files selected for processing (12)
  • tools/godot-vat-demo/project.godot
  • tools/godot-vat-demo/scenes/bootstrap.tscn
  • tools/godot-vat-demo/scripts/Bootstrap.gd
  • tools/godot-vat-demo/scripts/PerfSpawnerSkeleton.gd
  • tools/godot-vat-demo/scripts/PerfSpawnerVAT.gd
  • tools/godot-vat-demo/scripts/VATInstance.gd
  • website/public/demo/index.html
  • website/public/demo/index.pck
  • website/src/App.jsx
  • website/src/App.module.css
  • website/src/components/VATDemo.jsx
  • website/src/components/VATDemo.module.css
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch vat/demo-website

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 925050c619

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread website/src/components/VATDemo.jsx Outdated
Comment on lines +57 to +63
<div className={styles.tabs} role="tablist" aria-label="VAT demo selector">
{TABS.map((t) => (
<button
key={t.id}
type="button"
role="tab"
aria-selected={tab.id === t.id}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Implement real ARIA tab behavior for demo tabs

This introduces role="tablist"/role="tab" semantics without the expected tab pattern wiring (aria-controls/tabpanel relationship and keyboard interaction such as arrow-key navigation with roving focus), so assistive tech users get a widget that is announced as tabs but does not behave like one. In practice this makes keyboard and screen-reader navigation inconsistent and can block users from understanding which panel is controlled by each tab.

Useful? React with 👍 / 👎.

Codex flagged that the tablist/tab semantics on <VATDemo> weren't
backed by the rest of the ARIA tab pattern. Added:

  - aria-controls + aria-labelledby wiring between each tab button
    and its panel, with stable id="vat-tab-<id>" / "vat-panel-<id>"
  - role="tabpanel" on the iframe wrapper
  - Roving tabIndex (the active tab is the only one in the tab
    order; others are -1)
  - Arrow-key navigation: Left/Right cycle, Home/End jump to
    ends — focus follows selection, matching the WAI-ARIA "tabs
    with automatic activation" pattern
@sonarqubecloud

Copy link
Copy Markdown

@fernandotonon
fernandotonon merged commit 045debe into master May 20, 2026
20 checks passed
@fernandotonon
fernandotonon deleted the vat/demo-website branch May 20, 2026 16:06
fernandotonon added a commit that referenced this pull request May 20, 2026
Bumps the project version to 3.3.0 in CMakeLists.txt (single source
of truth — sync-doc-versions-from-cmake.sh propagates to README and
the website's pinned action ref). The 3.x.y → 3.3.0 minor bump
reflects the VAT pipeline (PRs #640 / #644 / #646 / #647 landing
together):

  - `qtmesh vat <file> --anim <name> -o <dir>` CLI subcommand
  - OpenVAT-format 16-bit position+normal bake
  - Vertex-order-aligned source.gltf + Ogre bind sidecar so engine
    importers can realign UV2 to the bake's column order
  - Drop-in shader templates for Godot/Unity/Unreal at
    tools/vat-shaders/
  - Live website demo at /#vat-demo (Showcase + 1000× VAT vs
    1000× skeletal perf comparison)

Website updates:

  - Deep-linking to any section (e.g. `/#vat-demo`, `/#install`,
    `/#cli`) now works on both initial load (React-mount-aware
    scroll-into-view via requestAnimationFrame) and during
    in-session hashchanges (smooth scroll).
  - Each Section title gains a hover-visible `#` anchor link so
    visitors can grab a shareable URL without dev-tools.
  - New "VAT" tab on the home page's CLI examples panel with a
    full `qtmesh vat` command demo.
  - New `cmd-vat` reference section in the docs (synopsis,
    options, examples, sidebar entry).
  - `scroll-behavior: smooth` + `scroll-margin-top: 1.5rem` on
    `section[id]` so anchor-scroll lands with breathing room
    rather than flush against the viewport top edge.
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.

1 participant