ShowFlag.SpotLights
ShowFlag.SpotLights
#Overview
name: ShowFlag.SpotLights
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 35
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ShowFlag.SpotLights is to control the visibility of spot lights in the rendering system. It is part of the show flags system in Unreal Engine, which allows toggling different rendering features on and off.
Key points about ShowFlag.SpotLights:
-
It’s used in the rendering system to determine whether spot lights should be rendered or not.
-
The Unreal Engine’s renderer, particularly in modules like the Path Tracer and Light Grid Injection, relies on this setting to decide whether to process spot lights.
-
The value is typically set through the engine’s show flags system, which is accessible in the editor and can be manipulated programmatically.
-
It’s defined as SHOWFLAG_ALWAYS_ACCESSIBLE, meaning it’s always available to be toggled, even in shipping builds. This is because it’s exposed in features like SceneCapture.
-
The associated variable SpotLights is used in various parts of the engine, particularly in the GPU Lightmass system, to store and manage spot light data.
-
When using this variable, developers should be aware that toggling it off will disable all spot light rendering, which can significantly affect the scene’s appearance.
-
Best practices include:
- Using it for debugging or performance optimization
- Being cautious when toggling it in shipping builds, as it can dramatically change the look of the game
- Considering its state when implementing custom rendering features that involve spot lights
-
Other light types (like point lights and rect lights) have similar show flags, and they often need to be considered together when working with lighting systems.
The associated variable SpotLights is used to store and manage spot light data in various subsystems, particularly in the GPU Lightmass system. It’s typically an array or collection of spot light objects used for rendering and lighting calculations.
When working with SpotLights, developers should:
- Ensure proper initialization and cleanup of spot light data
- Consider performance implications when adding or removing spot lights
- Be aware of how changes to spot lights affect the overall lighting of the scene
- Coordinate with the ShowFlag.SpotLights setting to ensure consistent behavior
In summary, ShowFlag.SpotLights and its associated SpotLights variable are crucial components in Unreal Engine’s lighting system, providing control over the visibility and management of spot lights in the rendered scene.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:81
Scope: file
Source code excerpt:
SHOWFLAG_ALWAYS_ACCESSIBLE(PointLights, SFG_LightTypes, NSLOCTEXT("UnrealEd", "PointLightsSF", "Point Lights"))
/** Allows to disable lighting from Spot Lights, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
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"))
#Associated Variable and Callsites
This variable is associated with another variable named SpotLights
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/PathTracingLightParameters.inl:96
Scope (from outer to inner):
file
function void SetupPathTracingLightParameters
Source code excerpt:
}
for (auto Light : LightScene.SpotLights.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:382
Scope (from outer to inner):
file
namespace GPULightmass
Source code excerpt:
TLightArray<FDirectionalLightBuildInfo> DirectionalLights;
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:396
Scope (from outer to inner):
file
namespace GPULightmass
Source code excerpt:
TLightRenderStateArray<FDirectionalLightRenderState> DirectionalLights;
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:329
Scope (from outer to inner):
file
namespace GPULightmass
function inline static LightArrayType& GetLightArray
Source code excerpt:
inline static LightArrayType& GetLightArray(FLightScene& LightScene)
{
return LightScene.SpotLights;
}
using LightRenderStateArrayType = TLightRenderStateArray<RenderStateType>;
inline static LightRenderStateArrayType& GetLightRenderStateArray(FLightSceneRenderState& LightSceneRenderState)
{
return LightSceneRenderState.SpotLights;
}
};
template<>
struct LightTypeInfo<URectLightComponent>
{
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:814
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),
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:847
Scope (from outer to inner):
file
function void FScene::AddGeometryInstanceFromComponent
lambda-function
Source code excerpt:
for (int32 ElementId : RelevantSpotLightsToAddOnRenderThread)
{
LightmapRenderState->AddRelevantLight(FSpotLightRenderStateRef(RenderState.LightSceneRenderState.SpotLights.Elements[ElementId], RenderState.LightSceneRenderState.SpotLights));
}
for (int32 ElementId : RelevantRectLightsToAddOnRenderThread)
{
LightmapRenderState->AddRelevantLight(FRectLightRenderStateRef(RenderState.LightSceneRenderState.RectLights.Elements[ElementId], RenderState.LightSceneRenderState.RectLights));
}
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1033
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),
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1075
Scope (from outer to inner):
file
function void FScene::AddGeometryInstanceFromComponent
lambda-function
Source code excerpt:
for (int32 ElementId : RelevantSpotLightsToAddOnRenderThread)
{
LightmapRenderState->AddRelevantLight(FSpotLightRenderStateRef(RenderState.LightSceneRenderState.SpotLights.Elements[ElementId], RenderState.LightSceneRenderState.SpotLights));
}
for (int32 ElementId : RelevantRectLightsToAddOnRenderThread)
{
LightmapRenderState->AddRelevantLight(FRectLightRenderStateRef(RenderState.LightSceneRenderState.RectLights.Elements[ElementId], RenderState.LightSceneRenderState.RectLights));
}
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1253
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,
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1388
Scope (from outer to inner):
file
function void FScene::AddGeometryInstanceFromComponent
lambda-function
Source code excerpt:
for (int32 ElementId : RelevantSpotLightsToAddOnRenderThread)
{
LightmapRenderState->AddRelevantLight(FSpotLightRenderStateRef(RenderState.LightSceneRenderState.SpotLights.Elements[ElementId], RenderState.LightSceneRenderState.SpotLights));
}
for (int32 ElementId : RelevantRectLightsToAddOnRenderThread)
{
LightmapRenderState->AddRelevantLight(FRectLightRenderStateRef(RenderState.LightSceneRenderState.RectLights.Elements[ElementId], RenderState.LightSceneRenderState.RectLights));
}
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1845
Scope (from outer to inner):
file
namespace GPULightmass
function void FScene::AddRelevantStaticLightGUIDs
Source code excerpt:
}
for (FSpotLightBuildInfo& SpotLight : LightScene.SpotLights.Elements)
{
if (!SpotLight.bStationary)
{
USpotLightComponent* Light = SpotLight.ComponentUObject;
if (SpotLight.AffectsBounds(WorldBounds))
{
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1937
Scope (from outer to inner):
file
namespace GPULightmass
function void FScene::ApplyFinishedLightmapsToWorld
Source code excerpt:
}
for (FSpotLightBuildInfo& SpotLight : LightScene.SpotLights.Elements)
{
SpotLight.AllocateMapBuildData(LightingScenario ? LightingScenario : SpotLight.ComponentUObject->GetOwner()->GetLevel());
}
for (FRectLightBuildInfo& RectLight : LightScene.RectLights.Elements)
{
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:2301
Scope (from outer to inner):
file
function void FScene::ApplyFinishedLightmapsToWorld
Source code excerpt:
{
int32 ElementId = SpotLight.GetElementIdChecked();
TransencodeShadowMap(LightScene.SpotLights.Elements[ElementId], SpotLight);
}
for (FRectLightRenderStateRef& RectLight : Lightmap.RelevantRectLights)
{
int32 ElementId = RectLight.GetElementIdChecked();
TransencodeShadowMap(LightScene.RectLights.Elements[ElementId], RectLight);
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:2631
Scope: file
Source code excerpt:
}
ShadowMaps.Add(LightScene.SpotLights.Elements[SpotLight.GetElementIdChecked()].ComponentUObject, MoveTemp(ShadowMap));
}
for (FRectLightRenderStateRef& RectLight : Lightmap.RelevantRectLights)
{
check(RectLight->bStationary && RectLight->bCastShadow);
check(RectLight->ShadowMapChannel != INDEX_NONE);
#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:2920
Scope (from outer to inner):
file
function void FScene::ApplyFinishedLightmapsToWorld
Source code excerpt:
{
int32 ElementId = SpotLight.GetElementIdChecked();
TransencodeShadowMap(LightScene.SpotLights.Elements[ElementId], SpotLight);
}
for (FRectLightRenderStateRef& RectLight : Lightmap.RelevantRectLights)
{
int32 ElementId = RectLight.GetElementIdChecked();
TransencodeShadowMap(LightScene.RectLights.Elements[ElementId], RectLight);
#Loc: <Workspace>/Engine/Plugins/Experimental/GizmoEdMode/Source/LightGizmos/Private/SpotLightGizmoFactory.cpp:30
Scope (from outer to inner):
file
function bool USpotLightGizmoFactory::CanBuildGizmoForSelection
Source code excerpt:
}
// Only return true if all actors in selection are SpotLights
return true;
}
TArray<UInteractiveGizmo*> USpotLightGizmoFactory::BuildGizmoForSelection(FEditorModeTools* ModeTools, UInteractiveGizmoManager* GizmoManager) const
{
TArray<UInteractiveGizmo*> Gizmos;
#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/LightEditorSubsystem.cpp:43
Scope (from outer to inner):
file
function void ULightEditorSubsystem::ExtendQuickActionMenu
lambda-function
Source code excerpt:
if (Context && Context->CurrentSelection && Context->CurrentSelection->GetElementList()->Num() > 0)
{
// Only SpotLights Selected
if (Context->CurrentSelection->CountSelectedObjects<ASpotLight>() == Context->CurrentSelection->GetNumSelectedElements())
{
FToolMenuEntry& SwapLightEntry = InSection.AddEntry(FToolMenuEntry::InitToolBarButton(
"SwapLightTypes",
FToolUIAction(FToolMenuExecuteAction::CreateUObject(this, &ULightEditorSubsystem::SwapLightType, APointLight::StaticClass())),
LOCTEXT("SwapToPointLights", "Swap to Point Lights"),
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:610
Scope: file
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:641
Scope (from outer to inner):
file
function void FLightmassExporter::WriteToChannel
Source code excerpt:
Scene.NumDirectionalLights = DirectionalLights.Num();
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();
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:1081
Scope (from outer to inner):
file
function void FLightmassExporter::WriteLights
Source code excerpt:
// Export spot lights.
for ( int32 LightIndex = 0; LightIndex < SpotLights.Num(); ++LightIndex )
{
const USpotLightComponent* Light = SpotLights[LightIndex];
Lightmass::FLightData LightData;
Lightmass::FPointLightData PointData;
Lightmass::FSpotLightData SpotData;
Copy( Light, LightData );
LightData.IndirectLightingSaturation = Light->LightmassSettings.IndirectLightingSaturation;
LightData.ShadowExponent = Light->LightmassSettings.ShadowExponent;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:2606
Scope (from outer to inner):
file
function void FLightmassExporter::AddLight
Source code excerpt:
else if( SpotLight )
{
SpotLights.AddUnique(SpotLight);
}
else if( PointLight )
{
PointLights.AddUnique(PointLight);
}
else if( RectLight )
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:3195
Scope (from outer to inner):
file
function bool FLightmassProcessor::BeginRun
Source code excerpt:
}
for (int32 LightIndex = 0; LightIndex < Exporter->SpotLights.Num(); LightIndex++)
{
const ULightComponent* Light = Exporter->SpotLights[LightIndex];
IssueStaticShadowDepthMapTask(Light, 10000);
}
for (int32 LightIndex = 0; LightIndex < Exporter->PointLights.Num(); LightIndex++)
{
const ULightComponent* Light = Exporter->PointLights[LightIndex];
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:4407
Scope (from outer to inner):
file
function ULightComponent* FLightmassProcessor::FindLight
Source code excerpt:
}
}
for (LightIndex = 0; LightIndex < Exporter->SpotLights.Num(); LightIndex++)
{
const USpotLightComponent* Light = Exporter->SpotLights[LightIndex];
if (Light)
{
if (Light->LightGuid == LightGuid)
{
return (ULightComponent*)Light;
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.h:237
Scope (from outer to inner):
file
class class FLightmassExporter
Source code excerpt:
TArray<const class UDirectionalLightComponent*> DirectionalLights;
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:199
Scope (from outer to inner):
file
namespace Lightmass
function void FScene::Import
Source code excerpt:
Importer.ImportObjectArray( DirectionalLights, NumDirectionalLights, Importer.GetLights() );
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() );
#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Private/ImportExport/LightmassScene.cpp:320
Scope (from outer to inner):
file
namespace Lightmass
function const FLight* FScene::FindLightByGuid
Source code excerpt:
}
}
for (int32 i = 0; i < SpotLights.Num(); i++)
{
if (SpotLights[i].Guid == InGuid)
{
return &SpotLights[i];
}
}
for (int32 i = 0; i < RectLights.Num(); i++)
{
if (RectLights[i].Guid == InGuid)
{
#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Private/ImportExport/LightmassScene.h:762
Scope (from outer to inner):
file
namespace Lightmass
class class FScene : public FSceneFileHeader
Source code excerpt:
TArray<FDirectionalLight> DirectionalLights;
TArray<FPointLight> PointLights;
TArray<FSpotLight> SpotLights;
TArray<FRectLight> RectLights;
TArray<FSkyLight> SkyLights;
TArray<FStaticMeshStaticLightingMesh> StaticMeshInstances;
TArray<FFluidSurfaceStaticLightingMesh> FluidMeshInstances;
TArray<FLandscapeStaticLightingMesh> LandscapeMeshInstances;
#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:509
Scope (from outer to inner):
file
namespace Lightmass
function FStaticLightingSystem::FStaticLightingSystem
Source code excerpt:
}
for (int32 LightIndex = 0; LightIndex < InScene.SpotLights.Num(); LightIndex++)
{
InScene.SpotLights[LightIndex].Initialize(Scene.PhotonMappingSettings.IndirectPhotonEmitConeAngle);
Lights.Add(&InScene.SpotLights[LightIndex]);
}
for (int32 LightIndex = 0; LightIndex < InScene.RectLights.Num(); LightIndex++)
{
InScene.RectLights[LightIndex].Initialize(Scene.PhotonMappingSettings.IndirectPhotonEmitConeAngle);
Lights.Add(&InScene.RectLights[LightIndex]);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:81
Scope: file
Source code excerpt:
SHOWFLAG_ALWAYS_ACCESSIBLE(PointLights, SFG_LightTypes, NSLOCTEXT("UnrealEd", "PointLightsSF", "Point Lights"))
/** Allows to disable lighting from Spot Lights, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
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"))
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/LightGridInjection.cpp:556
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);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/LightSceneInfo.cpp:196
Scope (from outer to inner):
file
function bool FLightSceneInfo::ShouldRenderLight
Source code excerpt:
break;
case LightType_Spot:
if(!View.Family->EngineShowFlags.SpotLights)
{
bLocalVisible = false;
}
break;
case LightType_Rect:
if(!View.Family->EngineShowFlags.RectLights)
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PathTracing.cpp:2154
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:2488
Scope: file
Source code excerpt:
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
Config.LightShowFlags |= View.Family->EngineShowFlags.Diffuse ? 1 << 8 : 0;