ShowFlag.PostProcessMaterial
ShowFlag.PostProcessMaterial
#Overview
name: ShowFlag.PostProcessMaterial
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 43
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ShowFlag.PostProcessMaterial is to control the rendering of post-process materials in Unreal Engine’s rendering pipeline. Here are the key points about this setting variable:
-
Purpose: It’s used to enable or disable the rendering of post-process materials in the scene.
-
Subsystems: This variable is primarily used by the rendering system, specifically the post-processing pipeline.
-
Value Setting: The value is set to 1 (enabled) by default in shipping builds, as indicated by the SHOWFLAG_FIXED_IN_SHIPPING macro.
-
Interactions: It interacts with other rendering settings, particularly those related to post-processing and scene capture.
-
Developer Awareness: Developers should be aware that disabling this flag will prevent post-process materials from being rendered, which can significantly affect the visual output of the scene.
-
Best Practices: It’s generally recommended to keep this enabled unless there’s a specific reason to disable post-process materials, such as for performance optimization in certain scenarios.
Regarding the associated variable PostProcessMaterial:
-
Purpose: This variable is used to store a reference to the actual post-process material to be applied.
-
Usage: It’s used in various parts of the engine, including the VPUtilities plugin, AR rendering, and general scene rendering.
-
Setting: The value is typically set by loading a material asset or creating a dynamic material instance.
-
Interactions: It interacts closely with the rendering pipeline, particularly in post-processing passes.
-
Developer Awareness: Developers should ensure that the referenced material is properly set up for post-processing (i.e., its domain is set to Post Process).
-
Best Practices: When using custom post-process materials, ensure they are optimized for performance and achieve the desired visual effect without unnecessary complexity.
In summary, ShowFlag.PostProcessMaterial controls whether post-process materials are rendered, while PostProcessMaterial holds the reference to the actual material to be used for post-processing. Both are crucial for achieving advanced visual effects in Unreal 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:295
Scope: file
Source code excerpt:
SHOWFLAG_ALWAYS_ACCESSIBLE(LightShafts, SFG_LightingFeatures, NSLOCTEXT("UnrealEd", "LightShaftsSF", "Light Shafts"))
/** Render the PostProcess Material */
SHOWFLAG_FIXED_IN_SHIPPING(1, PostProcessMaterial, SFG_PostProcess, NSLOCTEXT("UnrealEd", "PostProcessMaterialSF", "Post Process Material"))
/** Render Sky and Atmospheric lighting, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(Atmosphere, SFG_Normal, NSLOCTEXT("UnrealEd", "AtmosphereSF", "Atmosphere"))
/** Render Cloud */
SHOWFLAG_FIXED_IN_SHIPPING(1, Cloud, SFG_Normal, NSLOCTEXT("UnrealEd", "CloudSF", "Cloud"))
/** Render safe frames bars*/
SHOWFLAG_FIXED_IN_SHIPPING(0, CameraAspectRatioBars, SFG_Advanced, NSLOCTEXT("UnrealEd", "CameraAspectRatioBarsSF", "Camera Aspect Ratio Bars"))
#Associated Variable and Callsites
This variable is associated with another variable named PostProcessMaterial
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheMaskEditor/Private/AvaMaskEditorSVE.cpp:20
Scope (from outer to inner):
file
function FAvaMaskSceneViewExtension::FAvaMaskSceneViewExtension
Source code excerpt:
FAvaMaskSceneViewExtension::FAvaMaskSceneViewExtension(
const FAutoRegister& AutoRegister
, UWorld* InWorld)
: FWorldSceneViewExtension(AutoRegister, InWorld)
{
PostProcessMaterial = FString(UE::AvaMask::Private::SceneViewPostProcessMaterialPath);
}
void FAvaMaskSceneViewExtension::SetupView(
FSceneViewFamily& InViewFamily
, FSceneView& InView)
{
// Don't apply without this setting
if (GetDefault<URendererSettings>()->CustomDepthStencil != ECustomDepthStencil::EnabledWithStencil)
{
UE_LOG(LogAvaMaskEditor, Warning, TEXT("The Mask overlay requires CustomDepth to be \"EnabledWithStencil\" in Project Settings."))
}
else
{
FPostProcessSettings PostProcessSettings = InView.FinalPostProcessSettings;
if (UMaterialInterface* BlendableMaterial = PostProcessMaterial.LoadSynchronous())
{
PostProcessMaterialMID = UMaterialInstanceDynamic::Create(BlendableMaterial, GetTransientPackage());
PostProcessSettings.AddBlendable(PostProcessMaterialMID, 1.0f);
}
InView.OverridePostProcessSettings(PostProcessSettings, 1.0f);
}
}
void FAvaMaskSceneViewExtension::BeginRenderViewFamily(FSceneViewFamily& InViewFamily)
{
}
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheMaskEditor/Private/AvaMaskEditorSVE.h:23
Scope (from outer to inner):
file
class class FAvaMaskSceneViewExtension : public FWorldSceneViewExtension , public FGCObject
Source code excerpt:
virtual void AddReferencedObjects(FReferenceCollector& InCollector) override;
virtual FString GetReferencerName() const override;
// ~End FGCObject Interface
private:
TSoftObjectPtr<UMaterialInterface> PostProcessMaterial;
TObjectPtr<UMaterialInstanceDynamic> PostProcessMaterialMID;
};
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Private/Visualizers/AvaViewportBackgroundVisualizer.cpp:44
Scope (from outer to inner):
file
function FAvaViewportBackgroundVisualizer::FAvaViewportBackgroundVisualizer
Source code excerpt:
{
return;
}
PostProcessBaseMaterial = BackgroundMaterial;
PostProcessMaterial = UMaterialInstanceDynamic::Create(BackgroundMaterial, GetTransientPackage());
}
UTexture* FAvaViewportBackgroundVisualizer::GetTexture() const
{
return Texture;
}
void FAvaViewportBackgroundVisualizer::SetTexture(UTexture* InTexture)
{
if (Texture == InTexture)
{
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Private/Visualizers/AvaViewportBackgroundVisualizer.cpp:83
Scope (from outer to inner):
file
function void FAvaViewportBackgroundVisualizer::UpdateForViewport
Source code excerpt:
}
void FAvaViewportBackgroundVisualizer::UpdateForViewport(const FAvaVisibleArea& InVisibleArea, const FVector2f& InWidgetSize,
const FVector2f& InCameraOffset)
{
if (FMath::IsNearlyZero(PostProcessOpacity) || !Texture || !PostProcessMaterial)
{
return;
}
if (!InVisibleArea.IsValid())
{
return;
}
if (!FAvaViewportUtils::IsValidViewportSize(InWidgetSize))
{
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Private/Visualizers/AvaViewportBackgroundVisualizer.cpp:120
Scope (from outer to inner):
file
function void FAvaViewportBackgroundVisualizer::UpdateForViewport
Source code excerpt:
|| !FMath::IsNearlyEqual(TextureScale.Y, Scale.Y))
{
TextureScale.X = Scale.X;
TextureScale.Y = Scale.Y;
TextureOffset.Z = 0.f;
PostProcessMaterial->SetVectorParameterValue(TextureScaleName, TextureScale);
}
FVector2f Offset = ((InWidgetSize - InVisibleArea.AbsoluteSize) * 0.5f)
+ InCameraOffset * Scale;
if (InVisibleArea.IsZoomedView())
{
Offset -= InVisibleArea.GetInvisibleSize() / InVisibleArea.VisibleSize * InVisibleArea.AbsoluteSize * 0.5f;
}
if (!FMath::IsNearlyEqual(WidgetAspectRatio, ViewportAspectRatio))
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Private/Visualizers/AvaViewportBackgroundVisualizer.cpp:155
Scope (from outer to inner):
file
function void FAvaViewportBackgroundVisualizer::UpdateForViewport
Source code excerpt:
|| !FMath::IsNearlyEqual(TextureOffset.Y, Offset.Y))
{
TextureOffset.X = Offset.X;
TextureOffset.Y = Offset.Y;
TextureOffset.Z = 0.f;
PostProcessMaterial->SetVectorParameterValue(TextureOffsetName, TextureOffset);
}
}
void FAvaViewportBackgroundVisualizer::LoadPostProcessInfo(const FAvaViewportPostProcessInfo& InPostProcessInfo)
{
Super::LoadPostProcessInfo(InPostProcessInfo);
SetTextureInternal(InPostProcessInfo.Texture.LoadSynchronous());
}
void FAvaViewportBackgroundVisualizer::UpdatePostProcessInfo(FAvaViewportPostProcessInfo& InPostProcessInfo) const
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Private/Visualizers/AvaViewportBackgroundVisualizer.cpp:175
Scope (from outer to inner):
file
function void FAvaViewportBackgroundVisualizer::UpdatePostProcessMaterial
Source code excerpt:
InPostProcessInfo.Texture = Texture;
}
void FAvaViewportBackgroundVisualizer::UpdatePostProcessMaterial()
{
if (!PostProcessMaterial)
{
return;
}
Super::UpdatePostProcessMaterial();
using namespace UE::AvaViewport::Private;
PostProcessMaterial->SetTextureParameterValue(TextureObjectName, Texture);
}
bool FAvaViewportBackgroundVisualizer::SetupPostProcessSettings(FPostProcessSettings& InPostProcessSettings) const
{
if (!IsValid(Texture))
{
return false;
}
return FAvaViewportPostProcessVisualizer::SetupPostProcessSettings(InPostProcessSettings);
}
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Private/Visualizers/AvaViewportChannelVisualizer.cpp:30
Scope (from outer to inner):
file
function FAvaViewportChannelVisualizer::FAvaViewportChannelVisualizer
Source code excerpt:
if (const TSoftObjectPtr<UMaterial>* BaseMaterialPtr = ChannelAssets.Find(InChannel))
{
if (UMaterial* BaseMaterial = BaseMaterialPtr->LoadSynchronous())
{
PostProcessBaseMaterial = BaseMaterial;
PostProcessMaterial = UMaterialInstanceDynamic::Create(BaseMaterial, GetTransientPackage());
}
}
}
FString FAvaViewportChannelVisualizer::GetReferencerName() const
{
return UE::AvaViewport::Private::ChannelReferencerName;
}
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Private/Visualizers/AvaViewportCheckerboardVisualizer.cpp:46
Scope (from outer to inner):
file
function void FAvaViewportCheckerboardVisualizer::UpdatePostProcessMaterial
Source code excerpt:
void FAvaViewportCheckerboardVisualizer::UpdatePostProcessMaterial()
{
FAvaViewportPostProcessVisualizer::UpdatePostProcessMaterial();
if (PostProcessMaterial)
{
using namespace UE::AvaViewport::Private;
PostProcessMaterial->SetVectorParameterValue(CheckerboardColor0Name, CheckerboardColor0);
PostProcessMaterial->SetVectorParameterValue(CheckerboardColor1Name, CheckerboardColor1);
PostProcessMaterial->SetVectorParameterValue(CheckerboardSizeName, CheckerboardSize);
}
}
FString FAvaViewportCheckerboardVisualizer::GetReferencerName() const
{
return UE::AvaViewport::Private::CheckerboardReferencerName;
}
void FAvaViewportCheckerboardVisualizer::OnSettingChanged(UObject* InSettings, FPropertyChangedEvent& InPropertyChangeEvent)
{
static const FName ViewportCheckerboardMaterialName = GET_MEMBER_NAME_CHECKED(UAvaViewportSettings, ViewportCheckerboardMaterial);
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Private/Visualizers/AvaViewportCheckerboardVisualizer.cpp:93
Scope (from outer to inner):
file
function bool FAvaViewportCheckerboardVisualizer::InitPostProcessMaterial
Source code excerpt:
if (const UAvaViewportSettings* ViewportSettings = GetDefault<UAvaViewportSettings>())
{
if (UMaterial* CheckerboardMaterial = ViewportSettings->ViewportCheckerboardMaterial.LoadSynchronous())
{
PostProcessBaseMaterial = CheckerboardMaterial;
PostProcessMaterial = UMaterialInstanceDynamic::Create(CheckerboardMaterial, GetTransientPackage());
return true;
}
}
return false;
}
bool FAvaViewportCheckerboardVisualizer::UpdateFromViewportSettings()
{
if (const UAvaViewportSettings* ViewportSettings = GetDefault<UAvaViewportSettings>())
{
CheckerboardColor0 = FVector(ViewportSettings->ViewportCheckerboardColor0);
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Private/Visualizers/AvaViewportPostProcessVisualizer.cpp:115
Scope (from outer to inner):
file
function void FAvaViewportPostProcessVisualizer::ApplyToSceneView
Source code excerpt:
{
}
void FAvaViewportPostProcessVisualizer::ApplyToSceneView(FSceneView* InSceneView) const
{
if (!InSceneView || FMath::IsNearlyZero(PostProcessOpacity) || !PostProcessMaterial)
{
return;
}
FPostProcessSettings PostProcessSettings;
if (!SetupPostProcessSettings(PostProcessSettings))
{
return;
}
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Private/Visualizers/AvaViewportPostProcessVisualizer.cpp:137
Scope (from outer to inner):
file
function void FAvaViewportPostProcessVisualizer::AddReferencedObjects
Source code excerpt:
if (PostProcessBaseMaterial)
{
InCollector.AddReferencedObject(PostProcessBaseMaterial);
}
if (PostProcessMaterial)
{
InCollector.AddReferencedObject(PostProcessMaterial);
}
}
void FAvaViewportPostProcessVisualizer::PostUndo(bool bSuccess)
{
FEditorUndoClient::PostUndo(bSuccess);
LoadPostProcessInfo();
}
void FAvaViewportPostProcessVisualizer::PostRedo(bool bSuccess)
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Private/Visualizers/AvaViewportPostProcessVisualizer.cpp:215
Scope (from outer to inner):
file
function void FAvaViewportPostProcessVisualizer::UpdatePostProcessMaterial
Source code excerpt:
}
}
void FAvaViewportPostProcessVisualizer::UpdatePostProcessMaterial()
{
if (!PostProcessMaterial)
{
return;
}
using namespace UE::AvaViewport::Private;
PostProcessMaterial->SetScalarParameterValue(OpacityName, PostProcessOpacity);
}
void FAvaViewportPostProcessVisualizer::SetPostProcessOpacityInternal(float InOpacity)
{
PostProcessOpacity = InOpacity;
}
void FAvaViewportPostProcessVisualizer::LoadPostProcessInfo(const FAvaViewportPostProcessInfo& InPostProcessInfo)
{
SetPostProcessOpacityInternal(InPostProcessInfo.Opacity);
}
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Private/Visualizers/AvaViewportPostProcessVisualizer.cpp:242
Scope (from outer to inner):
file
function bool FAvaViewportPostProcessVisualizer::SetupPostProcessSettings
Source code excerpt:
InPostProcessInfo.Opacity = PostProcessOpacity;
}
bool FAvaViewportPostProcessVisualizer::SetupPostProcessSettings(FPostProcessSettings& InPostProcessSettings) const
{
InPostProcessSettings.AddBlendable(PostProcessMaterial, 1.f);
return true;
}
#undef LOCTEXT_NAMESPACE
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Private/Visualizers/AvaViewportPostProcessVisualizer.h:57
Scope (from outer to inner):
file
class class FAvaViewportPostProcessVisualizer : public IAvaViewportPostProcessVisualizer, public FGCObject, public FEditorUndoClient
Source code excerpt:
TWeakPtr<IAvaViewportClient> AvaViewportClientWeak;
TObjectPtr<UMaterial> PostProcessBaseMaterial;
TObjectPtr<UMaterialInstanceDynamic> PostProcessMaterial;
float PostProcessOpacity;
bool bRequiresTonemapperSetting;
void SetPostProcessOpacityInternal(float InOpacity);
void UpdatePostProcessInfo();
virtual void LoadPostProcessInfo(const FAvaViewportPostProcessInfo& InPostProcessInfo);
virtual void UpdatePostProcessInfo(FAvaViewportPostProcessInfo& InPostProcessInfo) const;
#Loc: <Workspace>/Engine/Plugins/Experimental/ColorCorrectRegions/Source/ColorCorrectRegions/Private/ColorCorrectRegionsSceneViewExtension.cpp:197
Scope (from outer to inner):
file
namespace anonymous
function bool ViewSupportsRegions
Source code excerpt:
}
bool ViewSupportsRegions(const FSceneView& View)
{
return View.Family->EngineShowFlags.PostProcessing &&
View.Family->EngineShowFlags.PostProcessMaterial;
}
// A helper function for getting the right shader for SDF based CCRs.
TShaderMapRef<FColorCorrectRegionMaterialPS> GetRegionShader(const FGlobalShaderMap* GlobalShaderMap, EColorCorrectRegionsType RegionType, FColorCorrectGenericPS::ETemperatureType TemperatureType, bool bIsAdvanced, bool bUseStencil)
{
FColorCorrectRegionMaterialPS::FPermutationDomain PermutationVector;
PermutationVector.Set<FColorCorrectGenericPS::FAdvancedShader>(bIsAdvanced);
PermutationVector.Set<FColorCorrectGenericPS::FStencilEnabled>(bUseStencil);
PermutationVector.Set<FColorCorrectGenericPS::FTemperatureType>(TemperatureType);
PermutationVector.Set<FColorCorrectRegionMaterialPS::FShaderType>(static_cast<EColorCorrectRegionsType>(FMath::Min(static_cast<int32>(RegionType), static_cast<int32>(EColorCorrectRegionsType::MAX) - 1)));
#Loc: <Workspace>/Engine/Plugins/Experimental/PostProcessMaterialChainGraph/Source/PostProcessMaterialChainGraph/Private/PPMChainGraphComponent.cpp:148
Scope (from outer to inner):
file
function void UPPMChainGraphExecutorComponent::TransferState
Source code excerpt:
{
if (!Pass.bEnabled)
{
continue;
}
if (!Pass.PostProcessMaterial)
{
continue;
}
// Queue a warning about Post process material being invalid.
if (Pass.PostProcessMaterial->MaterialDomain != EMaterialDomain::MD_PostProcess)
{
FString MaterialIdString = FString::Format(TEXT("{0}, {1}"), { *Pass.PostProcessMaterial.GetFullName(), *Graph->GetFullName()});
AggregatedWarningsCast->CurrentFrame.InvalidMaterialDomainWarningList.FindOrAdd(MaterialIdString);
continue;
}
// Queue a warning about Render target Id already being used.
if (TextureIds.Contains(Pass.TemporaryRenderTargetId))
{
FString TextureId = FString::Format(TEXT("Render Target Name: {0}, {1}"), { *Pass.TemporaryRenderTargetId, *Graph->GetFullName() });
AggregatedWarningsCast->CurrentFrame.TextureIdIsInUseWarningList.FindOrAdd(TextureId);
continue;
}
#Loc: <Workspace>/Engine/Plugins/Experimental/PostProcessMaterialChainGraph/Source/PostProcessMaterialChainGraph/Private/PPMChainGraphComponent.cpp:178
Scope (from outer to inner):
file
function void UPPMChainGraphExecutorComponent::TransferState
Source code excerpt:
}
TextureIds.Add(Pass.TemporaryRenderTargetId);
TSharedPtr<FPPMChainGraphPostProcessPass> PassRenderProxy = MakeShared<FPPMChainGraphPostProcessPass>();
PassRenderProxy->PostProcessMaterial = Pass.PostProcessMaterial;
PassRenderProxy->TemporaryRenderTargetId = Pass.TemporaryRenderTargetId;
PassRenderProxy->Output = Pass.Output;
// We cannot write into the same render target that is used as input.
bool bInputReferencesOutput = false;
// Validate inputs.
for (TTuple<EPPMChainGraphPPMInputId, FPPMChainGraphInput> KeyValue : Pass.Inputs)
{
if (KeyValue.Value.InputId == Pass.TemporaryRenderTargetId)
{
#Loc: <Workspace>/Engine/Plugins/Experimental/PostProcessMaterialChainGraph/Source/PostProcessMaterialChainGraph/Private/PPMChainGraphSceneViewExtension.cpp:64
Scope (from outer to inner):
file
namespace anonymous
function void RenderPPMChainGraphProxies
Source code excerpt:
TMap<FString, FScreenPassRenderTarget> PassOutputs;
int32 PassId = 0;
for (const TSharedPtr<FPPMChainGraphPostProcessPass>& Pass : Graph->Passes)
{
if (!Pass->PostProcessMaterial || Pass->PostProcessMaterial->MaterialDomain != EMaterialDomain::MD_PostProcess)
{
continue;
}
bPPMApplied = true;
const FScreenPassTextureViewport OutputViewport(SceneColorRenderTarget);
if (Pass->Output == EPPMChainGraphOutput::PPMOutput_RenderTarget)
{
// Makes sure that the same render target won't be used as an input in the same pass.
#Loc: <Workspace>/Engine/Plugins/Experimental/PostProcessMaterialChainGraph/Source/PostProcessMaterialChainGraph/Private/PPMChainGraphSceneViewExtension.cpp:151
Scope (from outer to inner):
file
namespace anonymous
function void RenderPPMChainGraphProxies
Source code excerpt:
PPMInputTextures[InputIndex] = Input;
}
}
PostProcessMaterialInputs.Textures = MoveTemp(PPMInputTextures);
AddPostProcessMaterialPass(GraphBuilder, View, PostProcessMaterialInputs, Pass->PostProcessMaterial);
}
}
// PrePostProcess is the only place where we need to copy back into Scene Color. In all other places we return back the backbuffer.
if (bCopyBackTexture && PointOfExecution == EPPMChainGraphExecutionLocation::PrePostProcess)
{
// Since we've rendered into the backbuffer already we have to use load flag instead.
CopyBackTexture.LoadAction = ERenderTargetLoadAction::ELoad;
TShaderMapRef<FScreenPassVS> VertexShader(GlobalShaderMap);
TShaderMapRef<FCopyRectPS> PixelShader(GlobalShaderMap);
#Loc: <Workspace>/Engine/Plugins/Experimental/PostProcessMaterialChainGraph/Source/PostProcessMaterialChainGraph/Public/PPMChainGraph.h:86
Scope: file
Source code excerpt:
/**
* Which material should be executed during this pass.
*/
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Post Process Pass Material")
TObjectPtr<UMaterial> PostProcessMaterial;
/**
* Where should this pass write to. By selecting Temporary Render Target as an option,
* Users can avoid writing directly into Scene Color. For example this pass can operate
* on textures other than Scene Color to be used in one of the later passes.
* Keep in mind that the final pass will always write back into Scene Color.
*/
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Post Process Pass Output")
EPPMChainGraphOutput Output = EPPMChainGraphOutput::PPMOutput_SceneColor;
/** Use this to identify the Output of the current pass to be used later. */
#Loc: <Workspace>/Engine/Plugins/Experimental/VirtualProductionUtilities/Source/VPUtilities/Private/Widgets/Fullscreen/VPFullScreenUserWidget_PostProcess.cpp:69
Scope (from outer to inner):
file
function bool FVPFullScreenUserWidget_PostProcess::InitPostProcessComponent
Source code excerpt:
}
bool FVPFullScreenUserWidget_PostProcess::InitPostProcessComponent(UWorld* World)
{
ReleasePostProcessComponent();
if (World && ensureMsgf(PostProcessMaterial, TEXT("Was supposed to have been inited by base class")))
{
const bool bUseExternalPostProcess = CustomPostProcessSettingsSource.IsValid();
if (!bUseExternalPostProcess)
{
AWorldSettings* WorldSetting = World->GetWorldSettings();
PostProcessComponent = NewObject<UPostProcessComponent>(WorldSetting, NAME_None, RF_Transient);
PostProcessComponent->bEnabled = true;
PostProcessComponent->bUnbound = true;
PostProcessComponent->RegisterComponent();
}
#Loc: <Workspace>/Engine/Plugins/Experimental/VirtualProductionUtilities/Source/VPUtilities/Private/Widgets/Fullscreen/VPFullScreenUserWidget_PostProcess.cpp:145
Scope (from outer to inner):
file
function bool FVPFullScreenUserWidget_PostProcess::OnRenderTargetInited
Source code excerpt:
}
bool FVPFullScreenUserWidget_PostProcess::OnRenderTargetInited()
{
// Outer needs to be transient package: otherwise we cause a world memory leak using "Save Current Level As" due to reference not getting replaced correctly
PostProcessMaterialInstance = UMaterialInstanceDynamic::Create(PostProcessMaterial, GetTransientPackage());
PostProcessMaterialInstance->SetFlags(RF_Transient);
if (ensure(PostProcessMaterialInstance))
{
using namespace UE::VPUtilities::Private;
PostProcessMaterialInstance->SetTextureParameterValue(NAME_SlateUI, WidgetRenderTarget);
PostProcessMaterialInstance->SetVectorParameterValue(NAME_TintColorAndOpacity, PostProcessTintColorAndOpacity);
PostProcessMaterialInstance->SetScalarParameterValue(NAME_OpacityFromTexture, PostProcessOpacityFromTexture);
return true;
}
return false;
}
#Loc: <Workspace>/Engine/Plugins/Experimental/VirtualProductionUtilities/Source/VPUtilities/Private/Widgets/Fullscreen/VPFullScreenUserWidget_PostProcessBase.cpp:110
Scope (from outer to inner):
file
function FVPFullScreenUserWidget_PostProcessBase::FVPFullScreenUserWidget_PostProcessBase
Source code excerpt:
mutable FVector2D LastLocalHitLocation;
};
}
FVPFullScreenUserWidget_PostProcessBase::FVPFullScreenUserWidget_PostProcessBase()
: PostProcessMaterial(nullptr)
, PostProcessTintColorAndOpacity(FLinearColor::White)
, PostProcessOpacityFromTexture(1.0f)
, bUseWidgetDrawSize(false)
, WidgetDrawSize(FIntPoint(640, 360))
, bWindowFocusable(true)
, WindowVisibility(EWindowVisibility::SelfHitTestInvisible)
, bReceiveHardwareInput(false)
, RenderTargetBackgroundColor(FLinearColor(0.0f, 0.0f, 0.0f, 1.0f))
, RenderTargetBlendMode(EWidgetBlendMode::Masked)
, WidgetRenderTarget(nullptr)
, WidgetRenderer(nullptr)
#Loc: <Workspace>/Engine/Plugins/Experimental/VirtualProductionUtilities/Source/VPUtilities/Private/Widgets/VPFullScreenUserWidget.cpp:190
Scope (from outer to inner):
file
function UVPFullScreenUserWidget::UVPFullScreenUserWidget
Source code excerpt:
: Super(ObjectInitializer)
, CurrentDisplayType(EVPWidgetDisplayType::Inactive)
, bDisplayRequested(false)
{
static ConstructorHelpers::FObjectFinder<UMaterialInterface> PostProcessMaterial_Finder(TEXT("/VirtualProductionUtilities/Materials/WidgetPostProcessMaterial"));
PostProcessDisplayTypeWithBlendMaterial.PostProcessMaterial = PostProcessMaterial_Finder.Object;
}
void UVPFullScreenUserWidget::BeginDestroy()
{
Hide();
Super::BeginDestroy();
}
bool UVPFullScreenUserWidget::ShouldDisplay(UWorld* InWorld) const
{
#if UE_SERVER
#Loc: <Workspace>/Engine/Plugins/Experimental/VirtualProductionUtilities/Source/VPUtilities/Private/Widgets/VPFullScreenUserWidget.cpp:557
Scope (from outer to inner):
file
function void UVPFullScreenUserWidget::PostEditChangeProperty
Source code excerpt:
if (Property && PropertyChangedEvent.ChangeType != EPropertyChangeType::Interactive)
{
static FName NAME_WidgetClass = GET_MEMBER_NAME_CHECKED(UVPFullScreenUserWidget, WidgetClass);
static FName NAME_EditorDisplayType = GET_MEMBER_NAME_CHECKED(UVPFullScreenUserWidget, EditorDisplayType);
static FName NAME_PostProcessMaterial = GET_MEMBER_NAME_CHECKED(FVPFullScreenUserWidget_PostProcess, PostProcessMaterial);
static FName NAME_WidgetDrawSize = GET_MEMBER_NAME_CHECKED(FVPFullScreenUserWidget_PostProcess, WidgetDrawSize);
static FName NAME_WindowFocusable = GET_MEMBER_NAME_CHECKED(FVPFullScreenUserWidget_PostProcess, bWindowFocusable);
static FName NAME_WindowVisibility = GET_MEMBER_NAME_CHECKED(FVPFullScreenUserWidget_PostProcess, WindowVisibility);
static FName NAME_ReceiveHardwareInput = GET_MEMBER_NAME_CHECKED(FVPFullScreenUserWidget_PostProcess, bReceiveHardwareInput);
static FName NAME_RenderTargetBackgroundColor = GET_MEMBER_NAME_CHECKED(FVPFullScreenUserWidget_PostProcess, RenderTargetBackgroundColor);
static FName NAME_RenderTargetBlendMode = GET_MEMBER_NAME_CHECKED(FVPFullScreenUserWidget_PostProcess, RenderTargetBlendMode);
static FName NAME_PostProcessTintColorAndOpacity = GET_MEMBER_NAME_CHECKED(FVPFullScreenUserWidget_PostProcess, PostProcessTintColorAndOpacity);
static FName NAME_PostProcessOpacityFromTexture = GET_MEMBER_NAME_CHECKED(FVPFullScreenUserWidget_PostProcess, PostProcessOpacityFromTexture);
if (Property->GetFName() == NAME_WidgetClass
|| Property->GetFName() == NAME_EditorDisplayType
#Loc: <Workspace>/Engine/Plugins/Experimental/VirtualProductionUtilities/Source/VPUtilities/Public/Widgets/Fullscreen/VPFullScreenUserWidget_PostProcessBase.h:36
Scope: file
Source code excerpt:
* SlateUI [Texture]
* TintColorAndOpacity [Vector]
* OpacityFromTexture [Scalar]
*/
UPROPERTY(EditAnywhere, Category = PostProcess)
TObjectPtr<UMaterialInterface> PostProcessMaterial;
/** Tint color and opacity for this component. */
UPROPERTY(EditAnywhere, Category = PostProcess)
FLinearColor PostProcessTintColorAndOpacity;
/** Sets the amount of opacity from the widget's UI texture to use when rendering the translucent or masked UI to the viewport (0.0-1.0). */
UPROPERTY(EditAnywhere, Category = PostProcess, meta = (ClampMin = 0.0f, ClampMax = 1.0f))
float PostProcessOpacityFromTexture;
/** Whether to overwrite the size of the rendered widget. */
UPROPERTY(EditAnywhere, Category = PostProcess, meta=(InlineEditConditionToggle))
#Loc: <Workspace>/Engine/Plugins/Runtime/AR/AppleAR/AppleARKit/Source/AppleARKit/Private/AppleARKitVideoOverlay.cpp:159
Scope: file
Source code excerpt:
const bool bMobileForceDepthRead = MobileUsesFullDepthPrepass(Parameters.Platform);
OutEnvironment.SetDefine(TEXT("FORCE_DEPTH_TEXTURE_READS"), bMobileForceDepthRead ? 1u : 0u);
}
};
// We use something similar to the PostProcessMaterial to render the color camera overlay.
template <bool bIsMobileRenderer>
class TARKitCameraOverlayVS : public TPostProcessMaterialShader<bIsMobileRenderer>
{
public:
using FMaterialShader::FPermutationDomain;
DECLARE_SHADER_TYPE(TARKitCameraOverlayVS, Material);
static void ModifyCompilationEnvironment(const FMaterialShaderPermutationParameters& Parameters, FShaderCompilerEnvironment& OutEnvironment)
{
TPostProcessMaterialShader<bIsMobileRenderer>::ModifyCompilationEnvironment(Parameters, OutEnvironment);
OutEnvironment.SetDefine(TEXT("POST_PROCESS_AR_PASSTHROUGH"), 1);
#Loc: <Workspace>/Engine/Plugins/Runtime/AR/Google/GoogleARCore/Source/GoogleARCoreRendering/Private/GoogleARCorePassthroughCameraRenderer.cpp:119
Scope: file
Source code excerpt:
OutEnvironment.SetDefine(TEXT("POST_PROCESS_MATERIAL_BEFORE_TONEMAP"), (Parameters.MaterialParameters.BlendableLocation != BL_SceneColorAfterTonemapping) ? 1 : 0);
OutEnvironment.SetDefine(TEXT("POST_PROCESS_MATERIAL_SSRINPUT"), (Parameters.MaterialParameters.BlendableLocation == BL_SSRInput) ? 1 : 0);
}
};
// We use something similar to the PostProcessMaterial to render the color camera overlay.
class FGoogleARCoreCameraOverlayVS : public FPostProcessMaterialShader
{
public:
DECLARE_SHADER_TYPE(FGoogleARCoreCameraOverlayVS, Material);
static void ModifyCompilationEnvironment(const FMaterialShaderPermutationParameters& Parameters, FShaderCompilerEnvironment& OutEnvironment)
{
FPostProcessMaterialShader::ModifyCompilationEnvironment(Parameters, OutEnvironment);
OutEnvironment.SetDefine(TEXT("POST_PROCESS_AR_PASSTHROUGH"), 1);
}
#Loc: <Workspace>/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Private/Scene/WorldRenderCapture.cpp:565
Scope (from outer to inner):
file
function bool FWorldRenderCapture::CaptureMRSFromPosition
Source code excerpt:
TRACE_CPUPROFILER_EVENT_SCOPE(FWorldRenderCapture_CombinedMRS);
// this post-process material renders an image with R=Metallic, G=Roughness, B=Specular, A=AmbientOcclusion
FString MRSPostProcessMaterialAssetPath = TEXT("/MeshModelingToolsetExp/Materials/PostProcess_PackedMRSA.PostProcess_PackedMRSA");
TSoftObjectPtr<UMaterialInterface> PostProcessMaterialPtr = TSoftObjectPtr<UMaterialInterface>(FSoftObjectPath(MRSPostProcessMaterialAssetPath));
UMaterialInterface* PostProcessMaterial = PostProcessMaterialPtr.LoadSynchronous();
if (!ensure(PostProcessMaterial))
{
return false;
}
check(this->World);
FSceneInterface* Scene = this->World->Scene;
UTextureRenderTarget2D* RenderTargetTexture = GetRenderTexture(true);
if (!ensure(RenderTargetTexture))
{
return false;
#Loc: <Workspace>/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Private/Scene/WorldRenderCapture.cpp:612
Scope (from outer to inner):
file
function bool FWorldRenderCapture::CaptureMRSFromPosition
Source code excerpt:
ViewFamily.Views.Add(NewView);
NewView->StartFinalPostprocessSettings(ViewInitOptions.ViewOrigin);
//
// Add custom PostProcessMaterial. This will be configured to write to a FImagePixelPipe,
// which will be filled by the renderer and available after we force the render
//
TUniquePtr<FImagePixelData> PostProcessPassPixelData;
// clear any existing PostProcess materials and add our own
NewView->FinalPostProcessSettings.BufferVisualizationOverviewMaterials.Empty();
NewView->FinalPostProcessSettings.BufferVisualizationOverviewMaterials.Add(PostProcessMaterial);
// create new FImagePixelPipe and add output lambda that takes ownership of the data
NewView->FinalPostProcessSettings.BufferVisualizationPipes.Empty();
TSharedPtr<FImagePixelPipe, ESPMode::ThreadSafe> ImagePixelPipe = MakeShared<FImagePixelPipe, ESPMode::ThreadSafe>();
ImagePixelPipe->AddEndpoint([&PostProcessPassPixelData](TUniquePtr<FImagePixelData>&& Data) {
PostProcessPassPixelData = MoveTemp(Data);
});
NewView->FinalPostProcessSettings.BufferVisualizationPipes.Add(PostProcessMaterial->GetFName(), ImagePixelPipe);
// enable buffer visualization writing
NewView->FinalPostProcessSettings.bBufferVisualizationDumpRequired = true;
NewView->EndFinalPostprocessSettings(ViewInitOptions);
// can we fully disable auto-exposure?
NewView->FinalPostProcessSettings.AutoExposureMethod = EAutoExposureMethod::AEM_Manual;
// do we actually need for force SM5 here?
FCanvas Canvas = FCanvas(RenderTargetResource, nullptr, this->World, ERHIFeatureLevel::SM5, FCanvas::CDM_DeferDrawing, 1.0f);
Canvas.Clear(FLinearColor::Transparent);
#Loc: <Workspace>/Engine/Source/Editor/MaterialEditor/Private/MaterialEditorDetailCustomization.cpp:903
Scope (from outer to inner):
file
function void FMaterialDetailCustomization::CustomizeDetails
Source code excerpt:
if( bUIMaterial )
{
DetailLayout.HideCategory( TEXT("TranslucencySelfShadowing") );
DetailLayout.HideCategory( TEXT("Translucency") );
DetailLayout.HideCategory( TEXT("Tessellation") );
DetailLayout.HideCategory( TEXT("PostProcessMaterial") );
DetailLayout.HideCategory( TEXT("Lightmass") );
DetailLayout.HideCategory( TEXT("Thumbnail") );
DetailLayout.HideCategory( TEXT("MaterialInterface") );
DetailLayout.HideCategory( TEXT("PhysicalMaterial") );
DetailLayout.HideCategory( TEXT("Usage") );
// Mobile category
{
IDetailCategoryBuilder& MobileCategory = DetailLayout.EditCategory(TEXT("Mobile"));
TArray<TSharedRef<IPropertyHandle>> AllProperties;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:292
Scope: file
Source code excerpt:
/** Collision blocking pawn against simple collision **/
SHOWFLAG_FIXED_IN_SHIPPING(0, CollisionPawn, SFG_Hidden, NSLOCTEXT("UnrealEd", "CollisionPawn", "Pawn"))
/** Render LightShafts, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(LightShafts, SFG_LightingFeatures, NSLOCTEXT("UnrealEd", "LightShaftsSF", "Light Shafts"))
/** Render the PostProcess Material */
SHOWFLAG_FIXED_IN_SHIPPING(1, PostProcessMaterial, SFG_PostProcess, NSLOCTEXT("UnrealEd", "PostProcessMaterialSF", "Post Process Material"))
/** Render Sky and Atmospheric lighting, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(Atmosphere, SFG_Normal, NSLOCTEXT("UnrealEd", "AtmosphereSF", "Atmosphere"))
/** Render Cloud */
SHOWFLAG_FIXED_IN_SHIPPING(1, Cloud, SFG_Normal, NSLOCTEXT("UnrealEd", "CloudSF", "Cloud"))
/** Render safe frames bars*/
SHOWFLAG_FIXED_IN_SHIPPING(0, CameraAspectRatioBars, SFG_Advanced, NSLOCTEXT("UnrealEd", "CameraAspectRatioBarsSF", "Camera Aspect Ratio Bars"))
/** Render safe frames */
SHOWFLAG_FIXED_IN_SHIPPING(1, CameraSafeFrames, SFG_Advanced, NSLOCTEXT("UnrealEd", "CameraSafeFramesSF", "Camera Safe Frames"))
/** Render TextRenderComponents (3D text), for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_ALWAYS_ACCESSIBLE(TextRender, SFG_Advanced, NSLOCTEXT("UnrealEd", "TextRenderSF", "Render (3D) Text"))
/** Any rendering/buffer clearing (good for benchmarking and for pausing rendering while the app is not in focus to save cycles). */
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessMaterial.cpp:-2
Scope: file
Source code excerpt:
// Copyright Epic Games, Inc. All Rights Reserved.
/*=============================================================================
PostProcessMaterial.cpp: Post processing Material implementation.
=============================================================================*/
#include "PostProcess/PostProcessMaterial.h"
#include "DataDrivenShaderPlatformInfo.h"
#include "RendererModule.h"
#include "Materials/Material.h"
#include "Materials/MaterialRenderProxy.h"
#include "MaterialDomain.h"
#include "MaterialShaderType.h"
#include "MaterialShader.h"
#include "RenderUtils.h"
#include "SceneUtils.h"
#include "PostProcess/SceneRenderTargets.h"
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessMaterial.cpp:260
Scope (from outer to inner):
file
namespace anonymous
class class FPostProcessMaterialShader : public FMaterialShader
function static void ModifyCompilationEnvironment
Source code excerpt:
if (IsMobilePlatform(Parameters.Platform))
{
OutEnvironment.SetDefine(TEXT("POST_PROCESS_MATERIAL_BEFORE_TONEMAP"), (Parameters.MaterialParameters.BlendableLocation != BL_SceneColorAfterTonemapping) ? 1 : 0);
}
// PostProcessMaterial can both read & write Substrate data
OutEnvironment.SetDefine(TEXT("SUBSTRATE_INLINE_SHADING"), 1);
OutEnvironment.SetDefine(TEXT("SUBSTRATE_DEFERRED_SHADING"), 1);
}
void SetParameters(FRHIBatchedShaderParameters& BatchedParameters, const FViewInfo& View, const FMaterialRenderProxy* Proxy, const FMaterial& Material)
{
FMaterialShader::SetParameters(BatchedParameters, Proxy, Material, View);
}
};
class FPostProcessMaterialVS : public FPostProcessMaterialShader
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessMaterial.cpp:581
Scope (from outer to inner):
file
function void AddNeuralPostProcessPass
Source code excerpt:
{
OutputDesc.Format = Inputs.OutputFormat;
}
OutputDesc.ClearValue = FClearValueBinding(FLinearColor::Black);
OutputDesc.Flags &= (~ETextureCreateFlags::FastVRAM);
OutputDesc.Flags |= GFastVRamConfig.PostProcessMaterial;
Output = FScreenPassRenderTarget(GraphBuilder.CreateTexture(OutputDesc, TEXT("PostProcessTempOutput")), SceneColor.ViewRect, View.GetOverwriteLoadAction());
}
}
const FScreenPassTextureViewport SceneColorViewport(SceneColor);
const FScreenPassTextureViewport OutputViewport(Output);
RDG_EVENT_SCOPE(GraphBuilder, "PostProcessMaterial::NeuralPass");
const uint32 MaterialStencilRef = Material->GetStencilRefValue();
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessMaterial.cpp:763
Scope (from outer to inner):
file
function FScreenPassTexture AddPostProcessMaterialPass
Source code excerpt:
{
OutputDesc.Format = Inputs.OutputFormat;
}
OutputDesc.ClearValue = FClearValueBinding(FLinearColor::Black);
OutputDesc.Flags &= (~ETextureCreateFlags::FastVRAM);
OutputDesc.Flags |= GFastVRamConfig.PostProcessMaterial;
Output = FScreenPassRenderTarget(GraphBuilder.CreateTexture(OutputDesc, TEXT("PostProcessMaterial")), SceneColor.ViewRect, View.GetOverwriteLoadAction());
}
if (bPrimeOutputColor || bForceIntermediateTarget)
{
// Copy existing contents to new output and use load-action to preserve untouched pixels.
if (Inputs.bMetalMSAAHDRDecode)
{
AddMobileMSAADecodeAndDrawTexturePass(GraphBuilder, View, SceneColor, Output);
}
else
{
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessMaterial.cpp:908
Scope (from outer to inner):
file
function static bool IsPostProcessMaterialsEnabledForView
Source code excerpt:
}
static bool IsPostProcessMaterialsEnabledForView(const FViewInfo& View)
{
if (!View.Family->EngineShowFlags.PostProcessing ||
!View.Family->EngineShowFlags.PostProcessMaterial ||
View.Family->EngineShowFlags.VisualizeShadingModels ||
CVarPostProcessingDisableMaterials.GetValueOnRenderThread() != 0)
{
return false;
}
return true;
}
static FPostProcessMaterialNode* IteratePostProcessMaterialNodes(const FFinalPostProcessSettings& Dest, EBlendableLocation Location, FBlendableEntry*& Iterator)
{
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessMaterial.cpp:1141
Scope (from outer to inner):
file
function FScreenPassTexture AddHighResolutionScreenshotMaskPass
Source code excerpt:
// Explicitly allocate the render target to match the FSceneView extents and rect, so the output pixel arrangement matches
FRDGTextureDesc MaskOutputDesc = Output.Texture->Desc;
MaskOutputDesc.Reset();
MaskOutputDesc.ClearValue = FClearValueBinding(FLinearColor::Black);
MaskOutputDesc.Flags |= GFastVRamConfig.PostProcessMaterial;
MaskOutputDesc.Extent = View.UnconstrainedViewRect.Size();
PassInputs.OverrideOutput = FScreenPassRenderTarget(
GraphBuilder.CreateTexture(MaskOutputDesc, TEXT("PostProcessMaterial")), View.UnscaledViewRect, View.GetOverwriteLoadAction());
// Disallow the scene color input as output optimization since we need to not pollute the scene texture.
PassInputs.bAllowSceneColorInputAsOutput = false;
FScreenPassTexture MaskOutput = AddPostProcessMaterialPass(GraphBuilder, View, PassInputs, Inputs.MaskMaterial);
AddDumpToColorArrayPass(GraphBuilder, MaskOutput, FScreenshotRequest::GetHighresScreenshotMaskColorArray(), &FScreenshotRequest::GetHighresScreenshotMaskExtents());
// The mask material pass is actually outputting to system memory. If we're the last pass in the chain
// and the override output is valid, we need to perform a copy of the input to the output. Since we can't
// sample from the override output (since it might be the backbuffer), we still need to participate in
// the pass sequence.
if (PassSequence.IsLastPass(EPass::MaskMaterial) && Inputs.OverrideOutput.IsValid())
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:499
Scope: file
Source code excerpt:
FASTVRAM_CVAR(DBufferC, 0);
FASTVRAM_CVAR(DBufferMask, 0);
FASTVRAM_CVAR(DOFSetup, 1);
FASTVRAM_CVAR(DOFReduce, 1);
FASTVRAM_CVAR(DOFPostfilter, 1);
FASTVRAM_CVAR(PostProcessMaterial, 1);
FASTVRAM_CVAR(CustomDepth, 0);
FASTVRAM_CVAR(ShadowPointLight, 0);
FASTVRAM_CVAR(ShadowPerObject, 0);
FASTVRAM_CVAR(ShadowCSM, 0);
FASTVRAM_CVAR(DistanceFieldCulledObjectBuffers, 1);
FASTVRAM_CVAR(DistanceFieldTileIntersectionResources, 1);
FASTVRAM_CVAR(DistanceFieldAOScreenGridResources, 1);
FASTVRAM_CVAR(ForwardLightingCullingResources, 1);
FASTVRAM_CVAR(GlobalDistanceFieldCullGridBuffers, 1);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:703
Scope (from outer to inner):
file
function void FFastVramConfig::Update
Source code excerpt:
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_DOFPostfilter, DOFPostfilter);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_CustomDepth, CustomDepth);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_ShadowPointLight, ShadowPointLight);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_ShadowPerObject, ShadowPerObject);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_ShadowCSM, ShadowCSM);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_PostProcessMaterial, PostProcessMaterial);
bDirty |= UpdateBufferFlagFromCVar(CVarFastVRam_DistanceFieldCulledObjectBuffers, DistanceFieldCulledObjectBuffers);
bDirty |= UpdateBufferFlagFromCVar(CVarFastVRam_DistanceFieldTileIntersectionResources, DistanceFieldTileIntersectionResources);
bDirty |= UpdateBufferFlagFromCVar(CVarFastVRam_DistanceFieldAOScreenGridResources, DistanceFieldAOScreenGridResources);
bDirty |= UpdateBufferFlagFromCVar(CVarFastVRam_ForwardLightingCullingResources, ForwardLightingCullingResources);
bDirty |= UpdateBufferFlagFromCVar(CVarFastVRam_GlobalDistanceFieldCullGridBuffers, GlobalDistanceFieldCullGridBuffers);
// When Substrate is enable, remove Scene color from fast VRAM to leave space for material buffer which has more impact on performance
if (Substrate::IsSubstrateEnabled() && !IsForwardShadingEnabled(GMaxRHIShaderPlatform))
{
SceneColor = SceneColor & (~(TexCreate_FastVRAM | TexCreate_FastVRAMPartialAlloc));
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.h:2849
Scope: file
Source code excerpt:
ETextureCreateFlags DBufferC;
ETextureCreateFlags DBufferMask;
ETextureCreateFlags DOFSetup;
ETextureCreateFlags DOFReduce;
ETextureCreateFlags DOFPostfilter;
ETextureCreateFlags PostProcessMaterial;
ETextureCreateFlags CustomDepth;
ETextureCreateFlags ShadowPointLight;
ETextureCreateFlags ShadowPerObject;
ETextureCreateFlags ShadowCSM;
// Buffers
EBufferUsageFlags DistanceFieldCulledObjectBuffers;
EBufferUsageFlags DistanceFieldTileIntersectionResources;
EBufferUsageFlags DistanceFieldAOScreenGridResources;
EBufferUsageFlags ForwardLightingCullingResources;