Files
UnrealEngineUWP/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessBloomSetup.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

50 lines
1.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ScreenPass.h"
class FSceneDownsampleChain;
class FEyeAdaptationParameters;
class FLocalExposureParameters;
enum class EBloomQuality : uint32
{
Disabled,
Q1,
Q2,
Q3,
Q4,
Q5,
MAX
};
EBloomQuality GetBloomQuality();
FScreenPassTexture AddGaussianBloomPasses(FRDGBuilder& GraphBuilder, const FViewInfo& View, const FSceneDownsampleChain* SceneDownsampleChain);
struct FBloomSetupInputs
{
// [Required]: The intermediate scene color being processed.
FScreenPassTextureSlice SceneColor;
// [Required]: The scene eye adaptation buffer.
FRDGBufferRef EyeAdaptationBuffer = nullptr;
// [Required]: The bloom threshold to apply. Must be >0.
float Threshold = 0.0f;
// [Optional] Eye adaptation parameters.
const FEyeAdaptationParameters* EyeAdaptationParameters = nullptr;
// [Optional] Local exposure parameters.
const FLocalExposureParameters* LocalExposureParameters = nullptr;
// [Optional] Luminance bilateral grid. If this is null, local exposure is disabled.
FRDGTextureRef LocalExposureTexture = nullptr;
// [Optional] Blurred luminance texture used to calculate local exposure.
FRDGTextureRef BlurredLogLuminanceTexture = nullptr;
};
FScreenPassTexture AddBloomSetupPass(FRDGBuilder& GraphBuilder, const FViewInfo& View, const FBloomSetupInputs& Inputs);