-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Add powerPreference
preference #12533
#12753
Conversation
I had to move According to the spec:
Honestly I had hard time to figure out any difference on my machine I guess this parameter is taken into consideration for machine with multiple GPU? |
src/renderers/WebGL2Renderer.js
Outdated
_antialias = parameters.antialias !== undefined ? parameters.antialias : false, | ||
_premultipliedAlpha = parameters.premultipliedAlpha !== undefined ? parameters.premultipliedAlpha : true, | ||
_preserveDrawingBuffer = parameters.preserveDrawingBuffer !== undefined ? parameters.preserveDrawingBuffer : false, | ||
_powerPreference = parameters.powerPreference !== undefined ? parameters.powerPreference : 'default'; |
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.
Looks like some formatting issues...
src/renderers/WebGL2Renderer.js
Outdated
_antialias = parameters.antialias !== undefined ? parameters.antialias : false, | ||
_premultipliedAlpha = parameters.premultipliedAlpha !== undefined ? parameters.premultipliedAlpha : true, | ||
_preserveDrawingBuffer = parameters.preserveDrawingBuffer !== undefined ? parameters.preserveDrawingBuffer : false; | ||
_alpha = parameters.alpha !== undefined ? parameters.alpha : false, |
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.
Seems like there is a mix of spaces and tabs for indentation in these lines...
src/renderers/WebGL2Renderer.js
Outdated
@@ -36,9 +37,13 @@ function WebGL2Renderer( parameters ) { | |||
stencil: _stencil, | |||
antialias: _antialias, | |||
premultipliedAlpha: _premultipliedAlpha, | |||
preserveDrawingBuffer: _preserveDrawingBuffer | |||
preserveDrawingBuffer: _preserveDrawingBuffer, | |||
powerPreference: _powerPreference, |
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.
The comma at the end is not needed.
src/renderers/WebGLRenderer.js
Outdated
@@ -199,9 +200,13 @@ function WebGLRenderer( parameters ) { | |||
stencil: _stencil, | |||
antialias: _antialias, | |||
premultipliedAlpha: _premultipliedAlpha, | |||
preserveDrawingBuffer: _preserveDrawingBuffer | |||
preserveDrawingBuffer: _preserveDrawingBuffer, | |||
powerPreference: _powerPreference, |
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.
The comma at the end is not needed.
I don't understand... Do you mind giving more context? |
@mrdoob sorry for those silly indentations issues. From the spec: https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.2.1 A related issue: |
@mrdoob @Mugen87 |
And from your previous post:
@luruke So yes, i think the implementation is correct. |
Um, maybe we should add a comment. Something like: |
Perfect! |
Thanks! |
According to this bug in three.js, it must be done in this order. Doing the same here to avoid potential issues: mrdoob/three.js#12753
No description provided.