Why are Sprites which are transparent when rendered by WebGLRenderer opaque with SVGRenderer?
See original GitHub issueDescription
I wanted to export SVGs from three.js, so I switched everything over to be rendered by an SVGRenderer
:
// var renderer = new THREE.WebGLRenderer( { 'alpha':true, 'transparent':true } );
var renderer = new THREE.SVGRenderer( { 'alpha':true, 'transparent':true } );
However, all sprites are now opaque white, obscuring many other objects in the scene. Is this intentional? Shouldn’t sprites which were transparent when rendered by WebGLRenderer
still be transparent when rendered by SVGRenderer
?
Three.js version: r91
Browser: Chrome
OS: macOS
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
WebGLRenderer#alpha – three.js docs
The WebGL renderer displays your beautifully crafted scenes using WebGL. ... transparency rendering e.g. manually determining each object's rendering order.
Read more >Transparency of particles on webgl renderer - three.js
I'm using come particles with sprites, and then drawing some lines. Lines have a transparency and sprites has alpha channels.
Read more >three.js - npm
FaceColor support to CanvasRenderer and SVGRenderer . ... (alteredq); WebGLRenderer opaque pass now renders from front to back.
Read more >unity - How to understand when and where overdraw occurs
Because the blue sprite is partially transparent, the engine must treat the whole sprite as transparent (even the fully opaque pixels). The ...
Read more >Beginning WebGL for HTML5 - Springer Link
Rendering a Grid Mesh with One TRIANGLE_STRIP Call . ... values—and optionally an alpha value that stores the amount of transparency/opacity.
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
Yeah, it’s a limitation of SVGRenderer.
I’m not sure about this but if you can manage to render your text as
<text>
elements, you should be able to produce the desired result.https://developer.mozilla.org/en-US/docs/Web/SVG/Element/text