ShowFlag.RectLights
ShowFlag.RectLights
#Overview
name: ShowFlag.RectLights
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Allows to override a specific showflag (works in editor and game, \
It is referenced in 33
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ShowFlag.RectLights is to control the visibility of rectangular lights in the Unreal Engine rendering system. It is a show flag that allows developers to toggle the rendering of rect lights on or off in various contexts, such as in-game views, editor viewports, and scene captures.
This setting variable is primarily used by the rendering subsystem of Unreal Engine. It interacts with the lighting system, specifically for rect lights, which are a type of area light that emits light from a rectangular shape.
The value of this variable is typically set through the engine’s show flags system, which can be controlled via the UI in the editor or programmatically. It can be accessed and modified through the ViewFamily’s EngineShowFlags property.
Several other subsystems and modules interact with this variable:
- The GPULightmass plugin uses it to manage rect lights in lightmap generation.
- The Lightmass system uses it when exporting and processing lighting data.
- The renderer uses it to determine whether rect lights should be included in various lighting calculations and rendering passes.
Developers should be aware that:
- Toggling this flag will affect the visibility of all rect lights in the scene.
- It may impact performance, as enabling rect lights will increase the complexity of lighting calculations.
- It can affect the visual fidelity of the scene, especially in scenarios where rect lights are a significant part of the lighting design.
Best practices when using this variable include:
- Use it for debugging lighting issues related to rect lights.
- Consider performance implications when enabling rect lights in performance-critical scenarios.
- Ensure it’s properly set when capturing scenes or generating lightmaps to avoid unexpected results.
The associated variable RectLights is used in various parts of the engine to store and manage rect light data. It’s typically an array or collection of rect light objects or data structures. This variable is used in conjunction with ShowFlag.RectLights to actually store and process the rect light information when the show flag is enabled. Developers working with rect lights directly should be aware of both the show flag and this associated variable to ensure proper handling of rect lights in their scenes and lighting calculations.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:83
Scope: file
Source code excerpt:
SHOWFLAG_ALWAYS_ACCESSIBLE(SpotLights, SFG_LightTypes, NSLOCTEXT("UnrealEd", "SpotLightsSF", "Spot Lights"))
/** Allows to disable lighting from Rect Lights, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(RectLights, SFG_LightTypes, NSLOCTEXT("UnrealEd", "RectLightsSF", "Rect Lights"))
/** Color correction after tone mapping */
SHOWFLAG_FIXED_IN_SHIPPING(1, ColorGrading, SFG_PostProcess, NSLOCTEXT("UnrealEd", "ColorGradingSF", "Color Grading"))
/** Visualize vector fields. */
SHOWFLAG_FIXED_IN_SHIPPING(0, VectorFields, SFG_Developer, NSLOCTEXT("UnrealEd", "VectorFieldsSF", "Vector Fields"))
/** Depth of Field */
SHOWFLAG_ALWAYS_ACCESSIBLE(DepthOfField, SFG_PostProcess, NSLOCTEXT("UnrealEd", "DepthOfFieldSF", "Depth Of Field"))
#Associated Variable and Callsites
This variable is associated with another variable named RectLights
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/PathTracingLightParameters.inl:119
Scope (from outer to inner):
file
function void SetupPathTracingLightParameters
Source code excerpt:
}
for (auto Light : LightScene.RectLights.Elements)
{
FPathTracingLight& DestLight = Lights.AddDefaulted_GetRef();
DestLight.TranslatedWorldPosition = FVector3f(Light.Position + View.ViewMatrices.GetPreViewTranslation());
DestLight.Normal = (FVector3f)Light.Direction;
DestLight.dPdu = (FVector3f)FVector::CrossProduct(Light.Tangent, -Light.Direction);
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Lights.h:383
Scope (from outer to inner):
file
namespace GPULightmass
Source code excerpt:
TLightArray<FPointLightBuildInfo> PointLights;
TLightArray<FSpotLightBuildInfo> SpotLights;
TLightArray<FRectLightBuildInfo> RectLights;
TMap<UDirectionalLightComponent*, FDirectionalLightRef> RegisteredDirectionalLightComponentUObjects;
TMap<UPointLightComponent*, FPointLightRef> RegisteredPointLightComponentUObjects;
TMap<USpotLightComponent*, FSpotLightRef> RegisteredSpotLightComponentUObjects;
TMap<URectLightComponent*, FRectLightRef> RegisteredRectLightComponentUObjects;
};
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Lights.h:397
Scope (from outer to inner):
file
namespace GPULightmass
Source code excerpt:
TLightRenderStateArray<FPointLightRenderState> PointLights;
TLightRenderStateArray<FSpotLightRenderState> SpotLights;
TLightRenderStateArray<FRectLightRenderState> RectLights;
};
}
static uint32 GetTypeHash(const GPULightmass::FDirectionalLightRenderState& O)
{
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:356
Scope (from outer to inner):
file
namespace GPULightmass
function inline static LightArrayType& GetLightArray
Source code excerpt:
inline static LightArrayType& GetLightArray(FLightScene& LightScene)
{
return LightScene.RectLights;
}
using LightRenderStateArrayType = TLightRenderStateArray<RenderStateType>;
inline static LightRenderStateArrayType& GetLightRenderStateArray(FLightSceneRenderState& LightSceneRenderState)
{
return LightSceneRenderState.RectLights;
}
};
template<typename LightComponentType>
void FScene::AddLight(LightComponentType* LightComponent)
{
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:815
Scope (from outer to inner):
file
namespace GPULightmass
function void FScene::AddGeometryInstanceFromComponent
Source code excerpt:
TArray<int32> RelevantPointLightsToAddOnRenderThread = AddAllPossiblyRelevantLightsToGeometry(LightScene.PointLights, Instance);
TArray<int32> RelevantSpotLightsToAddOnRenderThread = AddAllPossiblyRelevantLightsToGeometry(LightScene.SpotLights, Instance);
TArray<int32> RelevantRectLightsToAddOnRenderThread = AddAllPossiblyRelevantLightsToGeometry(LightScene.RectLights, Instance);
ENQUEUE_RENDER_COMMAND(RenderThreadInit)(
[
FeatureLevel = FeatureLevel,
InstanceRenderState = MoveTemp(InstanceRenderState),
InstanceLightmapRenderStateInitializers = MoveTemp(InstanceLightmapRenderStateInitializers),
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:852
Scope (from outer to inner):
file
function void FScene::AddGeometryInstanceFromComponent
lambda-function
Source code excerpt:
for (int32 ElementId : RelevantRectLightsToAddOnRenderThread)
{
LightmapRenderState->AddRelevantLight(FRectLightRenderStateRef(RenderState.LightSceneRenderState.RectLights.Elements[ElementId], RenderState.LightSceneRenderState.RectLights));
}
}
else
{
InstanceRenderStateRef->LODLightmapRenderStates.Emplace(RenderState.LightmapRenderStates.CreateNullRef());
}
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1034
Scope (from outer to inner):
file
namespace GPULightmass
function void FScene::AddGeometryInstanceFromComponent
Source code excerpt:
TArray<int32> RelevantPointLightsToAddOnRenderThread = AddAllPossiblyRelevantLightsToGeometry(LightScene.PointLights, Instance);
TArray<int32> RelevantSpotLightsToAddOnRenderThread = AddAllPossiblyRelevantLightsToGeometry(LightScene.SpotLights, Instance);
TArray<int32> RelevantRectLightsToAddOnRenderThread = AddAllPossiblyRelevantLightsToGeometry(LightScene.RectLights, Instance);
ENQUEUE_RENDER_COMMAND(RenderThreadInit)(
[
FeatureLevel = FeatureLevel,
InstanceRenderState = MoveTemp(InstanceRenderState),
InstanceLightmapRenderStateInitializers = MoveTemp(InstanceLightmapRenderStateInitializers),
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1080
Scope (from outer to inner):
file
function void FScene::AddGeometryInstanceFromComponent
lambda-function
Source code excerpt:
for (int32 ElementId : RelevantRectLightsToAddOnRenderThread)
{
LightmapRenderState->AddRelevantLight(FRectLightRenderStateRef(RenderState.LightSceneRenderState.RectLights.Elements[ElementId], RenderState.LightSceneRenderState.RectLights));
}
}
else
{
InstanceRenderStateRef->LODLightmapRenderStates.Emplace(RenderState.LightmapRenderStates.CreateNullRef());
}
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1254
Scope (from outer to inner):
file
namespace GPULightmass
function void FScene::AddGeometryInstanceFromComponent
Source code excerpt:
TArray<int32> RelevantPointLightsToAddOnRenderThread = AddAllPossiblyRelevantLightsToGeometry(LightScene.PointLights, Instance);
TArray<int32> RelevantSpotLightsToAddOnRenderThread = AddAllPossiblyRelevantLightsToGeometry(LightScene.SpotLights, Instance);
TArray<int32> RelevantRectLightsToAddOnRenderThread = AddAllPossiblyRelevantLightsToGeometry(LightScene.RectLights, Instance);
ENQUEUE_RENDER_COMMAND(RenderThreadInit)(
[
InstanceRenderState = MoveTemp(InstanceRenderState),
LocalFeatureLevel = FeatureLevel,
Initializer,
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1393
Scope (from outer to inner):
file
function void FScene::AddGeometryInstanceFromComponent
lambda-function
Source code excerpt:
for (int32 ElementId : RelevantRectLightsToAddOnRenderThread)
{
LightmapRenderState->AddRelevantLight(FRectLightRenderStateRef(RenderState.LightSceneRenderState.RectLights.Elements[ElementId], RenderState.LightSceneRenderState.RectLights));
}
}
else
{
InstanceRenderStateRef->LODLightmapRenderStates.Emplace(RenderState.LightmapRenderStates.CreateNullRef());
}
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1857
Scope (from outer to inner):
file
namespace GPULightmass
function void FScene::AddRelevantStaticLightGUIDs
Source code excerpt:
}
for (FRectLightBuildInfo& RectLight : LightScene.RectLights.Elements)
{
if (!RectLight.bStationary)
{
URectLightComponent* Light = RectLight.ComponentUObject;
if (RectLight.AffectsBounds(WorldBounds))
{
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1942
Scope (from outer to inner):
file
namespace GPULightmass
function void FScene::ApplyFinishedLightmapsToWorld
Source code excerpt:
}
for (FRectLightBuildInfo& RectLight : LightScene.RectLights.Elements)
{
RectLight.AllocateMapBuildData(LightingScenario ? LightingScenario : RectLight.ComponentUObject->GetOwner()->GetLevel());
}
if (RenderState.VolumetricLightmapRenderer->NumTotalBricks > 0)
{
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:2307
Scope (from outer to inner):
file
function void FScene::ApplyFinishedLightmapsToWorld
Source code excerpt:
{
int32 ElementId = RectLight.GetElementIdChecked();
TransencodeShadowMap(LightScene.RectLights.Elements[ElementId], RectLight);
}
}
{
UStaticMeshComponent* StaticMeshComponent = StaticMeshInstances.Elements[InstanceIndex].ComponentUObject;
if (StaticMeshComponent && StaticMeshComponent->GetOwner() && StaticMeshComponent->GetOwner()->GetLevel())
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:2656
Scope: file
Source code excerpt:
}
ShadowMaps.Add(LightScene.RectLights.Elements[RectLight.GetElementIdChecked()].ComponentUObject, MoveTemp(ShadowMap));
}
}
}
// Add static lights to lightmap data
// Instanced lightmaps will eventually be merged together, so just add to the first one
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:2926
Scope (from outer to inner):
file
function void FScene::ApplyFinishedLightmapsToWorld
Source code excerpt:
{
int32 ElementId = RectLight.GetElementIdChecked();
TransencodeShadowMap(LightScene.RectLights.Elements[ElementId], RectLight);
}
}
{
ULandscapeComponent* LandscapeComponent = Landscapes.Elements[LandscapeIndex].ComponentUObject;
ELightMapPaddingType PaddingType = LMPT_NoPadding;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:610
Scope (from outer to inner):
file
function void FLightmassExporter::WriteToChannel
Source code excerpt:
TotalProgress =
DirectionalLights.Num() + PointLights.Num() + SpotLights.Num() + RectLights.Num() + SkyLights.Num() +
StaticMeshes.Num() + StaticMeshLightingMeshes.Num() + StaticMeshTextureMappings.Num() +
BSPSurfaceMappings.Num() + VolumeMappings.Num() + Materials.Num() +
+ LandscapeLightingMeshes.Num() + LandscapeTextureMappings.Num();
CurrentProgress = 0;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:642
Scope (from outer to inner):
file
function void FLightmassExporter::WriteToChannel
Source code excerpt:
Scene.NumPointLights = PointLights.Num();
Scene.NumSpotLights = SpotLights.Num();
Scene.NumRectLights = RectLights.Num();
Scene.NumSkyLights = SkyLights.Num();
Scene.NumStaticMeshes = StaticMeshes.Num();
Scene.NumStaticMeshInstances = StaticMeshLightingMeshes.Num();
Scene.NumFluidSurfaceInstances = 0;
Scene.NumLandscapeInstances = LandscapeLightingMeshes.Num();
Scene.NumBSPMappings = BSPSurfaceMappings.Num();
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:1110
Scope (from outer to inner):
file
function void FLightmassExporter::WriteLights
Source code excerpt:
// Export rect lights.
for ( int32 LightIndex = 0; LightIndex < RectLights.Num(); ++LightIndex )
{
const URectLightComponent* Light = RectLights[LightIndex];
Lightmass::FLightData LightData;
Copy( Light, LightData );
LightData.IndirectLightingSaturation = Light->LightmassSettings.IndirectLightingSaturation;
LightData.ShadowExponent = Light->LightmassSettings.ShadowExponent;
LightData.ShadowResolutionScale = Light->ShadowResolutionScale;
LightData.LightSourceRadius = 0.5f * Light->SourceWidth;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:2614
Scope (from outer to inner):
file
function void FLightmassExporter::AddLight
Source code excerpt:
else if( RectLight )
{
RectLights.AddUnique(RectLight);
}
else if( SkyLight )
{
SkyLights.AddUnique(SkyLight);
}
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:3207
Scope (from outer to inner):
file
function bool FLightmassProcessor::BeginRun
Source code excerpt:
}
for (int32 LightIndex = 0; LightIndex < Exporter->RectLights.Num(); LightIndex++)
{
const ULightComponent* Light = Exporter->RectLights[LightIndex];
IssueStaticShadowDepthMapTask(Light, 10000);
}
}
// Add BSP mapping tasks.
for( int32 MappingIdx=0; (ErrorCode >= 0) && MappingIdx < Exporter->BSPSurfaceMappings.Num() && !GEditor->GetMapBuildCancelled(); MappingIdx++ )
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:4418
Scope (from outer to inner):
file
function ULightComponent* FLightmassProcessor::FindLight
Source code excerpt:
}
}
for (LightIndex = 0; LightIndex < Exporter->RectLights.Num(); LightIndex++)
{
const URectLightComponent* Light = Exporter->RectLights[LightIndex];
if (Light)
{
if (Light->LightGuid == LightGuid)
{
return (ULightComponent*)Light;
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.h:238
Scope (from outer to inner):
file
class class FLightmassExporter
Source code excerpt:
TArray<const class UPointLightComponent*> PointLights;
TArray<const class USpotLightComponent*> SpotLights;
TArray<const class URectLightComponent*> RectLights;
TArray<const class USkyLightComponent*> SkyLights;
// BSP mappings
TArray<class FBSPSurfaceStaticLighting*> BSPSurfaceMappings;
TArray<const class UModel*> Models;
#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Private/ImportExport/LightmassScene.cpp:200
Scope (from outer to inner):
file
namespace Lightmass
function void FScene::Import
Source code excerpt:
Importer.ImportObjectArray( PointLights, NumPointLights, Importer.GetLights() );
Importer.ImportObjectArray( SpotLights, NumSpotLights, Importer.GetLights() );
Importer.ImportObjectArray( RectLights, NumRectLights, Importer.GetLights() );
Importer.ImportObjectArray( SkyLights, NumSkyLights, Importer.GetLights() );
Importer.ImportObjectArray( StaticMeshInstances, NumStaticMeshInstances, Importer.GetStaticMeshInstances() );
Importer.ImportObjectArray( FluidMeshInstances, NumFluidSurfaceInstances, Importer.GetFluidMeshInstances() );
Importer.ImportObjectArray( LandscapeMeshInstances, NumLandscapeInstances, Importer.GetLandscapeMeshInstances() );
Importer.ImportObjectArray( BspMappings, NumBSPMappings, Importer.GetBSPMappings() );
#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Private/ImportExport/LightmassScene.cpp:327
Scope (from outer to inner):
file
namespace Lightmass
function const FLight* FScene::FindLightByGuid
Source code excerpt:
}
}
for (int32 i = 0; i < RectLights.Num(); i++)
{
if (RectLights[i].Guid == InGuid)
{
return &RectLights[i];
}
}
for (int32 i = 0; i < SkyLights.Num(); i++)
{
if (SkyLights[i].Guid == InGuid)
{
#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Private/ImportExport/LightmassScene.h:763
Scope (from outer to inner):
file
namespace Lightmass
class class FScene : public FSceneFileHeader
Source code excerpt:
TArray<FPointLight> PointLights;
TArray<FSpotLight> SpotLights;
TArray<FRectLight> RectLights;
TArray<FSkyLight> SkyLights;
TArray<FStaticMeshStaticLightingMesh> StaticMeshInstances;
TArray<FFluidSurfaceStaticLightingMesh> FluidMeshInstances;
TArray<FLandscapeStaticLightingMesh> LandscapeMeshInstances;
TArray<FBSPSurfaceStaticLighting> BspMappings;
#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Private/Lighting/LightingSystem.cpp:478
Scope (from outer to inner):
file
namespace Lightmass
function FStaticLightingSystem::FStaticLightingSystem
Source code excerpt:
MaxRayDistance = ImportanceBounds.SphereRadius > 0.0f ? ImportanceBounds.SphereRadius * 2.0f : SceneBounds.SphereRadius * 2.0f;
Stats.NumLights = InScene.DirectionalLights.Num() + InScene.PointLights.Num() + InScene.SpotLights.Num() + InScene.RectLights.Num() + MeshAreaLights.Num();
Stats.NumMeshAreaLights = MeshAreaLights.Num();
for (int32 i = 0; i < MeshAreaLights.Num(); i++)
{
Stats.NumMeshAreaLightPrimitives += MeshAreaLights[i].GetNumPrimitives();
Stats.NumSimplifiedMeshAreaLightPrimitives += MeshAreaLights[i].GetNumSimplifiedPrimitives();
}
#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Private/Lighting/LightingSystem.cpp:515
Scope (from outer to inner):
file
namespace Lightmass
function FStaticLightingSystem::FStaticLightingSystem
Source code excerpt:
}
for (int32 LightIndex = 0; LightIndex < InScene.RectLights.Num(); LightIndex++)
{
InScene.RectLights[LightIndex].Initialize(Scene.PhotonMappingSettings.IndirectPhotonEmitConeAngle);
Lights.Add(&InScene.RectLights[LightIndex]);
}
const FBoxSphereBounds3f EffectiveImportanceBounds = ImportanceBounds.SphereRadius > 0.0f ? ImportanceBounds : SceneBounds;
for (int32 LightIndex = 0; LightIndex < MeshAreaLights.Num(); LightIndex++)
{
MeshAreaLights[LightIndex].Initialize(Scene.PhotonMappingSettings.IndirectPhotonEmitConeAngle, EffectiveImportanceBounds);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:83
Scope: file
Source code excerpt:
SHOWFLAG_ALWAYS_ACCESSIBLE(SpotLights, SFG_LightTypes, NSLOCTEXT("UnrealEd", "SpotLightsSF", "Spot Lights"))
/** Allows to disable lighting from Rect Lights, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(RectLights, SFG_LightTypes, NSLOCTEXT("UnrealEd", "RectLightsSF", "Rect Lights"))
/** Color correction after tone mapping */
SHOWFLAG_FIXED_IN_SHIPPING(1, ColorGrading, SFG_PostProcess, NSLOCTEXT("UnrealEd", "ColorGradingSF", "Color Grading"))
/** Visualize vector fields. */
SHOWFLAG_FIXED_IN_SHIPPING(0, VectorFields, SFG_Developer, NSLOCTEXT("UnrealEd", "VectorFieldsSF", "Vector Fields"))
/** Depth of Field */
SHOWFLAG_ALWAYS_ACCESSIBLE(DepthOfField, SFG_PostProcess, NSLOCTEXT("UnrealEd", "DepthOfFieldSF", "Depth Of Field"))
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/LightGridInjection.cpp:557
Scope: file
Source code excerpt:
if ((SortedLightInfo.SortKey.Fields.LightType == LightType_Point && ViewFamily.EngineShowFlags.PointLights) ||
(SortedLightInfo.SortKey.Fields.LightType == LightType_Spot && ViewFamily.EngineShowFlags.SpotLights) ||
(SortedLightInfo.SortKey.Fields.LightType == LightType_Rect && ViewFamily.EngineShowFlags.RectLights))
{
int32 PrevLocalLightIndex = INDEX_NONE;
if (View.ViewState)
{
PrevLocalLightIndex = View.ViewState->LightSceneIdToLocalLightIndex.FindOrAdd(LightSceneInfo->Id, INDEX_NONE);
View.ViewState->LightSceneIdToLocalLightIndex[LightSceneInfo->Id] = ForwardLocalLightData.Num();
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/LightSceneInfo.cpp:202
Scope (from outer to inner):
file
function bool FLightSceneInfo::ShouldRenderLight
Source code excerpt:
break;
case LightType_Rect:
if(!View.Family->EngineShowFlags.RectLights)
{
bLocalVisible = false;
}
break;
}
#endif
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PathTracing.cpp:2153
Scope (from outer to inner):
file
function void SetLightParameters
Source code excerpt:
if ( (LightComponentType == LightType_Directional) /* already handled by the loop above */ ||
((LightComponentType == LightType_Rect ) && !View.Family->EngineShowFlags.RectLights ) ||
((LightComponentType == LightType_Spot ) && !View.Family->EngineShowFlags.SpotLights ) ||
((LightComponentType == LightType_Point ) && !View.Family->EngineShowFlags.PointLights ))
{
// This light type is not currently enabled
continue;
}
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PathTracing.cpp:2487
Scope: file
Source code excerpt:
Config.LightShowFlags |= View.Family->EngineShowFlags.SkyLighting ? 1 << 0 : 0;
Config.LightShowFlags |= View.Family->EngineShowFlags.DirectionalLights ? 1 << 1 : 0;
Config.LightShowFlags |= View.Family->EngineShowFlags.RectLights ? 1 << 2 : 0;
Config.LightShowFlags |= View.Family->EngineShowFlags.SpotLights ? 1 << 3 : 0;
Config.LightShowFlags |= View.Family->EngineShowFlags.PointLights ? 1 << 4 : 0;
Config.LightShowFlags |= View.Family->EngineShowFlags.TexturedLightProfiles ? 1 << 5 : 0;
Config.LightShowFlags |= View.Family->EngineShowFlags.LightFunctions ? 1 << 6 : 0;
Config.LightShowFlags |= CVarPathTracingLightFunctionColor.GetValueOnRenderThread() ? 1 << 7 : 0;
// the following flags all mess with diffuse/spec overrides and therefore change the image