-
Notifications
You must be signed in to change notification settings - Fork 44
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
Make three.js bloom effect similar to Babylon.js #621
Comments
@elalish Any thoughts here? It looks like ThreeJS is blooming the clamped white color, not the original emission color. Is there a way to do otherwise? |
Interesting; I haven't played with three's bloom shader yet, but I would hazard a guess that perhaps tone mapping is being applied before the bloom pass instead of after? That might also explain why the right two cubes look almost the same. Perhaps it just isn't using a floating-point framebuffer for the intermediate draw, so all the values are getting clamped? @mrdoob in case he has any pointers. |
I used the following example as a reference for Bloom's implementation. https://threejs.org/examples/webgl_postprocessing_unreal_bloom.html However, I didn't know how to use toneMapping correctly, so now I use gltf-test/examples/threejs/index.js Lines 101 to 106 in a171346
|
Ah, that makes sense; without tone mapping you lose all this HDR info to clamping. One note: Using tone mapping is quite important for PBR rendering generally, not just for bloom. Take a look at my article. |
@elalish Thanks for all the advice. I'm experimenting with
|
I have created the following sample to facilitate comparison of the effects of Tonemapping and Bloom.
|
I have tried the same combination of tone mapping and Bloom in Babylon.js as well.
|
I'd say Babylon looks more like I'd expect here; this looks like enough info to file a bug on three.js, especially if you include a link to your code. ACES pulls bright colors toward white, but the fact that the whole bloom looks white makes me think it doesn't have the right shape of exponential fall-off in intensity. |
I added a bloom effect to the
three.js
sample.However, the display result is slightly different from
Babylon.js
.If possible, I would like to make adjustments so that the display results are the same.
Edit 2022-09-23
I fixed it because the link destination was localhost.
The text was updated successfully, but these errors were encountered: