fs2open.github.com icon indicating copy to clipboard operation
fs2open.github.com copied to clipboard

Enhanced Bloom

Open qazwsxal opened this issue 1 year ago • 7 comments

Hi there, I've gone and implemented the style of bloom in use in UE4/Unity first introduced by Sledgehammer games in Call of Duty: Advanced Warfare.

There's an extra tuneable parameter here, blur width, i.e. radius, which has been taken from https://www.froyok.fr/blog/2021-12-ue4-custom-bloom/, although I am open to change the implementation of this as it doesn't feel particularly intuitive at the moment, past about 0.5 it just seems to fade away into a flat whole-image update.

The key advantage to this approach is a big reduction in the amount of bloom shimmering/crawling. This is achieved through two methods:
Firstly, there is no longer any thresholding applied to the image before blooming. This is in line with modern practices for HDR renderers, and prevents pixels close to the bloom threshold from jittering between bloomed and not bloomed across frames.
Secondly, the standard mipmap box filter has been replaced with a custom downsampling filter that sledgehammer games designed to help alleviate these issues.

Performance wise, the sledgehammer implementation was targeted at the GTX 760 (recommended spec.). This implementation runs in 0.59ms on a RTX 3070. For comparison, the old bloom implementation runs in 0.37ms.

Draft Status

The PR is in draft status for 3 main reasons, the table entries aren't done yet, there needs to be a discussion on sensible defaults, and the width parameter might need some work.

  • [ ] Configuration with tables.
  • [ ] Choice of sensible defaults.
  • [ ] More intuitive width parameter?

That said, I'd like to get some feedback on how it is as-is, if it's worth changing the bloom_intensity command line parameter name completely rather than just repurposing it, where configuration should go, should it even be user controllable? etc.

qazwsxal avatar May 29 '23 11:05 qazwsxal