Description

The ApplyLocalExposureCS shader in PostProcessLocalExposure.usf computes UV coordinates for the LumBilateralGrid 3D texture using Output_ExtentInverse (1/RenderTargetSize) instead of Output_ViewportSizeInverse (1/ViewportSize). When the viewport is smaller than the render target (e.g., after resizing the editor viewport or changing r.screenpercentage), this produces incorrect UVs that don't span [0,1] across the viewport, causing bloom/local exposure strength to change unexpectedly.

PostProcessLocalExposure.usf, ApplyLocalExposureCS function, line 48 (Engine/Shaders/Private/PostProcessLocalExposure.usf)

// BUGGY:
const float2 UV = (DispatchThreadId + 0.5f) * Output_ExtentInverse;

This UV is passed to CalculateBaseLogLuminance() (in PostProcessHistogramCommon.ush), which uses it to compute BilateralGridUVW.xy = UV * LocalExposure_BilateralGridUVScale. Since Output_ExtentInverse is based on the full render target size rather than the viewport size, the UV is incorrect when viewport != render target.

// FIXED:
const float2 UV = (DispatchThreadId + 0.5f) * Output_ViewportSizeInverse;

Both Output_ExtentInverse and Output_ViewportSizeInverse are provided by the SCREEN_PASS_TEXTURE_VIEWPORT(Output) macro in ScreenPass.ush.

Steps to Reproduce
  1. Open any scene with local exposure / convolution bloom enabled. Note the bloom appearance
  2. Resize the editor viewport to a smaller size (or change r.screenpercentage)

Expected

Bloom strength remains the same despite the change in viewport or screen percentage size

Actual
Bloom strength changes even though the scene content hasn't changed

This happens because UE sometimes keeps the render target size the same but uses a smaller viewport within it. The LumBilateralGrid texture is identical between both cases, so the UV used to sample it should be relative to the viewport, not the render target.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-380317 in the post.

0
Login to Vote

Fixed
ComponentUE - Rendering - Graphics Features
Affects Versions5.75.8
Fix Commit54160401
Main Commit53125866
CreatedMay 18, 2026
ResolvedMay 19, 2026
UpdatedMay 21, 2026
View Jira Issue