Unreal Bloom and Renderer Transparency issue
See original GitHub issueDescription of the problem
I am currently using the Unreal Bloom post with a transparent renderer.
renderer = new THREE.WebGLRenderer({ alpha: true });
renderer.setClearColor(0xFF0000, 0);
Unfortunately, the Unreal Bloom pass doesn’t seem to take in account the alpha channel of the coming texture when doing the blur and it apparently comes from getSeperableBlurMaterial
in js\postprocessing\UnrealBloomPass.js.
The fragment’s alpha channel is always set to 1.0 which results in a complete removal of the previous alpha values when doing the additive blending at the end.
This is happening in the latest version of Three.js r92 and you can experiment about this issue using the Unreal Bloom example
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:55 (9 by maintainers)
Top Results From Across the Web
UnrealBloomPass makes background black - three.js forum
UnrealBloomPass does not support transparent backgrounds since the result is incorrect. The bloom does not blend correctly with the HTML and ...
Read more >Bloom shaft problem - Rendering - Unreal Engine Forums
What you're looking at is a transparency sorting issue, where Unreal isn't sure where the windows are drawn in the scene in relation...
Read more >ThreeJS- Adding bloom pass affects canvas transparency
First remark, bloomPass. exposure is useless, there is no exposure param in UnrealBloomPass code github.com/mrdoob/three.js/blob/master/ ...
Read more >Can't Seem to Render Scene with Transparent Background
I've run into an issue trying to remove the background to a scene or setting it to be transparent. This is the CodePen...
Read more >Three.js: Unreal Bloom Postprocessing - 8th Wall
js camera pipeline module that renders the Three.js scene with transparency and uses a shader to combine the scene with the camera feed...
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
Tidy things up a bit and it seems to work just as well:
I’ve noticed some little (single pixel) artefacts that appear once in a while but seem to be random or based on something that only occurs on some frames as they disappear on the next frame. Not sure if it’s caused by the changes I made or something unrelated to this issue.
I’ve created a full example. Thanks to help from: https://github.com/mrdoob/three.js/issues/14104#issuecomment-429664412
Disclaimer it’s in typescript: