Jump to content

Bloom post effect using an alpha compositing mode other than "ADD"


Recommended Posts

The default bloom post process extracts all pixels brighter than a threshold, blurs that image, and overlays it onto the original render. The problem is that it simply adds the RGB values of the 2 images together, resulting in already bright areas becoming way too bright. I want to use BABYLON.Engine.ALPHA_MAXIMIZED as the blend mode for bloom. How do I do that? Do I need to write a whole new bloom shader from scratch?

Link to comment
Share on other sites


The code is all in the mergeBloom.fragment.fx file:

gl_FragColor.rgb = gl_FragColor.rgb + (blurred.rgb * bloomWeight);
We could think of adding more mode configurtaion in the bloomEffect that we would also make available until the DefaultRenderingPipeline. 
Would you like to create the Pull Request or woud you prefer to just share the technique and formula you would like to use ?
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...