WebGPURenderer: multiple canvas support#27628
Conversation
|
The API feels amazing!! |
| } | ||
|
|
||
| getDrawingBufferSize( target ) { | ||
| getActivePixelRatio() { |
There was a problem hiding this comment.
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.
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 |
|
It would be great if this could be merged for the next release. Thanks everyone! |
|
Any progress on this PR being merged? |
|
Closing in favor of #31919 |
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?