UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PostProcessLensFlares.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 Low,
11 High,
13 MAX
14};
15
17
19{
20 static const uint32 LensFlareCountMax = 8;
21
22 // [Required] The bloom convolution texture. If enabled, this will be composited with lens flares. Otherwise,
23 // a transparent black texture is used instead. Either way, the final output texture will use the this texture
24 // descriptor and viewport.
26
27 // [Required] The scene color input, before bloom, which is used as the source of lens flares.
28 // This can be a downsampled input based on the desired quality level.
30
31 // [Required] The bokeh shape texture to use to blur the lens flares.
33
34 // The number of lens flares to render.
36
37 // The array of per-flare tint colors. Length must be equal to LensFlareCount.
39
40 // The lens flare tint color to apply to all lens flares.
42
43 // The size of the bokeh shape in screen percentage.
44 float BokehSizePercent = 0.0f;
45
46 // Brightness scale of the lens flares.
47 float Intensity = 1.0f;
48
49 // Brightness threshold at which lens flares begin having an effect.
50 float Threshold = 1.0f;
51
52 // Whether to composite lens flares with the scene color input. If false, the result is composited on transparent black.
54};
55
57
58
59bool IsLensFlaresEnabled(const FViewInfo& View);
60
61// Helper function which pulls inputs from the post process settings of the view.
63 FRDGBuilder& GraphBuilder,
64 const FViewInfo& View,
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
FScreenPassTexture AddLensFlaresPass(FRDGBuilder &GraphBuilder, const FViewInfo &View, FScreenPassTexture Bloom, FScreenPassTextureSlice QualitySceneDownsample, FScreenPassTextureSlice DefaultSceneDownsample)
Definition PostProcessLensFlares.cpp:399
ELensFlareQuality
Definition PostProcessLensFlares.h:8
ELensFlareQuality GetLensFlareQuality()
namespace
Definition PostProcessLensFlares.cpp:124
bool IsLensFlaresEnabled(const FViewInfo &View)
Definition PostProcessLensFlares.cpp:387
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition RenderGraphBuilder.h:49
Definition RHIResources.h:2153
Definition SceneRendering.h:1132
Definition ArrayView.h:139
Definition PostProcessLensFlares.h:19
float BokehSizePercent
Definition PostProcessLensFlares.h:44
FScreenPassTextureSlice Bloom
Definition PostProcessLensFlares.h:25
FScreenPassTextureSlice Flare
Definition PostProcessLensFlares.h:29
float Intensity
Definition PostProcessLensFlares.h:47
uint32 LensFlareCount
Definition PostProcessLensFlares.h:35
float Threshold
Definition PostProcessLensFlares.h:50
FLinearColor TintColor
Definition PostProcessLensFlares.h:41
FRHITexture * BokehShapeTexture
Definition PostProcessLensFlares.h:32
static const uint32 LensFlareCountMax
Definition PostProcessLensFlares.h:20
bool bCompositeWithBloom
Definition PostProcessLensFlares.h:53
TArrayView< const FLinearColor > TintColorsPerFlare
Definition PostProcessLensFlares.h:38
Definition Color.h:48
Definition ScreenPass.h:65
Definition ScreenPass.h:41