Change in Convolution Bloom Strength after Resizing Editor Viewport or Changing r.ScreenPercentage

I’d like to report a bug that we found in the local exposure pass that is part of convolution bloom (probably also a bug in general, not just for bloom). We noticed that the bloom strength changed after resizing the editor viewport or changing the internal render resolution (r.screenpercentage, not r.bloom.screenpercentage).

When you reduce the viewport size, UE will sometimes just use a smaller viewport but keep the render target size the same (sorry, I had to pixelize the image on the left):

[Image Removed]

PostProcessLocalExposure.usf uses the output size instead of the viewport size to calculate the UV coordinate for the LumBilateralGrid 3D-texture, so you’ll get a vastly different result when the output size is larger than the viewport size. The LumBilateralGrid looked identical for both cases, so I’m assuming that its UV coordinate shouldn’t depend on the output render target size.

[Image Removed]

This can simply be fixed by changing Output_ExtentInverse to Output_ViewportSizeInverse.

We are still on UE 5.6 but the 5.7 source on Github looks the same.

[Attachment Removed]

Steps to Reproduce
I haven’t tried repro-ing with Vanilla UE but theoretically, you should be able to repro like this:

  • Open a map in the editor which has some bright light sources
  • Make sure convolution bloom is enabled (r.bloom.method 2)
  • Make sure that the internal rendering resolution is currently less than 100% (r.screenpercentage). If not, make that the default and restart the editor.
  • Set the internal rendering resolution to 100% (r.screenpercentage 100)
  • Set the internal rendering resolution what it was before (e.g. r.screenpercentage 50)
  • Note that bloom is weaker than before

[Attachment Removed]

Hi there! Thanks for reporting this issue and fix. I’ve created https://issues.unrealengine.com/issue/UE\-380317 which should be visible soon for tracking.

[Attachment Removed]