-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
WebGPURenderer: multiple canvas support #27628
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
base: dev
Are you sure you want to change the base?
Conversation
The API feels amazing!! |
|
||
} | ||
|
||
getDrawingBufferSize( target ) { | ||
getActivePixelRatio() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to introduce all the getActive*()
methods? Could getPixelRatio()
just work like so:
- Report the pixel ratio of the default canvas render target.
- If a custom canvas render target is set, return its values instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered that but was worried about altering the behaviour of those methods, happy to do that instead though, or add a method to getActiveCanvasTarget() for use within the Node classes.
666bb55
to
20df00c
Compare
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
Hi there! First of all, thank you for working on this valuable feature. This enhancement is critically important to our product as it addresses ["real-time 3D visualization in medical imaging scenarios"] which is core to our user workflow. Would it be possible to prioritize reviewing/merging this PR for the upcoming [r177]? We'd be happy to help with testing, provide additional use case details, or support in any way that could accelerate the process. Really looking forward to leveraging this improvement! 🙌 |
Any progress on this PR being merged? |
Could you please give this PR some attention and help merged the PR? @mrdoob |
This introduces a CanvasRenderTarget() to represent a screen canvas, which can be used via renderer.setRenderTarget() for use with WebGPU, thus supporting multiple canvases.
The default screen canvas state in Renderer() is replaced by a CanvasRenderTarget(). - this may be too much code change?