UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TranslucentLighting.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "SceneRendering.h"
6#include "RenderGraph.h"
7#include "VolumeRendering.h"
8
11
12class FLightSceneInfo;
14
49
58
61{
62public:
64 FRDGBuilder& GraphBuilder,
66 bool bAreLightsInLightGrid);
67
73 {
74 // must not be 0
76 // can be 0
78 //
80 // must not be 0
82 // can be INDEX_NONE
84 //
86 FVolumeBounds VolumeBounds[TVC_MAX];
87 };
88
90
92 {
93 // Array of lights that will be injected individually
95
96 // Lights that will be injected collectively
97 // For these we store a bitmask of light indices in the light grid
99 uint32 BatchedLocalLightCount = 0; // Maintain a count for stats
100 bool bAnyBatchedLightsWithVirtualShadowMaps = false;
101 };
102
104
105 void AddLightForInjection(
106 const FViewInfo& View,
107 const uint32 ViewIndex,
108 TArrayView<const FVisibleLightInfo> VisibleLightInfos,
109 const FLightSceneInfo& LightSceneInfo,
111
112private:
113 bool bCollectorSupportsBatching = false;
114};
115
118
121
#define check(expr)
Definition AssertionMacros.h:314
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
void Init()
Definition LockFreeList.h:4
EPixelFormat
Definition PixelFormat.h:16
ETextureCreateFlags
Definition RHIDefinitions.h:1091
ERDGPassFlags
Definition RenderGraphDefinitions.h:128
@ TVC_MAX
Definition SceneView.h:839
#define SHADER_PARAMETER_RDG_TEXTURE(ShaderType, MemberName)
Definition ShaderParameterMacros.h:1752
#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
bool IsTranslucencyLightingVolumeUsingBlueNoise()
Definition TranslucentLighting.cpp:1280
FTranslucencyLightingVolumeParameters GetTranslucencyLightingVolumeParameters(FRDGBuilder &GraphBuilder, const FTranslucencyLightingVolumeTextures &Textures, const FViewInfo &View)
Definition TranslucentLighting.cpp:1242
bool IsTranslucencyLightingVolumeUsingVoxelMarking()
Definition TranslucentLighting.cpp:1275
bool IsTranslucencyLightingVolumeUsingVoxelMarkingSupported()
Definition TranslucentLighting.cpp:1270
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition LightSceneInfo.h:208
Definition MaterialRenderProxy.h:102
Definition ShadowRendering.h:279
Definition RenderGraphBuilder.h:49
Definition RenderGraphResources.h:571
Definition SceneRendering.h:1132
Definition ArrayView.h:139
Definition Array.h:670
Definition BitArray.h:350
Definition VolumetricCloudRendering.h:194
Definition LightSceneInfo.h:81
Definition TranslucentLighting.h:16
int32 VolumeDim
Definition TranslucentLighting.h:44
TArray< FRDGTextureRef, TInlineAllocator< TVC_MAX > > Ambient
Definition TranslucentLighting.h:42
TArray< int32, TInlineAllocator< 2 > > ViewsToTexturePairs
Definition TranslucentLighting.h:47
bool IsValid() const
Definition TranslucentLighting.h:26
static void GetTextureFormatAndCreationFlags(EPixelFormat &OutPixelFormat, ETextureCreateFlags &OutCreationFlags)
Definition TranslucentLighting.cpp:1132
FRDGTextureRef GetDirectionalTexture(const FViewInfo &View, int32 CascadeIndex) const
Definition TranslucentLighting.h:37
int32 GetIndex(const FViewInfo &View, int32 CascadeIndex) const
Definition TranslucentLighting.cpp:1141
FRDGTextureRef GetAmbientTexture(const FViewInfo &View, int32 CascadeIndex) const
Definition TranslucentLighting.h:32
TArray< FRDGTextureRef, TInlineAllocator< TVC_MAX > > Directional
Definition TranslucentLighting.h:43
Definition TranslucentLighting.h:73
bool bUseAdaptiveVolumetricShadowMap
Definition TranslucentLighting.h:85
const FLightSceneInfo * LightSceneInfo
Definition TranslucentLighting.h:75
const FProjectedShadowInfo * ProjectedShadowInfo
Definition TranslucentLighting.h:77
const FMaterialRenderProxy * LightFunctionMaterialProxy
Definition TranslucentLighting.h:81
int32 VirtualShadowMapId
Definition TranslucentLighting.h:83
bool bApplyLightFunction
Definition TranslucentLighting.h:79
Definition TranslucentLighting.h:92
FInjectionDataArray Unbatched
Definition TranslucentLighting.h:94
Definition TranslucentLighting.h:61
TArray< FPerViewData, SceneRenderingAllocator > & InjectionDataPerView
Definition TranslucentLighting.h:103
TArray< FInjectionData, SceneRenderingAllocator > FInjectionDataArray
Definition TranslucentLighting.h:89
Definition VolumeRendering.h:18