Files
UnrealEngineUWP/Engine/Shaders/Private/PostProcessDeviceEncodingOnly.usf
benjamin rouveyrol 0645b83a3d HDR composition improvements:
* De-hardcode UI luminance, now driven by r.HDR.UI.Luminance
* Expose hard-coded ACES tonemapper parameters:
  - r.HDR.Display.MinLuminanceLog10 (-4.0) defines the luminance for the darkest point in the scene, and will also compute its ACES value (through lookup_ACESmin). The same is happening with the existing CVar r.HDR.Display.MaxLuminance, through lookup_ACESmax
  - r.HDR.Display.MidLuminance (15.0) defines the luminance for 18% gray. It works by offseting the dakest and brightest points in the scene
  - r.HDR.Aces.SceneColorMultiplier (1.5) . This acts like a gain to ensure consistency between ACES (for HDR) and UE (for SDR) tonemappers.

From my tests,  r.HDR.Aces.SceneColorMultiplier and r.HDR.Display.MidLuminance are a bit redundant, but the former acts as a gain on the input color, whereas the latter changes the anchor points for the tonemapper. Since they don't have a linear relationship, it felt useful to keep them both.

some examples:

Default Values (used in initial implementation of ACES 1.3)
r.HDR.Display.MinLuminanceLog10 = -4
r.HDR.Display.MidLuminance = 15
r.HDR.Aces.SceneColorMultiplier = 1.5

ACES 1.3 reference values (match reference images for r.HDR.Display.MaxLuminance=1000, 2000, 4000)
r.HDR.Display.MinLuminanceLog10 = -4
r.HDR.Display.MidLuminance = 15
r.HDR.Aces.SceneColorMultiplier = 1.0

ACES 1.3 with better fit to UE SDR tonemapper (scaled to 300 nits)
r.HDR.Display.MinLuminanceLog10 = -4
r.HDR.Display.MidLuminance = 54
r.HDR.Aces.SceneColorMultiplier = 1.0

#review eric.renaudhoude
#jira UE-162970
#preflight 6319a664a60c539c987c1e45

[CL 21890495 by benjamin rouveyrol in ue5-main branch]
2022-09-08 06:28:38 -04:00

7.4 KiB