Do not default to alpha = false when creating WebGL context
See original GitHub issueI was trying to find a specific bottleneck in my PixiJS application and I found out that creating the context on my own made a HUGE difference (25-30 ➡️ 60 FPS on a 4K monitor). The difference was that I enabled alpha alpha: true
when creating the WebGL context.
PixiJS defaults to alpha: false
if the transparent
option is not passed:
Evidence of this being a performance bottleneck
- https://bugs.chromium.org/p/chromium/issues/detail?id=1045643
- https://github.com/mrdoob/three.js/issues/18338#issuecomment-572531584
- https://bugs.chromium.org/p/chromium/issues/detail?id=1103485
Maybe we want to reevaluate whether transparent = false
by default?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Do not default to alpha = false when creating WebGL context
I was trying to find a specific bottleneck in my PixiJS application and I found out that creating the context on my own...
Read more >WebGL and Alpha
The default is true. ... A really good way to find if you have any alpha problems is to set the canvas's background...
Read more >How to fix crossbrowser issue with alpha blendmode in webgl ...
in clearCanvas you clear the alpha to one and then turn off rendering to alpha but because preserveDrawingBuffer is false (the default) the ......
Read more >607130 - WebGL context with alpha=false performs ... - Monorail
Issue 607130: WebGL context with alpha=false performs worse than context with alpha=true on OS X. ... What is the expected behavior? Both pages ......
Read more >WebGLRenderingContext.getContextAttributes() - Web APIs
The WebGLRenderingContext.getContextAttributes() method returns a WebGLContextAttributes object that contains the actual context parameters.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bigtimebuddy Maybe a v6 milestone?
Sure. I’ll do it over this weekend.