-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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: multiple canvas support #27628
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.
|
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?