-
-
Notifications
You must be signed in to change notification settings - Fork 36k
PassNode: Provide viewport and scissor API. #31390
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
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
this._layers = null; | ||
|
||
/** | ||
* Scales the resolution of the internal render taregt. |
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.
Nit: taregt > target
* @type {?Vector4} | ||
* @default null | ||
*/ | ||
this._customViewport = null; |
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.
How about just this._viewport = null;
?
If it's null
it just uses the renderer one.
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've fixed the typo and renamed the properties but the fallback to the renderer viewport and scissor needs a bit more though.
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.
Thanks!
* @type {?Vector4} | ||
* @default null | ||
*/ | ||
this._customScissor = null; |
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.
How about just this._scissor = null;
?
If it's null
it just uses the renderer one.
Fixed #31387
Description
It is currently not possible to define a custom viewport and scissor box when using
pass()
. The PR introducessetViewport()
andsetScissor()
for custom value definition.So in #31387, the OP must use below code in the render loop: