Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGPURenderer: Add snapshot facility, record scene pass as a RenderBundle for reuse, #26983

Closed
wants to merge 1 commit into from

Conversation

aardgoose
Copy link
Contributor

Related issue: #26876

First pass at a snapshot facility for comment. Only lightly tested.

Adds:

renderer.createSnapshot() which instructs the next call to renderer.render() to save the render pass as a bundle for reuse.
renderer.destroySnapshot() which removes a snapshot if present.

TODO:

This assumes rendering to screen only, snapshot needs attaching to renderContextData rather than the backend.

@github-actions
Copy link

github-actions bot commented Oct 28, 2023

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
652.4 kB (161.7 kB) 652.5 kB (161.7 kB) +15 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
445 kB (107.7 kB) 445.1 kB (107.7 kB) +15 B

@@ -60,9 +63,11 @@
scene = new THREE.Scene();
scene.fogNode = rangeFog( color( 0x0000ff ), 1500, 2100 );

// enable static mode
scene.false = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be scene.static = true ?

@aardgoose
Copy link
Contributor Author

obsolete

@aardgoose aardgoose deleted the snapshot branch June 15, 2024 15:00
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.

None yet

2 participants