You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Image exposure is locally adjusted by decomposing luminance of the frame into a base layer and a detail layer. - Base layer contrast can be reduced while preserving detail. - Support blending with gaussian blurred luminance as proposed in Advances in Real-Time Rendering in Games 2021. - Controls in PostProcessVolume. - r.LocalExposure cvar to control whether local exposure is supported. - Visualization mode in "Show->Visualize->Local Expsoure". Multiple modes controllable using r.LocalExposure.VisualizeDebugMode. - Bilateral grid generation not yet optimized. Optimization should include increasing depth of grid to match histogram size so that global histogram can be generated from grid. - Added option to use mirror address mode in PostProcessWeightedSampleSum, since black border adds noticeable vignetting to the blurred luminance. #preflight 612f65169db3090001ba3eec #rb Brian.Karis, Guillaume.Abadie, Krzysztof.Narkowicz #ROBOMERGE-SOURCE: CL 17385317 #ROBOMERGE-BOT: (v865-17346139) [CL 17387198 by tiago costa in ue5-main branch]
19 lines
610 B
Plaintext
19 lines
610 B
Plaintext
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Common.ush"
|
|
#include "ScreenPass.ush"
|
|
#include "PostProcessHistogramCommon.ush"
|
|
|
|
SCREEN_PASS_TEXTURE_VIEWPORT(Input)
|
|
Texture2D InputTexture;
|
|
|
|
RWTexture2D<float> Output2DFRW;
|
|
|
|
[numthreads(THREADGROUP_SIZEX, THREADGROUP_SIZEY, 1)]
|
|
void SetupLogLuminanceCS(uint3 DispatchThreadId : SV_DispatchThreadID)
|
|
{
|
|
float3 SceneColor = InputTexture.Load(uint3(Input_ViewportMin + DispatchThreadId.xy, 0)).rgb * View.OneOverPreExposure;
|
|
float LuminanceVal = CalculateEyeAdaptationLuminance(SceneColor);
|
|
Output2DFRW[DispatchThreadId.xy] = log2(LuminanceVal);
|
|
}
|