I have 2 questions about bloom effect.
The first is about the best way to incorporate a lens dirt texture. I thought it’s just a simple multiplication between with the lens dirt texture and the glow – but I’m not pleased with the results. Has anyone implemented it and can share the code / sample dirt texture?
Second, in my implementation, I take the output of the bright pass (passes only “bright spots”) and downsample by 2x2 recursively as following: bilinear sampling (simple 2x2 box filter) followed by a small Gaussian blur. I repeat this process 4 times, each round I use the output of the previous one, so the Gaussian width is effectively doubles every round. Then, I compose all the mipmaps with some weights onto the original image.
I noticed that even though I’m using a bilinear sampler, the higher octaves show blocky features. I wonder if I should upsample the mips recursively, but I’d like to avoid the upsampling costs and I thought that the linear sampler should be sufficient for the composition.
In the attached top image, I set all the mip weights to 1.0 and in the bottom one I show only the higher octave by setting all the other weights to 0.0 (In the image, I’m overdoing the effect for the sake of the example and showing only the glow image).