ShowFlag.SceneColorFringe

ShowFlag.SceneColorFringe

#Overview

name: ShowFlag.SceneColorFringe

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

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of ShowFlag.SceneColorFringe is to control the visibility of post-processing color fringe (chromatic aberration) effect in the rendering pipeline. This setting is part of the post-processing system in Unreal Engine 5.

The Unreal Engine subsystem that relies on this setting variable is the post-processing module, specifically the part responsible for rendering color fringe effects.

The value of this variable is set in the engine’s show flags system, which allows for toggling various rendering features. It’s defined in the ShowFlagsValues.inl file, which suggests it’s part of the core engine’s rendering configuration.

This variable interacts with another variable called SceneFringeIntensity. In the SceneView.cpp file, we can see that if either ShowFlag.SceneColorFringe or ShowFlag.CameraImperfections is false, the SceneFringeIntensity is set to 0, effectively disabling the color fringe effect.

Developers must be aware that this setting is fixed in shipping builds, as indicated by the SHOWFLAG_FIXED_IN_SHIPPING macro. This means that the value cannot be changed at runtime in a shipped game, ensuring consistent performance and visual quality.

Best practices when using this variable include:

  1. Use it in conjunction with ShowFlag.CameraImperfections for a more realistic camera effect.
  2. Be cautious about overusing the effect, as excessive color fringing can be visually distracting.
  3. Consider performance implications, especially on lower-end hardware, as post-processing effects can be computationally expensive.

Regarding the associated variable SceneColorFringe:

The purpose of SceneColorFringe is the same as ShowFlag.SceneColorFringe, controlling the visibility of the color fringe post-processing effect.

It’s used in the same post-processing subsystem of Unreal Engine 5.

The value is set in the same ShowFlagsValues.inl file, indicating it’s part of the core engine configuration.

It interacts directly with ShowFlag.SceneColorFringe, effectively being an alias or alternative reference to the same setting.

Developers should be aware that these two variables are interchangeable in most contexts.

The best practices for using SceneColorFringe are the same as those for ShowFlag.SceneColorFringe, as they represent the same functionality.

#References in C++ code

#Callsites

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

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

Scope: file

Source code excerpt:

SHOWFLAG_ALWAYS_ACCESSIBLE(CameraInterpolation, SFG_Hidden, NSLOCTEXT("UnrealEd", "CameraInterpolationSF", "Camera Interpolation"))
/** Post processing color fringe (chromatic aberration) */
SHOWFLAG_FIXED_IN_SHIPPING(1, SceneColorFringe, SFG_PostProcess, NSLOCTEXT("UnrealEd", "SceneColorFringeSF", "Scene Color Fringe"))
/** Post processing filmic tone curve and expand gamut */
SHOWFLAG_ALWAYS_ACCESSIBLE(ToneCurve, SFG_PostProcess, NSLOCTEXT("UnrealEd", "ToneCurveSF", "Tone Curve"))
/** If Translucency should be rendered into a separate RT and composited without DepthOfField, can be disabled in the materials (affects sorting), SHOWFLAG_ALWAYS_ACCESSIBLE for now because USceneCaptureComponent needs that */
SHOWFLAG_ALWAYS_ACCESSIBLE(SeparateTranslucency, SFG_Advanced, NSLOCTEXT("UnrealEd", "SeparateTranslucencySF", "Separate Translucency"))
/** If Screen Percentage should be applied.  */
SHOWFLAG_ALWAYS_ACCESSIBLE(ScreenPercentage, SFG_Hidden, NSLOCTEXT("UnrealEd", "ScreenPercentageSF", "Screen Percentage"))

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SceneView.cpp:2265

Scope (from outer to inner):

file
function     void FSceneView::EndFinalPostprocessSettings

Source code excerpt:

		}

		if(!Family->EngineShowFlags.SceneColorFringe || !Family->EngineShowFlags.CameraImperfections)
		{
			FinalPostProcessSettings.SceneFringeIntensity = 0;
		}
	}

	if (!Family->EngineShowFlags.Lighting || !Family->EngineShowFlags.GlobalIllumination)

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

Scope: file

Source code excerpt:

SHOWFLAG_ALWAYS_ACCESSIBLE(CameraInterpolation, SFG_Hidden, NSLOCTEXT("UnrealEd", "CameraInterpolationSF", "Camera Interpolation"))
/** Post processing color fringe (chromatic aberration) */
SHOWFLAG_FIXED_IN_SHIPPING(1, SceneColorFringe, SFG_PostProcess, NSLOCTEXT("UnrealEd", "SceneColorFringeSF", "Scene Color Fringe"))
/** Post processing filmic tone curve and expand gamut */
SHOWFLAG_ALWAYS_ACCESSIBLE(ToneCurve, SFG_PostProcess, NSLOCTEXT("UnrealEd", "ToneCurveSF", "Tone Curve"))
/** If Translucency should be rendered into a separate RT and composited without DepthOfField, can be disabled in the materials (affects sorting), SHOWFLAG_ALWAYS_ACCESSIBLE for now because USceneCaptureComponent needs that */
SHOWFLAG_ALWAYS_ACCESSIBLE(SeparateTranslucency, SFG_Advanced, NSLOCTEXT("UnrealEd", "SeparateTranslucencySF", "Separate Translucency"))
/** If Screen Percentage should be applied.  */
SHOWFLAG_ALWAYS_ACCESSIBLE(ScreenPercentage, SFG_Hidden, NSLOCTEXT("UnrealEd", "ScreenPercentageSF", "Screen Percentage"))