Skip to content

[codex] Add WebGL renderer benchmark comparison - #164

Draft
meekmachine wants to merge 1 commit into
codex/webgpu-renderer-benchmarkfrom
codex/webgl-renderer-benchmark
Draft

[codex] Add WebGL renderer benchmark comparison#164
meekmachine wants to merge 1 commit into
codex/webgpu-renderer-benchmarkfrom
codex/webgl-renderer-benchmark

Conversation

@meekmachine

Copy link
Copy Markdown
Owner

Summary

Adds a WebGL renderer benchmark page that uses the same shared procedural Loom3 benchmark harness added in #163.

This is stacked on #163 intentionally, so this PR's diff is only the comparison layer:

  • npm run benchmark:webgl
  • examples/webgl-benchmark/index.html
  • examples/webgl-benchmark/main.js
  • README update documenting both renderer benchmark commands

The result shape matches the WebGPU benchmark exactly and writes to the browser console plus window.__loom3BenchmarkResult.

How to run

npm run benchmark:webgl

Open the printed local URL and inspect the browser console.

Validation

  • npm test passed: 28 files, 179 tests.
  • npm run build passed.
  • npm run typecheck passed.
  • Browser smoke via Chrome remote debugging passed against http://localhost:4173/examples/webgl-benchmark/.

Smoke result excerpt:

{
  "renderer": "WebGLRenderer",
  "threeRevision": "170",
  "rendererFlags": {
    "isWebGPURenderer": false,
    "isWebGLRenderer": true,
    "backend": null
  },
  "setup": {
    "hairRegistrationCount": 1,
    "morphMeshCount": 2
  },
  "submitMs": {
    "avg": 0.2,
    "p95": 0.3,
    "p99": 0.4
  },
  "approximateFpsFromRaf": 71.978
}

Notes

Because this PR targets #163's branch, checking out this top branch gives both benchmark commands for side-by-side browser-console comparison.

@meekmachine

Copy link
Copy Markdown
Owner Author

PR backlog triage — DRAFT_KEEP (stacked on #163)

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