ShowFlag.TexturedLightProfiles
ShowFlag.TexturedLightProfiles
#Overview
name: ShowFlag.TexturedLightProfiles
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 6
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ShowFlag.TexturedLightProfiles is to control the visibility and rendering of textured light profiles, also known as IES (Illuminating Engineering Society) textures, in the Unreal Engine 5 rendering system.
This setting variable is primarily used by the rendering system, specifically in the lighting and path tracing subsystems. The main modules that rely on this variable are:
- The Renderer module
- The Engine module
The value of this variable is set through the engine show flags system, which allows toggling various rendering features on and off. It’s typically controlled via the engine’s user interface or through code.
The associated variable TexturedLightProfiles shares the same value and purpose as ShowFlag.TexturedLightProfiles. They are used interchangeably in different parts of the codebase.
When using this variable, developers should be aware of the following:
- It affects the rendering of IES textures, which are used to create realistic light distribution patterns.
- It’s always accessible, even in shipping builds, as it’s exposed in SceneCapture.
- It interacts with other lighting-related show flags and can impact overall rendering performance and visual quality.
Best practices when using this variable include:
- Consider the performance impact of enabling textured light profiles, especially on lower-end hardware.
- Use it in conjunction with other lighting-related show flags for a cohesive lighting setup.
- Test the visual impact of enabling/disabling this feature in different scenarios to ensure it meets the desired aesthetic goals.
As for the associated variable TexturedLightProfiles, it follows the same usage patterns and considerations as ShowFlag.TexturedLightProfiles. They are essentially two ways of referencing the same functionality within the engine.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:171
Scope: file
Source code excerpt:
SHOWFLAG_FIXED_IN_SHIPPING(0, GameplayDebug, SFG_Developer, NSLOCTEXT("UnrealEd", "GameplayDebugSF", "Gameplay Debug"))
/** LightProfiles, usually 1d textures to have a light (IES), for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(TexturedLightProfiles, SFG_LightingFeatures, NSLOCTEXT("UnrealEd", "TexturedLightProfilesSF", "Textured Light Profiles (IES Texture)"))
/** LightFunctions (masking light sources with a material), for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(LightFunctions, SFG_LightingFeatures, NSLOCTEXT("UnrealEd", "LightFunctionsSF", "Light Functions"))
/** Draws instanced static meshes that are not foliage or grass, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(InstancedStaticMeshes, SFG_Advanced, NSLOCTEXT("UnrealEd", "InstancedStaticMeshesSF", "Instanced Static Meshes"))
/** Draws instanced foliage, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(InstancedFoliage, SFG_Advanced, NSLOCTEXT("UnrealEd", "InstancedFoliageSF", "Foliage"))
#Associated Variable and Callsites
This variable is associated with another variable named TexturedLightProfiles
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:171
Scope: file
Source code excerpt:
SHOWFLAG_FIXED_IN_SHIPPING(0, GameplayDebug, SFG_Developer, NSLOCTEXT("UnrealEd", "GameplayDebugSF", "Gameplay Debug"))
/** LightProfiles, usually 1d textures to have a light (IES), for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(TexturedLightProfiles, SFG_LightingFeatures, NSLOCTEXT("UnrealEd", "TexturedLightProfilesSF", "Textured Light Profiles (IES Texture)"))
/** LightFunctions (masking light sources with a material), for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(LightFunctions, SFG_LightingFeatures, NSLOCTEXT("UnrealEd", "LightFunctionsSF", "Light Functions"))
/** Draws instanced static meshes that are not foliage or grass, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(InstancedStaticMeshes, SFG_Advanced, NSLOCTEXT("UnrealEd", "InstancedStaticMeshesSF", "Instanced Static Meshes"))
/** Draws instanced foliage, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(InstancedFoliage, SFG_Advanced, NSLOCTEXT("UnrealEd", "InstancedFoliageSF", "Foliage"))
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/LightRendering.cpp:2571
Scope: file
Source code excerpt:
const FLightSceneProxy* RESTRICT LightProxy = LightSceneInfo->Proxy;
const bool bUseIESTexture = View.Family->EngineShowFlags.TexturedLightProfiles && (LightSceneInfo->Proxy->GetIESTextureResource() != 0);
const bool bTransmission = LightProxy->Transmission();
const FSphere LightBounds = LightProxy->GetBoundingSphere();
const ELightComponentType LightType = (ELightComponentType)LightProxy->GetLightType();
const bool bIsRadial = LightType != LightType_Directional;
const bool bSupportAnisotropyPermutation = ShouldRenderAnisotropyPass(View) && !Substrate::IsSubstrateEnabled(); // Substrate managed anisotropy differently than legacy path. No need for special permutation.
const bool bUseVirtualShadowMapMask = VirtualShadowMapId != INDEX_NONE && ShadowMaskBits;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/LightRendering.cpp:2821
Scope: file
Source code excerpt:
else
{
const bool bUseIESTexture = View.Family->EngineShowFlags.TexturedLightProfiles && LightSceneInfo->Proxy->GetIESTextureResource() != 0;
PermutationVector.Set< FDeferredLightPS::FSourceShapeDim >(LightSceneInfo->Proxy->IsRectLight() ? ELightSourceShape::Rect : ELightSourceShape::Capsule);
PermutationVector.Set< FDeferredLightPS::FSourceTextureDim >(LightSceneInfo->Proxy->IsRectLight() && LightSceneInfo->Proxy->HasSourceTexture());
PermutationVector.Set< FDeferredLightPS::FIESProfileDim >(bUseIESTexture);
PermutationVector.Set< FDeferredLightPS::FAtmosphereTransmittance >(false);
PermutationVector.Set< FDeferredLightPS::FCloudTransmittance >(false);
}
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/MobileDeferredShadingPass.cpp:734
Scope (from outer to inner):
file
function static void RenderLocalLight
Source code excerpt:
}
const bool bUseIESTexture = View.Family->EngineShowFlags.TexturedLightProfiles && LightSceneInfo.Proxy->GetIESTextureResource();
FGraphicsPipelineStateInitializer GraphicsPSOInit;
RHICmdList.ApplyCachedRenderTargets(GraphicsPSOInit);
GraphicsPSOInit.BlendState = TStaticBlendState<CW_RGB, BO_Add, BF_One, BF_One, BO_Add, BF_One, BF_One>::GetRHI();
GraphicsPSOInit.PrimitiveType = PT_TriangleList;
const FSphere LightBounds = LightSceneInfo.Proxy->GetBoundingSphere();
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PathTracing.cpp:2490
Scope: file
Source code excerpt:
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;
Config.LightShowFlags |= View.Family->EngineShowFlags.OverrideDiffuseAndSpecular ? 1 << 10 : 0;