Files
UnrealEngineUWP/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessLocalExposure.h
guillaume abadie 59a7373ea7 Fixes a D3D11 validation failure binding a Texture2DArray into a RWTexture2D with TSR, sg.AntiAliasingQuality=0, sg.MotionBlurQuality=0
TSR's UpdateHistory now always render half or quarter res in a Texture2DArray of size 1, to not introduce shader permutation or dynamic branch on SceneColorOutputMip1 that could create dependent image_store on some hardware.

#jira UE-179496

[CL 30605439 by guillaume abadie in ue5-main branch]
2024-01-12 17:20:16 -05:00

39 lines
1.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ScreenPass.h"
class FEyeAdaptationParameters;
BEGIN_SHADER_PARAMETER_STRUCT(FLocalExposureParameters, )
SHADER_PARAMETER(float, HighlightContrastScale)
SHADER_PARAMETER(float, ShadowContrastScale)
SHADER_PARAMETER(float, DetailStrength)
SHADER_PARAMETER(float, BlurredLuminanceBlend)
SHADER_PARAMETER(float, MiddleGreyExposureCompensation)
SHADER_PARAMETER(FVector2f, BilateralGridUVScale)
SHADER_PARAMETER(float, HighlightThreshold)
SHADER_PARAMETER(float, ShadowThreshold)
END_SHADER_PARAMETER_STRUCT()
FLocalExposureParameters GetLocalExposureParameters(const FViewInfo& View, FIntPoint ViewRectSize, const FEyeAdaptationParameters& EyeAdaptationParameters);
FRDGTextureRef AddLocalExposureBlurredLogLuminancePass(
FRDGBuilder& GraphBuilder,
const FViewInfo& View,
const FEyeAdaptationParameters& EyeAdaptationParameters,
FScreenPassTextureSlice InputTexture);
void AddApplyLocalExposurePass(
FRDGBuilder& GraphBuilder,
const FViewInfo& View,
const FEyeAdaptationParameters& EyeAdaptationParameters,
FRDGBufferRef EyeAdaptationBuffer,
const FLocalExposureParameters& LocalExposureParamaters,
FRDGTextureRef LocalExposureTexture,
FRDGTextureRef BlurredLogLuminanceTexture,
FScreenPassTextureSlice Input,
FScreenPassTextureSlice Output,
ERDGPassFlags PassFlags);