ShowFlag.PointLights

ShowFlag.PointLights

#Overview

name: ShowFlag.PointLights

This variable is created as a Console Variable (cvar).

It is referenced in 34 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of ShowFlag.PointLights is to allow enabling or disabling lighting from point lights in the rendering system. Here are the key points about this setting variable:

  1. It’s part of the rendering system, specifically used to control visibility of point lights during rendering.

  2. This setting is used by multiple Unreal Engine subsystems, including the renderer, light grid injection, path tracing, and the static lighting system.

  3. The value of this variable is typically set through the engine show flags, which can be controlled via the UI or programmatically.

  4. It interacts with other light type show flags like DirectionalLights, SpotLights, and RectLights. These are often checked together to determine which light types should be rendered.

  5. Developers must be aware that disabling this flag will cause point lights to be skipped during rendering, which can significantly change the appearance of a scene.

  6. Best practices include:

    • Ensuring this flag is enabled when point lights are crucial for scene lighting.
    • Using it for debugging or performance optimization by selectively disabling light types.
    • Being cautious when modifying this flag, as it can affect both real-time and baked lighting.

Regarding the associated variable PointLights:

The purpose of PointLights is to store and manage point light data within various lighting and scene management systems in Unreal Engine.

  1. It’s used in multiple contexts, including GPU lightmass calculations, static lighting systems, and scene management.

  2. This variable is typically an array or collection that holds point light objects or data structures.

  3. The value of this variable is set during scene setup or light initialization processes.

  4. It interacts closely with other light type arrays like DirectionalLights, SpotLights, and RectLights.

  5. Developers should be aware that modifications to this array can have wide-ranging effects on lighting calculations and performance.

  6. Best practices include:

    • Properly initializing point lights before adding them to this collection.
    • Managing memory efficiently, especially for large numbers of lights.
    • Considering the performance impact of having many point lights in a scene.

Both ShowFlag.PointLights and PointLights are crucial for the proper functioning of lighting systems in Unreal Engine, and developers should handle them with care to ensure correct rendering and optimal performance.

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:79

Scope: file

Source code excerpt:

SHOWFLAG_FIXED_IN_SHIPPING(1, DirectionalLights, SFG_LightTypes, NSLOCTEXT("UnrealEd", "DirectionalLightsSF", "Directional Lights"))
/** Allows to disable lighting from Point Lights, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
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"))

#Associated Variable and Callsites

This variable is associated with another variable named PointLights. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/PathTracingLightParameters.inl:73

Scope (from outer to inner):

file
function     void SetupPathTracingLightParameters

Source code excerpt:

	uint32 NumInfiniteLights = Lights.Num();

	for (auto Light : LightScene.PointLights.Elements)
	{
		FPathTracingLight& DestLight = Lights.AddDefaulted_GetRef();

		DestLight.TranslatedWorldPosition = FVector3f(Light.Position + View.ViewMatrices.GetPreViewTranslation());
		DestLight.Color = (FVector3f)(Light.Color);
		DestLight.Normal = (FVector3f)Light.Direction;

#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Lights.h:381

Scope (from outer to inner):

file
namespace    GPULightmass

Source code excerpt:

	TOptional<FSkyLightBuildInfo> SkyLight;
	TLightArray<FDirectionalLightBuildInfo> DirectionalLights;
	TLightArray<FPointLightBuildInfo> PointLights;
	TLightArray<FSpotLightBuildInfo> SpotLights;
	TLightArray<FRectLightBuildInfo> RectLights;

	TMap<UDirectionalLightComponent*, FDirectionalLightRef> RegisteredDirectionalLightComponentUObjects;
	TMap<UPointLightComponent*, FPointLightRef> RegisteredPointLightComponentUObjects;
	TMap<USpotLightComponent*, FSpotLightRef> RegisteredSpotLightComponentUObjects;

#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Lights.h:395

Scope (from outer to inner):

file
namespace    GPULightmass

Source code excerpt:

	TOptional<FSkyLightRenderState> SkyLight;
	TLightRenderStateArray<FDirectionalLightRenderState> DirectionalLights;
	TLightRenderStateArray<FPointLightRenderState> PointLights;
	TLightRenderStateArray<FSpotLightRenderState> SpotLights;
	TLightRenderStateArray<FRectLightRenderState> RectLights;
};

}

#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:302

Scope (from outer to inner):

file
namespace    GPULightmass
function     inline static LightArrayType& GetLightArray

Source code excerpt:

	inline static LightArrayType& GetLightArray(FLightScene& LightScene)
	{
		return LightScene.PointLights;
	}

	using LightRenderStateArrayType = TLightRenderStateArray<RenderStateType>;
	inline static LightRenderStateArrayType& GetLightRenderStateArray(FLightSceneRenderState& LightSceneRenderState)
	{
		return LightSceneRenderState.PointLights;
	}
};

template<>
struct LightTypeInfo<USpotLightComponent>
{

#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:813

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,

#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:842

Scope (from outer to inner):

file
function     void FScene::AddGeometryInstanceFromComponent
lambda-function

Source code excerpt:

				for (int32 ElementId : RelevantPointLightsToAddOnRenderThread)
				{
					LightmapRenderState->AddRelevantLight(FPointLightRenderStateRef(RenderState.LightSceneRenderState.PointLights.Elements[ElementId], RenderState.LightSceneRenderState.PointLights));
				}

				for (int32 ElementId : RelevantSpotLightsToAddOnRenderThread)
				{
					LightmapRenderState->AddRelevantLight(FSpotLightRenderStateRef(RenderState.LightSceneRenderState.SpotLights.Elements[ElementId], RenderState.LightSceneRenderState.SpotLights));
				}

#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1032

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,

#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1070

Scope (from outer to inner):

file
function     void FScene::AddGeometryInstanceFromComponent
lambda-function

Source code excerpt:

				for (int32 ElementId : RelevantPointLightsToAddOnRenderThread)
				{
					LightmapRenderState->AddRelevantLight(FPointLightRenderStateRef(RenderState.LightSceneRenderState.PointLights.Elements[ElementId], RenderState.LightSceneRenderState.PointLights));
				}

				for (int32 ElementId : RelevantSpotLightsToAddOnRenderThread)
				{
					LightmapRenderState->AddRelevantLight(FSpotLightRenderStateRef(RenderState.LightSceneRenderState.SpotLights.Elements[ElementId], RenderState.LightSceneRenderState.SpotLights));
				}

#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1252

Scope (from outer to inner):

file
namespace    GPULightmass
function     void FScene::AddGeometryInstanceFromComponent

Source code excerpt:

	Initializer.InvLODBlendRange           = 1.0f / FMath::Max(InComponent->GetLandscapeProxy()->LODBlendRange, 0.01f);

	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),

#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1383

Scope (from outer to inner):

file
function     void FScene::AddGeometryInstanceFromComponent
lambda-function

Source code excerpt:

				for (int32 ElementId : RelevantPointLightsToAddOnRenderThread)
				{
					LightmapRenderState->AddRelevantLight(FPointLightRenderStateRef(RenderState.LightSceneRenderState.PointLights.Elements[ElementId], RenderState.LightSceneRenderState.PointLights));
				}

				for (int32 ElementId : RelevantSpotLightsToAddOnRenderThread)
				{
					LightmapRenderState->AddRelevantLight(FSpotLightRenderStateRef(RenderState.LightSceneRenderState.SpotLights.Elements[ElementId], RenderState.LightSceneRenderState.SpotLights));
				}

#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1833

Scope (from outer to inner):

file
namespace    GPULightmass
function     void FScene::AddRelevantStaticLightGUIDs

Source code excerpt:

	}

	for (FPointLightBuildInfo& PointLight : LightScene.PointLights.Elements)
	{
		if (!PointLight.bStationary)
		{
			UPointLightComponent* Light = PointLight.ComponentUObject;
			if (PointLight.AffectsBounds(WorldBounds))
			{

#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:1932

Scope (from outer to inner):

file
namespace    GPULightmass
function     void FScene::ApplyFinishedLightmapsToWorld

Source code excerpt:

		}

		for (FPointLightBuildInfo& PointLight : LightScene.PointLights.Elements)
		{
			PointLight.AllocateMapBuildData(LightingScenario ? LightingScenario : PointLight.ComponentUObject->GetOwner()->GetLevel());
		}

		for (FSpotLightBuildInfo& SpotLight : LightScene.SpotLights.Elements)
		{

#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:2295

Scope (from outer to inner):

file
function     void FScene::ApplyFinishedLightmapsToWorld

Source code excerpt:

							{
								int32 ElementId = PointLight.GetElementIdChecked();
								TransencodeShadowMap(LightScene.PointLights.Elements[ElementId], PointLight);
							}

							for (FSpotLightRenderStateRef& SpotLight : Lightmap.RelevantSpotLights)
							{
								int32 ElementId = SpotLight.GetElementIdChecked();
								TransencodeShadowMap(LightScene.SpotLights.Elements[ElementId], SpotLight);

#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:2606

Scope: file

Source code excerpt:

									}

									ShadowMaps.Add(LightScene.PointLights.Elements[PointLight.GetElementIdChecked()].ComponentUObject, MoveTemp(ShadowMap));
								}

								for (FSpotLightRenderStateRef& SpotLight : Lightmap.RelevantSpotLights)
								{
									check(SpotLight->bStationary && SpotLight->bCastShadow);
									check(SpotLight->ShadowMapChannel != INDEX_NONE);

#Loc: <Workspace>/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/Scene/Scene.cpp:2914

Scope (from outer to inner):

file
function     void FScene::ApplyFinishedLightmapsToWorld

Source code excerpt:

							{
								int32 ElementId = PointLight.GetElementIdChecked();
								TransencodeShadowMap(LightScene.PointLights.Elements[ElementId], PointLight);
							}

							for (FSpotLightRenderStateRef& SpotLight : Lightmap.RelevantSpotLights)
							{
								int32 ElementId = SpotLight.GetElementIdChecked();
								TransencodeShadowMap(LightScene.SpotLights.Elements[ElementId], SpotLight);

#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/LightEditorSubsystem.cpp:55

Scope (from outer to inner):

file
function     void ULightEditorSubsystem::ExtendQuickActionMenu
lambda-function

Source code excerpt:

						SwapLightEntry.AddKeybindFromCommand(FLightEditingCommands::Get().SwapLightType);
					}
					// Only PointLights selected
					if (Context->CurrentSelection->CountSelectedObjects<APointLight>() == Context->CurrentSelection->GetNumSelectedElements())
					{
						FToolMenuEntry& SwapLightEntry = InSection.AddEntry(FToolMenuEntry::InitToolBarButton(
							"SwapLightTypes",
							FToolUIAction(FToolMenuExecuteAction::CreateUObject(this, &ULightEditorSubsystem::SwapLightType, ASpotLight::StaticClass())),
							LOCTEXT("SwapToSpotLights", "Swap to Spot 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:640

Scope (from outer to inner):

file
function     void FLightmassExporter::WriteToChannel

Source code excerpt:

			Scene.NumPortals = Portals.Num();
			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;

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:1056

Scope (from outer to inner):

file
function     void FLightmassExporter::WriteLights

Source code excerpt:


	// Export point lights.
	for ( int32 LightIndex = 0; LightIndex < PointLights.Num(); ++LightIndex )
	{
		const UPointLightComponent* Light = PointLights[LightIndex];
		Lightmass::FLightData LightData;
		Lightmass::FPointLightData PointData;
		Copy( Light, LightData );
		LightData.IndirectLightingSaturation = Light->LightmassSettings.IndirectLightingSaturation;
		LightData.ShadowExponent = Light->LightmassSettings.ShadowExponent;
		LightData.ShadowResolutionScale = Light->ShadowResolutionScale;

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:2610

Scope (from outer to inner):

file
function     void FLightmassExporter::AddLight

Source code excerpt:

	else if( PointLight )
	{
		PointLights.AddUnique(PointLight);
	}
	else if( RectLight )
	{
		RectLights.AddUnique(RectLight);
	}
	else if( SkyLight )

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:3201

Scope (from outer to inner):

file
function     bool FLightmassProcessor::BeginRun

Source code excerpt:

			}

			for (int32 LightIndex = 0; LightIndex < Exporter->PointLights.Num(); LightIndex++)
			{
				const ULightComponent* Light = Exporter->PointLights[LightIndex];
				IssueStaticShadowDepthMapTask(Light, 10000);
			}

			for (int32 LightIndex = 0; LightIndex < Exporter->RectLights.Num(); LightIndex++)
			{
				const ULightComponent* Light = Exporter->RectLights[LightIndex];

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.cpp:4396

Scope (from outer to inner):

file
function     ULightComponent* FLightmassProcessor::FindLight

Source code excerpt:

			}
		}
		for (LightIndex = 0; LightIndex < Exporter->PointLights.Num(); LightIndex++)
		{
			const UPointLightComponent* Light = Exporter->PointLights[LightIndex];
			if (Light)
			{
				if (Light->LightGuid == LightGuid)
				{
					return (ULightComponent*)Light;
				}

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Lightmass/Lightmass.h:236

Scope (from outer to inner):

file
class        class FLightmassExporter

Source code excerpt:

	// lights objects
	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;

#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Private/ImportExport/LightmassScene.cpp:198

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() );

#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Private/ImportExport/LightmassScene.cpp:313

Scope (from outer to inner):

file
namespace    Lightmass
function     const FLight* FScene::FindLightByGuid

Source code excerpt:

		}
	}
	for (int32 i = 0; i < PointLights.Num(); i++)
	{
		if (PointLights[i].Guid == InGuid)
		{
			return &PointLights[i];
		}
	}
	for (int32 i = 0; i < SpotLights.Num(); i++)
	{
		if (SpotLights[i].Guid == InGuid)
		{

#Loc: <Workspace>/Engine/Source/Programs/UnrealLightmass/Private/ImportExport/LightmassScene.h:761

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;

#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:503

Scope (from outer to inner):

file
namespace    Lightmass
function     FStaticLightingSystem::FStaticLightingSystem

Source code excerpt:

	
	// Initialize lights and add them to the solver's Lights array
	for (int32 LightIndex = 0; LightIndex < InScene.PointLights.Num(); LightIndex++)
	{
		InScene.PointLights[LightIndex].Initialize(Scene.PhotonMappingSettings.IndirectPhotonEmitConeAngle);
		Lights.Add(&InScene.PointLights[LightIndex]);
	}

	for (int32 LightIndex = 0; LightIndex < InScene.SpotLights.Num(); LightIndex++)
	{
		InScene.SpotLights[LightIndex].Initialize(Scene.PhotonMappingSettings.IndirectPhotonEmitConeAngle);
		Lights.Add(&InScene.SpotLights[LightIndex]);

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:79

Scope: file

Source code excerpt:

SHOWFLAG_FIXED_IN_SHIPPING(1, DirectionalLights, SFG_LightTypes, NSLOCTEXT("UnrealEd", "DirectionalLightsSF", "Directional Lights"))
/** Allows to disable lighting from Point Lights, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
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"))

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/LightGridInjection.cpp:555

Scope: file

Source code excerpt:

					const int32 VirtualShadowMapId = bDynamicShadows ? VisibleLightInfos[LightSceneInfo->Id].GetVirtualShadowMapId( &View ) : INDEX_NONE;

					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)
						{

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/LightSceneInfo.cpp:190

Scope (from outer to inner):

file
function     bool FLightSceneInfo::ShouldRenderLight

Source code excerpt:

			break;
		case LightType_Point:
			if(!View.Family->EngineShowFlags.PointLights) 
			{
				bLocalVisible = false;
			}
			break;
		case LightType_Spot:
			if(!View.Family->EngineShowFlags.SpotLights)

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PathTracing.cpp:2155

Scope (from outer to inner):

file
function     void SetLightParameters

Source code excerpt:

			((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;
		}

		FLightRenderParameters LightParameters;

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PathTracing.cpp:2489

Scope: file

Source code excerpt:

	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;
	Config.LightShowFlags |= View.Family->EngineShowFlags.Specular                   ? 1 << 9 : 0;