Hi, I'd like to implment bloom with a different amout of blurring per object.
All the tutorials about bloom I found are global, they just render all the blooming objects in one RT, apply the same amount of blur to them and add to the original image.
Let's say I have a laser and a pistol, but the laser makes much more light than the pistol when shooting, so I want the laser to have much stronger bloom effect.
If I have lot of these different glowing objects, what is a good way to solve this problem?
Since the bloom effect can be quite large I'd like to do the bluring not in single/vert/horz pass, but iteratively via Kawase Bloom.
I was thinking about smth. like this.:
1. render objects and write the bloom strength in a stencil buffer (let's say strength can be integer from 1 to 10)
2. blur pixel with the Kawase 4 pixel kernels, but use only pixels that have stencil bigger than 1
3. write blurred value and find maximum stencil strength of the pixels used in kernel, decrease it by 1 and write to stencil
4. repeat from step 2, until some max limit (let's say 10)
But I still see some potential issues, not sure if this would work, does anybody have an idea how to do different amount of glow per object?
I don't care about the correctnes, I'm more interested in performance.