WebGLRenderer - use alpha: true by default
See original GitHub issueDescribe the bug
As shown in the docs here, the WebGLRenderer has alpha: false
by default. But also in the same page there is a list to WebGL best practices from MDN which has a section specifically saying to avoid alpha: false.
It looks like this decision was originally made in #1104 and maybe should be re-evaluated.
To Reproduce
N/A
Code
N/A
Live example
N/A
Expected behavior
The WebGLRenderer should use the most optimized/recommended settings by default.
Screenshots
N/A
Platform:
N/A
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:13 (6 by maintainers)
Top Results From Across the Web
WebGLRenderer#alpha – three.js docs
Default is true . logarithmicDepthBuffer - whether to use a logarithmic depth buffer. It may be necessary to use this if dealing with...
Read more >WebGL and Alpha
The default is true. Of course the result will still be composited over the page with whatever background color ends up being under...
Read more >true to have transparent background in Three.js - Stack Overflow
Code for settings, if i remove the alpha: true, the problem goes. renderer = new THREE.WebGLRenderer( { alpha: true } ); renderer.
Read more >WebGLRenderer( parameters )
canvas — A Canvas where the renderer draws its output. precision — shader precision. Can be "highp", "mediump" or "lowp". alpha — Boolean,...
Read more >How to use the three.WebGLRenderer function in three - Snyk
createRenderer() { // Create the renderer and set some defaults. this.renderer = new THREE.WebGLRenderer({ antialias: true }); this.renderer.alpha = true; ...
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
At least it is not possible with WebGPU 😁 .
Related Chromium issue: https://crbug.com/1103485