UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PostProcessEyeAdaptation.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "ScreenPass.h"
6
8
10{
11 class FUsePrecalculatedLuminanceDim : SHADER_PERMUTATION_BOOL("USE_PRECALCULATED_LUMINANCE");
12 class FUseApproxIlluminanceDim : SHADER_PERMUTATION_BOOL("USE_APPROX_ILLUMINANCE");
14
15 using FCommonDomain = TShaderPermutationDomain<FUsePrecalculatedLuminanceDim, FUseApproxIlluminanceDim, FUseDebugOutputDim>;
16
17 bool ShouldCompileCommonPermutation(const FCommonDomain& PermutationVector);
18
20} // namespace AutoExposurePermutation
21
22// For converting the auto exposure to new values from 4.24 to 4.25
23float CalculateEyeAdaptationParameterExposureConversion(const FPostProcessSettings& Settings, const bool bExtendedLuminanceRange);
24
25// figure out the LuminanceMax (i.e. how much light in cd/m2 will saturate the camera sensor) from the CVar lens attenuation
27
28// Returns whether the auto exposure method is supported by the feature level.
29bool IsAutoExposureMethodSupported(ERHIFeatureLevel::Type FeatureLevel, EAutoExposureMethod AutoExposureMethodId);
30
31// Returns true if the view is in a debug mode that disables all exposure
32bool IsAutoExposureDebugMode(const FViewInfo& View);
33
34// Returns the fixed exposure value
35float CalculateFixedAutoExposure(const FViewInfo& View);
36
37// Returns the manual exposure value
38float CalculateManualAutoExposure(const FViewInfo& View, bool bForceDisablePhysicalCamera);
39
40// Returns the exposure compensation from the View,
42
44
45bool IsAutoExposureUsingIlluminanceEnabled(const FViewInfo& View);
47
48// Returns the auto exposure method enabled by the view (including CVar override).
49EAutoExposureMethod GetAutoExposureMethod(const FViewInfo& View);
50
56
59
67 SHADER_PARAMETER(float, DeltaWorldTime)
78 SHADER_PARAMETER(float, StartDistance)
87 SHADER_PARAMETER_TEXTURE(Texture2D, ExposureCompensationCurveLUT)
92
94
95// Computes the a fixed exposure to be used to replace the dynamic exposure when it's not supported (< SM5).
97
99 FRDGBuilder& GraphBuilder,
100 TArrayView<const FViewInfo> Views,
101 const FSceneTextures& SceneTextures);
102
104 FRDGBuilder& GraphBuilder,
105 TArrayView<const FViewInfo> Views,
106 const FSceneTextures& SceneTextures,
109
110// Returns the updated eye adaptation buffer.
112 FRDGBuilder& GraphBuilder,
113 const FViewInfo& View,
114 const FEyeAdaptationParameters& EyeAdaptationParameters,
115 const FLocalExposureParameters& LocalExposureParameters,
116 FRDGTextureRef HistogramTexture,
118
119// Computes luma of scene color stores in Alpha.
121 FRDGBuilder& GraphBuilder,
122 const FViewInfo& View,
123 const FEyeAdaptationParameters& EyeAdaptationParameters,
125
126// Returns the updated eye adaptation buffer.
128 FRDGBuilder& GraphBuilder,
129 const FViewInfo& View,
130 const FEyeAdaptationParameters& EyeAdaptationParameters,
131 const FLocalExposureParameters& LocalExposureParameters,
133 FRDGBufferRef EyeAdaptationBuffer,
135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
const bool
Definition NetworkReplayStreaming.h:178
void BeginUpdateExposureCompensationCurveLUT(TArrayView< FViewInfo > Views, FUpdateExposureCompensationCurveLUTTaskData *TaskData)
Definition PostProcessEyeAdaptation.cpp:414
FRDGBufferRef AddBasicEyeAdaptationPass(FRDGBuilder &GraphBuilder, const FViewInfo &View, const FEyeAdaptationParameters &EyeAdaptationParameters, const FLocalExposureParameters &LocalExposureParameters, FScreenPassTextureSlice SceneColor, FRDGBufferRef EyeAdaptationBuffer, bool bComputeAverageLocalExposure)
Definition PostProcessEyeAdaptation.cpp:1165
bool IsAutoExposureDebugMode(const FViewInfo &View)
Definition PostProcessEyeAdaptation.cpp:366
FRDGTextureRef AddCalculateExposureIlluminancePass(FRDGBuilder &GraphBuilder, TArrayView< const FViewInfo > Views, const FSceneTextures &SceneTextures, const FTranslucencyLightingVolumeTextures &TranslucencyLightingVolumeTextures, FRDGTextureRef ExposureIlluminanceSetup)
Definition PostProcessEyeAdaptation.cpp:936
FScreenPassTexture AddBasicEyeAdaptationSetupPass(FRDGBuilder &GraphBuilder, const FViewInfo &View, const FEyeAdaptationParameters &EyeAdaptationParameters, FScreenPassTexture SceneColor)
Definition PostProcessEyeAdaptation.cpp:1098
float GetEyeAdaptationFixedExposure(const FViewInfo &View)
Definition PostProcessEyeAdaptation.cpp:660
bool IsExtendLuminanceRangeEnabled()
Definition PostProcessEyeAdaptation.cpp:212
FRDGBufferRef AddHistogramEyeAdaptationPass(FRDGBuilder &GraphBuilder, const FViewInfo &View, const FEyeAdaptationParameters &EyeAdaptationParameters, const FLocalExposureParameters &LocalExposureParameters, FRDGTextureRef HistogramTexture, bool bComputeAverageLocalExposure)
Definition PostProcessEyeAdaptation.cpp:1023
EAutoExposureMethod GetAutoExposureMethod(const FViewInfo &View)
Definition PostProcessEyeAdaptation.cpp:265
bool IsAutoExposureUsingIlluminanceEnabled(const FViewInfo &View)
Definition PostProcessEyeAdaptation.cpp:219
FEyeAdaptationParameters GetEyeAdaptationParameters(const FViewInfo &View)
Definition PostProcessEyeAdaptation.cpp:447
bool IsAutoExposureMethodSupported(ERHIFeatureLevel::Type FeatureLevel, EAutoExposureMethod AutoExposureMethodId)
Definition PostProcessEyeAdaptation.cpp:199
float CalculateFixedAutoExposure(const FViewInfo &View)
Definition PostProcessEyeAdaptation.cpp:382
float CalculateManualAutoExposure(const FViewInfo &View, bool bForceDisablePhysicalCamera)
Definition PostProcessEyeAdaptation.cpp:389
void AddCopyEyeAdaptationDataToTexturePass(FRDGBuilder &GraphBuilder, const FGlobalShaderMap *ShaderMap, FRDGBufferRef EyeAdaptationBuffer, FRDGTextureRef OutputTexture)
Definition PostProcessEyeAdaptation.cpp:796
float LuminanceMaxFromLensAttenuation()
Definition PostProcessEyeAdaptation.cpp:249
void FinishUpdateExposureCompensationCurveLUT(FRHICommandListImmediate &RHICmdList, FUpdateExposureCompensationCurveLUTTaskData *TaskData)
Definition PostProcessEyeAdaptation.cpp:435
int32 GetAutoExposureIlluminanceDownscaleFactor()
Definition PostProcessEyeAdaptation.cpp:225
float GetAutoExposureCompensationFromSettings(const FViewInfo &View)
Definition PostProcessEyeAdaptation.cpp:319
FRDGTextureRef AddSetupExposureIlluminancePass(FRDGBuilder &GraphBuilder, TArrayView< const FViewInfo > Views, const FSceneTextures &SceneTextures)
Definition PostProcessEyeAdaptation.cpp:849
float CalculateEyeAdaptationParameterExposureConversion(const FPostProcessSettings &Settings, const bool bExtendedLuminanceRange)
EAutoExposureMethod
Definition Scene.h:34
#define SHADER_PARAMETER_TEXTURE(ShaderType, MemberName)
Definition ShaderParameterMacros.h:1708
#define SHADER_PARAMETER_SAMPLER(ShaderType, MemberName)
Definition ShaderParameterMacros.h:1740
#define BEGIN_SHADER_PARAMETER_STRUCT(StructTypeName, DllStorage)
Definition ShaderParameterMacros.h:1482
#define END_SHADER_PARAMETER_STRUCT()
Definition ShaderParameterMacros.h:1485
#define SHADER_PARAMETER(MemberType, MemberName)
Definition ShaderParameterMacros.h:1684
#define SHADER_PERMUTATION_BOOL(InDefineName)
Definition ShaderPermutation.h:482
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition RenderGraphResources.h:1321
Definition RenderGraphBuilder.h:49
Definition RenderGraphResources.h:571
Definition RHICommandList.h:4626
Definition RHICommandList.h:3819
Definition SceneRendering.h:1132
Definition ArrayView.h:139
Definition PostProcessEyeAdaptation.cpp:160
FCommonDomain BuildCommonPermutationDomain()
Definition PostProcessEyeAdaptation.cpp:171
bool ShouldCompileCommonPermutation(const FCommonDomain &PermutationVector)
Definition PostProcessEyeAdaptation.cpp:161
FSolverCollisionParticles class
Definition PBDSoftsEvolutionFwd.h:38
Definition SceneTextures.h:110
Definition ScreenPass.h:65
Definition ScreenPass.h:41
Definition TranslucentLighting.h:16
Definition PostProcessEyeAdaptation.h:52
UE::Tasks::FTask Task
Definition PostProcessEyeAdaptation.h:53
Definition ShaderPermutation.h:229