ShowFlag.CameraImperfections
ShowFlag.CameraImperfections
#Overview
name: ShowFlag.CameraImperfections
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 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ShowFlag.CameraImperfections is to control the visibility of camera imperfections in the rendering system, specifically for post-processing effects. It is primarily used to enable or disable visual effects that simulate real-world camera artifacts, such as bloom dirt masks and scene color fringe.
This setting variable is primarily relied upon by the Unreal Engine’s rendering system, particularly in the post-processing pipeline. It’s referenced in the Engine module, specifically in the SceneView and ShowFlags components.
The value of this variable is set through the engine’s show flags system. It’s defined as SHOWFLAG_FIXED_IN_SHIPPING(1, CameraImperfections, SFG_PostProcess, …), which means it’s enabled by default in shipping builds.
ShowFlag.CameraImperfections interacts with several other variables and settings:
- It affects the BloomDirtMaskIntensity in the FinalPostProcessSettings.
- It influences the SceneFringeIntensity when used in conjunction with the SceneColorFringe show flag.
- It can be disabled along with other post-processing effects in certain engine show flag override scenarios.
Developers should be aware that this variable directly impacts the visual fidelity and realism of the rendered scene. Disabling it may result in a cleaner, less realistic image, while enabling it can add subtle imperfections that enhance the overall visual quality.
Best practices when using this variable include:
- Consider the target platform and performance requirements when deciding whether to enable or disable this effect.
- Use it in conjunction with other post-processing effects for a cohesive visual style.
- Fine-tune related settings like BloomDirtMaskIntensity and SceneFringeIntensity to achieve the desired look.
Regarding the associated variable CameraImperfections, it appears to be the same variable used in different contexts within the engine. The purpose and usage are identical to ShowFlag.CameraImperfections. It’s referenced in the same locations and affects the same post-processing settings. Developers should treat it as an alias for ShowFlag.CameraImperfections and apply the same considerations and best practices when working with it.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:53
Scope: file
Source code excerpt:
SHOWFLAG_ALWAYS_ACCESSIBLE(Decals, SFG_Normal, NSLOCTEXT("UnrealEd", "DecalsSF", "Decals"))
/** like bloom dirt mask */
SHOWFLAG_FIXED_IN_SHIPPING(1, CameraImperfections, SFG_PostProcess, NSLOCTEXT("UnrealEd", "CameraImperfectionsSF", "Camera Imperfections"))
/** to allow to disable visualizetexture for some editor rendering (e.g. thumbnail rendering) */
SHOWFLAG_ALWAYS_ACCESSIBLE(OnScreenDebug, SFG_Developer, NSLOCTEXT("UnrealEd", "OnScreenDebugSF", "On Screen Debug"))
/** needed for VMI_Lit_DetailLighting, Whether to override material diffuse and specular with constants, used by the Detail Lighting viewmode. */
SHOWFLAG_FIXED_IN_SHIPPING(0, OverrideDiffuseAndSpecular, SFG_Hidden, NSLOCTEXT("UnrealEd", "OverrideDiffuseAndSpecularSF", "Override Diffuse And Specular"))
/** needed for VMI_LightingOnly, Whether to override material diffuse with constants, used by the Lighting Only viewmode. */
SHOWFLAG_FIXED_IN_SHIPPING(0, LightingOnlyOverride, SFG_Hidden, NSLOCTEXT("UnrealEd", "LightingOnlyOverrideSF", "Lighting Only"))
#Associated Variable and Callsites
This variable is associated with another variable named CameraImperfections
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SceneView.cpp:2123
Scope (from outer to inner):
file
function void FSceneView::EndFinalPostprocessSettings
Source code excerpt:
}
if(!Family->EngineShowFlags.CameraImperfections)
{
FinalPostProcessSettings.BloomDirtMaskIntensity = 0;
}
if(!Family->EngineShowFlags.AmbientCubemap)
{
#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/Private/ShowFlags.cpp:639
Scope (from outer to inner):
file
function void EngineShowFlagOverride
Source code excerpt:
DISABLE_ENGINE_SHOWFLAG(DepthOfField)
DISABLE_ENGINE_SHOWFLAG(AmbientOcclusion)
DISABLE_ENGINE_SHOWFLAG(CameraImperfections)
DISABLE_ENGINE_SHOWFLAG(Decals)
DISABLE_ENGINE_SHOWFLAG(LensFlares)
DISABLE_ENGINE_SHOWFLAG(Bloom)
DISABLE_ENGINE_SHOWFLAG(ColorGrading)
DISABLE_ENGINE_SHOWFLAG(Tonemapper)
DISABLE_ENGINE_SHOWFLAG(Refraction)
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:53
Scope: file
Source code excerpt:
SHOWFLAG_ALWAYS_ACCESSIBLE(Decals, SFG_Normal, NSLOCTEXT("UnrealEd", "DecalsSF", "Decals"))
/** like bloom dirt mask */
SHOWFLAG_FIXED_IN_SHIPPING(1, CameraImperfections, SFG_PostProcess, NSLOCTEXT("UnrealEd", "CameraImperfectionsSF", "Camera Imperfections"))
/** to allow to disable visualizetexture for some editor rendering (e.g. thumbnail rendering) */
SHOWFLAG_ALWAYS_ACCESSIBLE(OnScreenDebug, SFG_Developer, NSLOCTEXT("UnrealEd", "OnScreenDebugSF", "On Screen Debug"))
/** needed for VMI_Lit_DetailLighting, Whether to override material diffuse and specular with constants, used by the Detail Lighting viewmode. */
SHOWFLAG_FIXED_IN_SHIPPING(0, OverrideDiffuseAndSpecular, SFG_Hidden, NSLOCTEXT("UnrealEd", "OverrideDiffuseAndSpecularSF", "Override Diffuse And Specular"))
/** needed for VMI_LightingOnly, Whether to override material diffuse with constants, used by the Lighting Only viewmode. */
SHOWFLAG_FIXED_IN_SHIPPING(0, LightingOnlyOverride, SFG_Hidden, NSLOCTEXT("UnrealEd", "LightingOnlyOverrideSF", "Lighting Only"))