UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FLightSceneInfo Class Reference

#include <LightSceneInfo.h>

Public Types

using FPersistentId = int32
 

Public Member Functions

FORCEINLINE FPersistentId GetPersistentIndex () const
 
 FLightSceneInfo (FLightSceneProxy *InProxy, bool InbVisible)
 
void AddToScene ()
 
bool ShouldCreateLightPrimitiveInteraction (const FLightSceneInfoCompact &LightSceneInfoCompact, const FPrimitiveSceneInfoCompact &PrimitiveSceneInfoCompact)
 
void CreateLightPrimitiveInteraction (const FLightSceneInfoCompact &LightSceneInfoCompact, const FPrimitiveSceneInfoCompact &PrimitiveSceneInfoCompact)
 
void RemoveFromScene ()
 
void Detach ()
 
FBoxCenterAndExtent GetBoundingBox () const
 
bool ShouldRenderLight (const FViewInfo &View, bool bOffscreen=false) const
 
bool ShouldRenderLightViewIndependent () const
 
bool ShouldRenderViewIndependentWholeSceneShadows () const
 
bool IsPrecomputedLightingValid () const
 
void SetDynamicShadowMapChannel (int32 NewChannel)
 
int32 GetDynamicShadowMapChannel () const
 
const TArray< FLightPrimitiveInteraction * > * GetInteractionShadowPrimitives () const
 
FLightPrimitiveInteractionGetDynamicInteractionOftenMovingPrimitiveList () const
 
FLightPrimitiveInteractionGetDynamicInteractionStaticPrimitiveList () const
 
bool SetupMobileMovableLocalLightShadowParameters (const FViewInfo &View, TConstArrayView< FVisibleLightInfo > VisibleLightInfos, FMobileMovableLocalLightShadowParameters &MobileMovableLocalLightShadowParameters) const
 
bool ShouldRecordShadowSubjectsForMobile () const
 
uint32 PackExtraData (bool bAllowStaticLighting, bool bLightFunction, bool bMegaLight, bool bClusteredDeferredSupported) const
 

Public Attributes

FLightSceneProxyProxy
 
ELightComponentType Type
 
FPersistentId Id
 
FOctreeElementId2 OctreeId
 
TMap< FPersistentShadowStateKey, FPersistentShadowStatePrevPersistentShadows
 
TMap< FPersistentShadowStateKey, FPersistentShadowStatePersistentShadows
 
uint32 bVisible: 1
 
uint32 bEnableLightShaftBloom: 1
 
float BloomScale
 
float BloomThreshold
 
float BloomMaxBrightness
 
FColor BloomTint
 
int32 NumUnbuiltInteractions
 
bool bCreatePerObjectShadowsForDynamicObjects
 
FSceneScene
 

Protected Attributes

int32 DynamicShadowMapChannel
 
uint32 bPrecomputedLightingIsValid: 1
 

Friends

class FLightPrimitiveInteraction
 
uint32 GetTypeHash (const FLightSceneInfo *LightSceneInfo)
 

Detailed Description

The information used to render a light. This is the rendering thread's mirror of the game thread's ULightComponent. FLightSceneInfo is internal to the renderer module and contains internal scene state.

Member Typedef Documentation

◆ FPersistentId

Constructor & Destructor Documentation

◆ FLightSceneInfo()

FLightSceneInfo::FLightSceneInfo ( FLightSceneProxy InProxy,
bool  InbVisible 
)

Initialization constructor.

Member Function Documentation

◆ AddToScene()

void FLightSceneInfo::AddToScene ( )

Adds the light to the scene.

◆ CreateLightPrimitiveInteraction()

void FLightSceneInfo::CreateLightPrimitiveInteraction ( const FLightSceneInfoCompact LightSceneInfoCompact,
const FPrimitiveSceneInfoCompact PrimitiveSceneInfoCompact 
)

If the light affects the primitive, create an interaction, and process children

Parameters
LightSceneInfoCompactCompact representation of the light
PrimitiveSceneInfoCompactCompact representation of the primitive

◆ Detach()

void FLightSceneInfo::Detach ( )

Detaches the light from the primitives it affects.

◆ GetBoundingBox()

FBoxCenterAndExtent FLightSceneInfo::GetBoundingBox ( ) const

Octree bounds setup.

◆ GetDynamicInteractionOftenMovingPrimitiveList()

FLightPrimitiveInteraction * FLightSceneInfo::GetDynamicInteractionOftenMovingPrimitiveList ( ) const

◆ GetDynamicInteractionStaticPrimitiveList()

FLightPrimitiveInteraction * FLightSceneInfo::GetDynamicInteractionStaticPrimitiveList ( ) const

◆ GetDynamicShadowMapChannel()

int32 FLightSceneInfo::GetDynamicShadowMapChannel ( ) const

◆ GetInteractionShadowPrimitives()

const TArray< FLightPrimitiveInteraction * > * FLightSceneInfo::GetInteractionShadowPrimitives ( ) const

◆ GetPersistentIndex()

FORCEINLINE FPersistentId FLightSceneInfo::GetPersistentIndex ( ) const
inline

◆ IsPrecomputedLightingValid()

bool FLightSceneInfo::IsPrecomputedLightingValid ( ) const

◆ PackExtraData()

uint32 FLightSceneInfo::PackExtraData ( bool  bAllowStaticLighting,
bool  bLightFunction,
bool  bMegaLight,
bool  bClusteredDeferredSupported 
) const

◆ RemoveFromScene()

void FLightSceneInfo::RemoveFromScene ( )

Removes the light from the scene.

◆ SetDynamicShadowMapChannel()

void FLightSceneInfo::SetDynamicShadowMapChannel ( int32  NewChannel)

◆ SetupMobileMovableLocalLightShadowParameters()

bool FLightSceneInfo::SetupMobileMovableLocalLightShadowParameters ( const FViewInfo View,
TConstArrayView< FVisibleLightInfo VisibleLightInfos,
FMobileMovableLocalLightShadowParameters MobileMovableLocalLightShadowParameters 
) const

◆ ShouldCreateLightPrimitiveInteraction()

bool FLightSceneInfo::ShouldCreateLightPrimitiveInteraction ( const FLightSceneInfoCompact LightSceneInfoCompact,
const FPrimitiveSceneInfoCompact PrimitiveSceneInfoCompact 
)

Returns true if the light affects the primitive

Parameters
LightSceneInfoCompactCompact representation of the light
PrimitiveSceneInfoCompactCompact representation of the primitive

◆ ShouldRecordShadowSubjectsForMobile()

bool FLightSceneInfo::ShouldRecordShadowSubjectsForMobile ( ) const

◆ ShouldRenderLight()

bool FLightSceneInfo::ShouldRenderLight ( const FViewInfo View,
bool  bOffscreen = false 
) const

◆ ShouldRenderLightViewIndependent()

bool FLightSceneInfo::ShouldRenderLightViewIndependent ( ) const

Encapsulates all View-Independent reasons to have this light render.

◆ ShouldRenderViewIndependentWholeSceneShadows()

bool FLightSceneInfo::ShouldRenderViewIndependentWholeSceneShadows ( ) const

Encapsulates all View-Independent reasons to render ViewIndependentWholeSceneShadows for this light

Friends And Related Symbol Documentation

◆ FLightPrimitiveInteraction

◆ GetTypeHash

uint32 GetTypeHash ( const FLightSceneInfo LightSceneInfo)
friend

Hash function.

Member Data Documentation

◆ bCreatePerObjectShadowsForDynamicObjects

bool FLightSceneInfo::bCreatePerObjectShadowsForDynamicObjects

Cached value from the light proxy's virtual function, since it is checked many times during shadow setup.

◆ bEnableLightShaftBloom

uint32 FLightSceneInfo::bEnableLightShaftBloom

Whether to render light shaft bloom from this light. For directional lights, the color around the light direction will be blurred radially and added back to the scene. for point lights, the color on pixels closer than the light's SourceRadius will be blurred radially and added back to the scene.

◆ BloomMaxBrightness

float FLightSceneInfo::BloomMaxBrightness

After exposure is applied, scene color brightness larger than BloomMaxBrightness will be rescaled down to BloomMaxBrightness.

◆ BloomScale

float FLightSceneInfo::BloomScale

Scales the additive color.

◆ BloomThreshold

float FLightSceneInfo::BloomThreshold

Scene color must be larger than this to create bloom in the light shafts.

◆ BloomTint

FColor FLightSceneInfo::BloomTint

Multiplies against scene color to create the bloom color.

◆ bPrecomputedLightingIsValid

uint32 FLightSceneInfo::bPrecomputedLightingIsValid
protected

True if the light is built.

◆ bVisible

uint32 FLightSceneInfo::bVisible

True if the light is visible.
False if the light is invisible but still needed for previewing, which can only happen in the editor.

◆ DynamicShadowMapChannel

int32 FLightSceneInfo::DynamicShadowMapChannel
protected

ShadowMap channel assigned in the forward renderer when a movable shadow casting light is added to the scene. Used to pack shadow projections into channels of the light attenuation texture which is read in the base pass.

◆ Id

FPersistentId FLightSceneInfo::Id

If bVisible == true, this is the index of the primitive in Scene->Lights.

◆ NumUnbuiltInteractions

int32 FLightSceneInfo::NumUnbuiltInteractions

Number of dynamic interactions with statically lit primitives.

◆ OctreeId

FOctreeElementId2 FLightSceneInfo::OctreeId

The identifier for the primitive in Scene->PrimitiveOctree.

◆ PersistentShadows

TMap<FPersistentShadowStateKey, FPersistentShadowState> FLightSceneInfo::PersistentShadows

◆ PrevPersistentShadows

TMap<FPersistentShadowStateKey, FPersistentShadowState> FLightSceneInfo::PrevPersistentShadows

Persistent shadow state used for HZB occlusion culling.

◆ Proxy

FLightSceneProxy* FLightSceneInfo::Proxy

The light's scene proxy.

◆ Scene

FScene* FLightSceneInfo::Scene

The scene the light is in.

◆ Type

ELightComponentType FLightSceneInfo::Type

The documentation for this class was generated from the following files: