r.FastVRam.SeparateTranslucency
r.FastVRam.SeparateTranslucency
#Overview
name: r.FastVRam.SeparateTranslucency
This variable is created as a Console Variable (cvar).
- type:
Var
- help: ``
It is referenced in 30
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.FastVRam.SeparateTranslucency is to control whether separate translucency textures should be allocated in fast VRAM.
Key points about this setting variable:
-
It’s used for rendering translucent objects separately from the main scene color, allowing for effects like depth of field to be applied between opaque and translucent objects.
-
It’s part of the “FastVRAM” configuration system that allows allocating certain render targets in faster GPU memory.
-
The default value is 0, meaning separate translucency textures are not allocated in fast VRAM by default.
-
It’s used in the renderer when creating textures for separate translucency passes.
-
Related variables like r.FastVRam.SeparateTranslucencyModulate control similar allocation for modulated translucency textures.
-
Modules that rely on this include the main renderer, post processing system, and translucency rendering code.
-
The value can be changed at runtime to adjust memory allocation, but care should be taken as it may impact performance.
-
Best practice is to profile with different values to find the optimal setting for your specific hardware/scene.
The associated variable SeparateTranslucency is used throughout the rendering code to actually allocate and use the separate translucency textures based on this setting.
Developers should be aware that enabling this may improve performance on some GPUs by putting frequently accessed translucency data in faster memory, but it also increases fast VRAM usage. The tradeoff should be evaluated based on the specific application and target hardware.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:491
Scope: file
Source code excerpt:
FASTVRAM_CVAR(ScreenSpaceShadowMask, 1);
FASTVRAM_CVAR(VolumetricFog, 1);
FASTVRAM_CVAR(SeparateTranslucency, 0);
FASTVRAM_CVAR(SeparateTranslucencyModulate, 0);
FASTVRAM_CVAR(ScreenSpaceAO,0);
FASTVRAM_CVAR(SSR, 0);
FASTVRAM_CVAR(DBufferA, 0);
FASTVRAM_CVAR(DBufferB, 0);
FASTVRAM_CVAR(DBufferC, 0);
#Associated Variable and Callsites
This variable is associated with another variable named SeparateTranslucency
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Experimental/PostProcessMaterialChainGraph/Source/PostProcessMaterialChainGraph/Private/PPMChainGraphSceneViewExtension.cpp:406
Scope (from outer to inner):
file
function void FPPMChainGraphSceneViewExtension::PrePostProcessPass_RenderThread
lambda-function
Source code excerpt:
if (PostDOFTranslucencyResources.IsValid())
{
ViewRect = PostDOFTranslucencyResources.ViewRect;
}
PostProcessMaterialInputs.SetInput(GraphBuilder, EPostProcessMaterialInput::SeparateTranslucency, FScreenPassTexture(PostDOFTranslucencyResources.GetColorForRead(GraphBuilder), ViewRect));
PostProcessMaterialInputs.SetInput(GraphBuilder, EPostProcessMaterialInput::Velocity, Velocity);
PostProcessMaterialInputs.SceneTextures = GetSceneTextureShaderParameters(Inputs.SceneTextures);
const FScreenPassTexture CustomDepth(Inputs.CustomDepthTexture, PrimaryViewRect);
PostProcessMaterialInputs.CustomDepthTexture = CustomDepth.Texture;
PostProcessMaterialInputs.bManualStencilTest = Inputs.bSeparateCustomStencil;
// This is not available to Scene View Extensions yet.
//PostProcessMaterialInputs.SceneWithoutWaterTextures = &SceneWithoutWaterTextures;
return PostProcessMaterialInputs;
};
#Loc: <Workspace>/Engine/Plugins/Experimental/Water/Source/Runtime/Private/WaterInfoRendering.cpp:645
Scope (from outer to inner):
file
namespace UE::WaterInfo
function static FSceneRenderer* CreateWaterInfoSceneRenderer
Source code excerpt:
ShowFlags.Atmosphere = 0;
ShowFlags.Lighting = 0;
ShowFlags.Bloom = 0;
ShowFlags.ScreenPercentage = 0;
ShowFlags.Translucency = 0;
ShowFlags.SeparateTranslucency = 0;
ShowFlags.AntiAliasing = 0;
ShowFlags.Fog = 0;
ShowFlags.VolumetricFog = 0;
ShowFlags.DynamicShadows = 0;
ShowFlags.SetDisableOcclusionQueries(true);
ShowFlags.SetVirtualShadowMapPersistentData(false);
FSceneViewFamilyContext ViewFamily(FSceneViewFamily::ConstructionValues(
Params.RenderTarget,
Params.Scene,
#Loc: <Workspace>/Engine/Source/Editor/Cascade/Private/CascadePreviewViewportClient.cpp:67
Scope (from outer to inner):
file
function FCascadeEdPreviewViewportClient::FCascadeEdPreviewViewportClient
Source code excerpt:
SetViewMode(VMI_Lit);
EngineShowFlags.DisableAdvancedFeatures();
EngineShowFlags.SetCompositeEditorPrimitives(true);
EngineShowFlags.SeparateTranslucency = true;
OverrideNearClipPlane(1.0f);
SetViewLocation( FVector(-200.f, 0.f, 0.f) );
SetViewRotation( FRotator::ZeroRotator );
PreviewAngle = FRotator::ZeroRotator;
PreviewDistance = 0.f;
bCaptureScreenShot = false;
BackgroundColor = FColor::Black;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ShowFlags.cpp:633
Scope (from outer to inner):
file
function void EngineShowFlagOverride
Source code excerpt:
int32 Value = ICVar->GetValueOnGameThread();
#define DISABLE_ENGINE_SHOWFLAG(Name) if(Value-- > 0) EngineShowFlags.Set##Name(false);
DISABLE_ENGINE_SHOWFLAG(AntiAliasing)
DISABLE_ENGINE_SHOWFLAG(EyeAdaptation)
DISABLE_ENGINE_SHOWFLAG(SeparateTranslucency)
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)
DISABLE_ENGINE_SHOWFLAG(ReflectionEnvironment)
DISABLE_ENGINE_SHOWFLAG(AmbientCubemap)
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:112
Scope: file
Source code excerpt:
/** 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"))
/** Helper to tweak motion blur settings */
SHOWFLAG_FIXED_IN_SHIPPING(0, VisualizeMotionBlur, SFG_Visualize, NSLOCTEXT("UnrealEd", "VisualizeMotionBlurSF", "Motion Blur"))
/** DEPRECATED in 5.2: Use VisualizeReprojection instead. */
SHOWFLAG_FIXED_IN_SHIPPING(0, VisualizeMotionVectors, SFG_Hidden, NSLOCTEXT("UnrealEd", "VisualizeMotionVectorsSF", "Motion Vectors"))
/** Helper to ensure previous frame's temporal history reprojections using motion vectors are working correctly. */
SHOWFLAG_FIXED_IN_SHIPPING(0, VisualizeReprojection, SFG_Visualize, NSLOCTEXT("UnrealEd", "VisualizeReprojectionSF", "Previous frame's reprojection"))
/** Helper to diagnose temporal upscaler's inputs and outputs. */
SHOWFLAG_FIXED_IN_SHIPPING(0, VisualizeTemporalUpscaler, SFG_Visualize, NSLOCTEXT("UnrealEd", "VisualizeTemporalUpscalerSF", "Temporal Upscaler I/O (TSR, TAAU or third party plugins)"))
/** Helper to diagnose the internals of TSR. */
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/LightShaftRendering.cpp:94
Scope: file
Source code excerpt:
}
enum class ELightShaftBloomOutput
{
SceneColor,
SeparateTranslucency
};
ELightShaftBloomOutput GetLightShaftBloomOutput(const FSceneViewFamily& ViewFamily)
{
return (ViewFamily.AllowTranslucencyAfterDOF() && GLightShaftRenderAfterDOF) ? ELightShaftBloomOutput::SeparateTranslucency : ELightShaftBloomOutput::SceneColor;
}
bool ShouldRenderLightShafts(const FSceneViewFamily& ViewFamily)
{
return GLightShafts
&& ViewFamily.EngineShowFlags.LightShafts
&& ViewFamily.EngineShowFlags.Lighting
&& !ViewFamily.UseDebugViewPS()
&& !ViewFamily.EngineShowFlags.VisualizeDOF
&& !ViewFamily.EngineShowFlags.VisualizeBuffer
&& !ViewFamily.EngineShowFlags.VisualizeHDR
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/LightShaftRendering.cpp:566
Scope (from outer to inner):
file
function void FDeferredShadingSceneRenderer::RenderLightShaftBloom
Source code excerpt:
float OutputViewRectScale = 1.0f;
// Render to separate translucency buffer instead of scene color if requested.
const ELightShaftBloomOutput BloomOutput = GetLightShaftBloomOutput(ViewFamily);
bool bUpdateViewsSeparateTranslucency = false;
if (BloomOutput == ELightShaftBloomOutput::SeparateTranslucency)
{
FTranslucencyPassResources& TranslucencyPassResources = OutTranslucencyResourceMap.Get(/* ViewIndex = */ 0, ETranslucencyPass::TPT_TranslucencyAfterDOF);
if (!TranslucencyPassResources.IsValid())
{
OutputLoadAction = ERenderTargetLoadAction::EClear;
const bool bIsModulate = false;
OutputTexture = CreatePostDOFTranslucentTexture(GraphBuilder, ETranslucencyPass::TPT_TranslucencyAfterDOF, SeparateTranslucencyDimensions, bIsModulate, ShaderPlatform);
// We will need to update views separate transluceny buffers if we have just created them.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/DiaphragmDOF.cpp:2682
Scope (from outer to inner):
file
function bool DiaphragmDOF::AddPasses
Source code excerpt:
if (bEnableSlightOutOfFocusBokeh)
PermutationVector.Set<FDDOFBokehSimulationDim>(BokehSimulation);
PermutationVector.Set<FDiaphragmDOFRecombineCS::FQualityDim>(RecombineQuality);
FRDGTextureRef SeparateTranslucency = TranslucencyPassResources.GetColorForRead(GraphBuilder);
FRDGTextureRef SeparateTranslucencyDepth = TranslucencyPassResources.GetDepthForRead(GraphBuilder);
FRDGTextureRef SeparateTranslucencyModulateColor = TranslucencyPassResources.GetColorModulateForRead(GraphBuilder);
FDiaphragmDOFRecombineCS::FParameters* PassParameters = GraphBuilder.AllocParameters<FDiaphragmDOFRecombineCS::FParameters>();
PassParameters->CommonParameters = CommonParameters;
SetCocModelParameters(GraphBuilder, &PassParameters->CocModel, CocModel, /* CocRadiusBasis = */ float(GatheringViewSize.X));
PassParameters->ViewportRect = PassViewRect;
PassParameters->ViewportSize = FVector4f(PassViewRect.Width(), PassViewRect.Height(), 1.0f / PassViewRect.Width(), 1.0f / PassViewRect.Height());
PassParameters->DispatchThreadIdToDOFBufferUV = (
FScreenTransform::DispatchThreadIdToViewportUV(PassViewRect) *
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/DiaphragmDOF.cpp:2715
Scope (from outer to inner):
file
function bool DiaphragmDOF::AddPasses
Source code excerpt:
PassParameters->SeparateTranslucencyUpscaling = bScaleSeparateTranslucency ? 1 : 0;
PassParameters->SceneColorInput = FullResGatherInputTextures.SceneColor;
PassParameters->SceneDepthTexture = SceneTextures.SceneDepthTexture;
PassParameters->SceneSeparateCoc = FullResGatherInputTextures.SeparateCoc; // TODO looks useless.
PassParameters->SceneSeparateTranslucency = SeparateTranslucency;
PassParameters->SceneSeparateTranslucencyModulateColor = SeparateTranslucencyModulateColor;
PassParameters->ConvolutionInputSize = FVector4f(RefBufferSize.X, RefBufferSize.Y, 1.0f / RefBufferSize.X, 1.0f / RefBufferSize.Y);
PassParameters->ForegroundConvolution = ForegroundConvolutionTextures;
PassParameters->ForegroundHoleFillingConvolution = ForegroundHoleFillingConvolutionTextures;
PassParameters->SlightOutOfFocusConvolution = SlightOutOfFocusConvolutionTextures;
PassParameters->BackgroundConvolution = BackgroundConvolutionTextures;
// Separate translucency upsampling
PassParameters->FullResDepthTexture = GraphBuilder.CreateSRV(FRDGTextureSRVDesc::CreateForMetaData(SceneTextures.SceneDepthTexture, ERDGTextureMetaDataAccess::Depth));
PassParameters->LowResDepthTexture = GraphBuilder.CreateSRV(FRDGTextureSRVDesc::CreateForMetaData(SeparateTranslucencyDepth, ERDGTextureMetaDataAccess::Depth));
const FIntPoint LowResExtent = SeparateTranslucency->Desc.Extent;
PassParameters->SeparateTranslucencyTextureLowResExtentInverse = FVector2f(1.0f / LowResExtent.X, 1.0f / LowResExtent.Y);
if (!bGatherForeground && !bGatherBackground)
{
check(PassParameters->BackgroundConvolution.SceneColor == nullptr);
check(PassParameters->BackgroundConvolution.SeparateAlpha == nullptr);
PassParameters->BackgroundConvolution.SceneColor = GraphBuilder.RegisterExternalTexture(GSystemTextures.BlackDummy);
PassParameters->BackgroundConvolution.SeparateAlpha = GraphBuilder.RegisterExternalTexture(GSystemTextures.BlackDummy);
}
if (bEnableSlightOutOfFocusBokeh) // && ScatteringBokehLUTOutput.IsValid() && SlightOutOfFocusConvolutionOutput.IsValid())
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/DiaphragmDOF.cpp:2727
Scope (from outer to inner):
file
function bool DiaphragmDOF::AddPasses
Source code excerpt:
PassParameters->FullResDepthTexture = GraphBuilder.CreateSRV(FRDGTextureSRVDesc::CreateForMetaData(SceneTextures.SceneDepthTexture, ERDGTextureMetaDataAccess::Depth));
PassParameters->LowResDepthTexture = GraphBuilder.CreateSRV(FRDGTextureSRVDesc::CreateForMetaData(SeparateTranslucencyDepth, ERDGTextureMetaDataAccess::Depth));
const FIntPoint LowResExtent = SeparateTranslucency->Desc.Extent;
PassParameters->SeparateTranslucencyTextureLowResExtentInverse = FVector2f(1.0f / LowResExtent.X, 1.0f / LowResExtent.Y);
if (!bGatherForeground && !bGatherBackground)
{
check(PassParameters->BackgroundConvolution.SceneColor == nullptr);
check(PassParameters->BackgroundConvolution.SeparateAlpha == nullptr);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessMaterial.cpp:688
Scope (from outer to inner):
file
function FScreenPassTexture AddPostProcessMaterialPass
Source code excerpt:
TShaderRef<FPostProcessMaterialVS> VertexShader;
TShaderRef<FPostProcessMaterialPS> PixelShader;
GetMaterialInfo(MaterialInterface, FeatureLevel, Inputs, Material, MaterialRenderProxy, MaterialShaderMap, VertexShader, PixelShader);
EBlendableLocation BlendableLocation = EBlendableLocation(Material->GetBlendableLocation());
const FScreenPassTexture SceneColor = FScreenPassTexture::CopyFromSlice(GraphBuilder, Inputs.GetInput(BlendableLocation == BL_TranslucencyAfterDOF ? EPostProcessMaterialInput::SeparateTranslucency : EPostProcessMaterialInput::SceneColor));
check(VertexShader.IsValid());
check(PixelShader.IsValid());
FRHIDepthStencilState* DefaultDepthStencilState = FScreenPassPipelineState::FDefaultDepthStencilState::GetRHI();
FRHIDepthStencilState* DepthStencilState = DefaultDepthStencilState;
FRDGTextureRef DepthStencilTexture = nullptr;
// Allocate custom depth stencil texture(s) and depth stencil state.
const EMaterialCustomDepthPolicy CustomStencilPolicy = GetMaterialCustomDepthPolicy(Material);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessVisualizeBuffer.cpp:345
Scope (from outer to inner):
file
function FScreenPassTexture AddVisualizeGBufferOverviewPass
Source code excerpt:
RDG_EVENT_SCOPE(GraphBuilder, "%s", *MaterialName);
FPostProcessMaterialInputs PostProcessMaterialInputs;
PostProcessMaterialInputs.SetInput(GraphBuilder, EPostProcessMaterialInput::SceneColor, Inputs.SceneColor);
PostProcessMaterialInputs.SetInput(GraphBuilder, EPostProcessMaterialInput::SeparateTranslucency, Inputs.SeparateTranslucency);
PostProcessMaterialInputs.SetInput(GraphBuilder, EPostProcessMaterialInput::PreTonemapHDRColor, Inputs.SceneColorBeforeTonemap);
PostProcessMaterialInputs.SetInput(GraphBuilder, EPostProcessMaterialInput::PostTonemapHDRColor, Inputs.SceneColorAfterTonemap);
PostProcessMaterialInputs.SetInput(GraphBuilder, EPostProcessMaterialInput::Velocity, Inputs.Velocity);
if (View.Family->EngineShowFlags.PathTracing && Inputs.PathTracingResources->bPostProcessEnabled)
{
const FPathTracingResources& PathTracingResources = *Inputs.PathTracingResources;
FIntRect ViewRect = Inputs.SceneColor.ViewRect;
PostProcessMaterialInputs.SetPathTracingInput(
EPathTracingPostProcessMaterialInput::DenoisedRadiance, FScreenPassTexture(PathTracingResources.DenoisedRadiance, ViewRect));
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessVisualizeBuffer.h:27
Scope: file
Source code excerpt:
// The scene color immediately after tonemapping is applied.
FScreenPassTexture SceneColorAfterTonemap;
// The separate translucency texture to composite.
FScreenPassTexture SeparateTranslucency;
// The original scene velocity texture to composite.
FScreenPassTexture Velocity;
/** The uniform buffer containing all scene textures. */
FSceneTextureShaderParameters SceneTextures;
/** The path tracing intermediate textures. */
const struct FPathTracingResources* PathTracingResources = nullptr;
// Dump targets to files on disk.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:526
Scope (from outer to inner):
file
function void AddPostProcessingPasses
lambda-function
Source code excerpt:
if (PostDOFTranslucencyResources.IsValid())
{
ViewRect = PostDOFTranslucencyResources.ViewRect;
}
PostProcessMaterialInputs.SetInput(GraphBuilder, EPostProcessMaterialInput::SeparateTranslucency, FScreenPassTexture(PostDOFTranslucencyResources.GetColorForRead(GraphBuilder), ViewRect));
PostProcessMaterialInputs.SetInput(GraphBuilder, EPostProcessMaterialInput::Velocity, Velocity);
PostProcessMaterialInputs.SceneTextures = GetSceneTextureShaderParameters(Inputs.SceneTextures);
PostProcessMaterialInputs.CustomDepthTexture = CustomDepth.Texture;
PostProcessMaterialInputs.bManualStencilTest = Inputs.bSeparateCustomStencil;
PostProcessMaterialInputs.SceneWithoutWaterTextures = &SceneWithoutWaterTextures;
return PostProcessMaterialInputs;
};
const auto AddAfterPass = [&](EPass InPass, FScreenPassTexture InSceneColor) -> FScreenPassTexture
{
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:744
Scope (from outer to inner):
file
function void AddPostProcessingPasses
Source code excerpt:
{
FScreenPassTexture PostDOFTranslucency = AddPostProcessMaterialChain(
GraphBuilder, View,
GetPostProcessMaterialInputs(SceneColor),
MaterialChainTranslucencyAfterDOF,
EPostProcessMaterialInput::SeparateTranslucency);
PostDOFTranslucencyResources.ColorTexture = PostDOFTranslucency.Texture;
ensure(PostDOFTranslucencyResources.ViewRect == PostDOFTranslucency.ViewRect);
}
// DOF passes were not added, therefore need to compose Separate translucency manually.
if (!bSceneColorHasPostDOFTranslucency)
{
FTranslucencyComposition TranslucencyComposition;
TranslucencyComposition.Operation = FTranslucencyComposition::EOperation::ComposeToNewSceneColor;
TranslucencyComposition.bApplyModulateOnly = bComposeSeparateTranslucencyInTSR;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:1225
Scope (from outer to inner):
file
function void AddPostProcessingPasses
Source code excerpt:
const UMaterialInterface* HighestPriorityMaterial = MaterialChain[0];
FPostProcessMaterialInputs PassInputs;
PassSequence.AcceptOverrideIfLastPass(EPass::Tonemap, PassInputs.OverrideOutput);
PassInputs.SetInput(GraphBuilder, EPostProcessMaterialInput::SceneColor, FScreenPassTexture::CopyFromSlice(GraphBuilder, SceneColorSlice));
//PassInputs.SetInput(EPostProcessMaterialInput::SeparateTranslucency, SeparateTranslucency);
PassInputs.SetInput(GraphBuilder, EPostProcessMaterialInput::CombinedBloom, Bloom);
PassInputs.SceneTextures = GetSceneTextureShaderParameters(Inputs.SceneTextures);
PassInputs.CustomDepthTexture = CustomDepth.Texture;
PassInputs.bManualStencilTest = Inputs.bSeparateCustomStencil;
SceneColor = AddPostProcessMaterialPass(GraphBuilder, View, PassInputs, HighestPriorityMaterial);
}
else
{
FRDGTextureRef ColorGradingTexture = nullptr;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:1557
Scope (from outer to inner):
file
function void AddPostProcessingPasses
Source code excerpt:
if (PostDOFTranslucencyResources.IsValid())
{
ViewRect = PostDOFTranslucencyResources.ViewRect;
}
PassInputs.SeparateTranslucency = FScreenPassTexture(PostDOFTranslucencyResources.GetColorForRead(GraphBuilder), ViewRect); // TODO
PassInputs.Velocity = Velocity;
PassInputs.SceneTextures = GetSceneTextureShaderParameters(Inputs.SceneTextures);
PassInputs.bOverview = bVisualizeGBufferOverview;
PassInputs.bDumpToFile = bVisualizeGBufferDumpToFile;
PassInputs.bOutputInHDR = bOutputInHDR;
PassInputs.PathTracingResources = &Inputs.PathTracingResources;
SceneColor = AddVisualizeGBufferOverviewPass(GraphBuilder, View, PassInputs);
}
if (PassSequence.IsEnabled(EPass::VisualizeLumenSceneOverview))
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:2129
Scope (from outer to inner):
file
function void AddMobilePostProcessingPasses
Source code excerpt:
BloomSetup,
DepthOfField,
Bloom,
EyeAdaptation,
SunMerge,
SeparateTranslucency,
TAA,
Tonemap,
PostProcessMaterialAfterTonemapping,
FXAA,
HighResolutionScreenshotMask,
SelectionOutline,
EditorPrimitive,
#if UE_ENABLE_DEBUG_DRAWING
DebugPrimitive,
#endif
PrimaryUpscale,
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:2291
Scope (from outer to inner):
file
function void AddMobilePostProcessingPasses
Source code excerpt:
PassSequence.SetEnabled(EPass::BloomSetup, bUseSun || bUseMobileDof || bUseBloom || bUseBasicEyeAdaptation || bUseHistogramEyeAdaptation);
PassSequence.SetEnabled(EPass::DepthOfField, bUseDof);
PassSequence.SetEnabled(EPass::Bloom, bUseBloom);
PassSequence.SetEnabled(EPass::EyeAdaptation, bUseEyeAdaptation);
PassSequence.SetEnabled(EPass::SunMerge, bUseBloom || bUseSun);
PassSequence.SetEnabled(EPass::SeparateTranslucency, bUseSeparateTranslucency);
PassSequence.SetEnabled(EPass::TAA, bUseTAA);
PassSequence.SetEnabled(EPass::PostProcessMaterialAfterTonemapping, PostProcessMaterialAfterTonemappingChain.Num() != 0);
PassSequence.SetEnabled(EPass::FXAA, View.AntiAliasingMethod == AAM_FXAA);
PassSequence.Finalize();
if (PassSequence.IsEnabled(EPass::Distortion))
{
PassSequence.AcceptPass(EPass::Distortion);
FMobileDistortionAccumulateInputs DistortionAccumulateInputs;
DistortionAccumulateInputs.SceneColor = SceneColor;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:2606
Scope (from outer to inner):
file
function void AddMobilePostProcessingPasses
Source code excerpt:
BloomOutput = AddMobileSunMergePass(GraphBuilder, View, SunMergeInputs);
}
// mobile separate translucency
if (PassSequence.IsEnabled(EPass::SeparateTranslucency))
{
PassSequence.AcceptPass(EPass::SeparateTranslucency);
FMobileSeparateTranslucencyInputs SeparateTranslucencyInputs;
SeparateTranslucencyInputs.SceneColor = SceneColor;
SeparateTranslucencyInputs.SceneDepthAux = SceneDepthAux;
SeparateTranslucencyInputs.SceneDepth = SceneDepth;
SeparateTranslucencyInputs.bRequiresMultiPass = Inputs.bRequiresMultiPass;
AddMobileSeparateTranslucencyPass(GraphBuilder, Scene, View, SeparateTranslucencyInputs);
}
AddPostProcessMaterialPass(BL_SceneColorAfterDOF, false);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:2664
Scope (from outer to inner):
file
function void AddMobilePostProcessingPasses
Source code excerpt:
PassSequence.SetEnabled(EPass::BloomSetup, false);
PassSequence.SetEnabled(EPass::DepthOfField, false);
PassSequence.SetEnabled(EPass::Bloom, false);
PassSequence.SetEnabled(EPass::EyeAdaptation, false);
PassSequence.SetEnabled(EPass::SunMerge, false);
PassSequence.SetEnabled(EPass::SeparateTranslucency, false);
PassSequence.SetEnabled(EPass::TAA, false);
PassSequence.SetEnabled(EPass::PostProcessMaterialAfterTonemapping, false);
PassSequence.SetEnabled(EPass::FXAA, false);
PassSequence.Finalize();
}
if (PassSequence.IsEnabled(EPass::Tonemap))
{
bool bHDRTonemapperOutput = false;
if (!BloomOutput.IsValid())
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:488
Scope: file
Source code excerpt:
FASTVRAM_CVAR(DistanceFieldIrradiance, 0);
FASTVRAM_CVAR(DistanceFieldShadows, 1);
FASTVRAM_CVAR(Distortion, 1);
FASTVRAM_CVAR(ScreenSpaceShadowMask, 1);
FASTVRAM_CVAR(VolumetricFog, 1);
FASTVRAM_CVAR(SeparateTranslucency, 0);
FASTVRAM_CVAR(SeparateTranslucencyModulate, 0);
FASTVRAM_CVAR(ScreenSpaceAO,0);
FASTVRAM_CVAR(SSR, 0);
FASTVRAM_CVAR(DBufferA, 0);
FASTVRAM_CVAR(DBufferB, 0);
FASTVRAM_CVAR(DBufferC, 0);
FASTVRAM_CVAR(DBufferMask, 0);
FASTVRAM_CVAR(DOFSetup, 1);
FASTVRAM_CVAR(DOFReduce, 1);
FASTVRAM_CVAR(DOFPostfilter, 1);
FASTVRAM_CVAR(PostProcessMaterial, 1);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:688
Scope (from outer to inner):
file
function void FFastVramConfig::Update
Source code excerpt:
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_DistanceFieldIrradiance, DistanceFieldIrradiance);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_DistanceFieldShadows, DistanceFieldShadows);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_Distortion, Distortion);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_ScreenSpaceShadowMask, ScreenSpaceShadowMask);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_VolumetricFog, VolumetricFog);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_SeparateTranslucency, SeparateTranslucency);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_SeparateTranslucencyModulate, SeparateTranslucencyModulate);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_ScreenSpaceAO, ScreenSpaceAO);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_SSR, SSR);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_DBufferA, DBufferA);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_DBufferB, DBufferB);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_DBufferC, DBufferC);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_DBufferMask, DBufferMask);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_DOFSetup, DOFSetup);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_DOFReduce, DOFReduce);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_DOFPostfilter, DOFPostfilter);
bDirty |= UpdateTextureFlagFromCVar(CVarFastVRam_CustomDepth, CustomDepth);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:2884
Scope (from outer to inner):
file
function FSceneRenderer::FSceneRenderer
Source code excerpt:
// Check if the translucency are allowed to be rendered after DOF, if not, translucency after DOF will be rendered in standard translucency.
{
bool SeparateTranslucencyEnabled = ViewFamily.EngineShowFlags.PostProcessing // Used for reflection captures.
&& !ViewFamily.UseDebugViewPS()
&& ViewFamily.EngineShowFlags.SeparateTranslucency;
const bool bIsMobile = ViewFamily.GetFeatureLevel() == ERHIFeatureLevel::ES3_1;
if (bIsMobile)
{
const bool bMobileMSAA = GetDefaultMSAACount(ERHIFeatureLevel::ES3_1) > 1;
SeparateTranslucencyEnabled &= (IsMobileHDR() && !bMobileMSAA); // on <= ES3_1 separate translucency requires HDR on and MSAA off
}
ViewFamily.bAllowTranslucencyAfterDOF = SeparateTranslucencyEnabled && CVarAllowTranslucencyAfterDOF.GetValueOnAnyThread() != 0;
if (!ViewFamily.bAllowTranslucencyAfterDOF && !bIsMobile && CVarTSRForceSeparateTranslucency.GetValueOnAnyThread() != 0)
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.h:2838
Scope: file
Source code excerpt:
ETextureCreateFlags DistanceFieldIrradiance;
ETextureCreateFlags DistanceFieldAOConfidence;
ETextureCreateFlags Distortion;
ETextureCreateFlags ScreenSpaceShadowMask;
ETextureCreateFlags VolumetricFog;
ETextureCreateFlags SeparateTranslucency;
ETextureCreateFlags SeparateTranslucencyModulate;
ETextureCreateFlags ScreenSpaceAO;
ETextureCreateFlags SSR;
ETextureCreateFlags DBufferA;
ETextureCreateFlags DBufferB;
ETextureCreateFlags DBufferC;
ETextureCreateFlags DBufferMask;
ETextureCreateFlags DOFSetup;
ETextureCreateFlags DOFReduce;
ETextureCreateFlags DOFPostfilter;
ETextureCreateFlags PostProcessMaterial;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/TranslucentRendering.cpp:765
Scope (from outer to inner):
file
function FRDGTextureMSAA CreatePostDOFTranslucentTexture
Source code excerpt:
const FRDGTextureDesc Desc = GetPostDOFTranslucentTextureDesc(TranslucencyPass, SeparateTranslucencyDimensions, bIsModulate, ShaderPlatform);
return CreateTextureMSAA(
GraphBuilder, Desc,
kTranslucencyColorTextureMultisampledName[int32(TranslucencyPass)],
kTranslucencyColorTextureName[int32(TranslucencyPass)],
bIsModulate ? GFastVRamConfig.SeparateTranslucencyModulate : GFastVRamConfig.SeparateTranslucency);
}
void SetupDownsampledTranslucencyViewParameters(
const FViewInfo& View,
FIntPoint TextureExtent,
FIntRect ViewRect,
ETranslucencyPass::Type TranslucencyPass,
FViewUniformShaderParameters& DownsampledTranslucencyViewParameters)
{
DownsampledTranslucencyViewParameters = *View.CachedViewUniformShaderParameters;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/TranslucentRendering.cpp:1544
Scope (from outer to inner):
file
function void FDeferredShadingSceneRenderer::RenderTranslucency
Source code excerpt:
SharedDepthTexture = CreateTextureMSAA(
GraphBuilder, Desc,
TEXT("Translucency.DepthMS"),
TEXT("Translucency.Depth"),
GFastVRamConfig.SeparateTranslucencyModulate); // TODO: this should be SeparateTranslucency, but is what the code was doing
// Downscale the depth buffer for each individual view, but shared accross all translucencies.
for (int32 ViewIndex = 0; ViewIndex < Views.Num(); ++ViewIndex)
{
FViewInfo& View = Views[ViewIndex];
const ETranslucencyView TranslucencyView = GetTranslucencyView(View);
if (!ShouldRenderView(View, TranslucencyView))
{
continue;
}
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Public/PostProcess/PostProcessMaterialInputs.h:16
Scope: file
Source code excerpt:
{
// Always Active. Color from the previous stage of the post process chain.
SceneColor = 0,
// Always Active.
SeparateTranslucency = 1,
// Replace Tonemap Only. Half resolution combined bloom input.
CombinedBloom = 2,
// Buffer Visualization Only.
PreTonemapHDRColor = 2,
PostTonemapHDRColor = 3,
// Active if separate velocity pass is used--i.e. not part of base pass; Not active during Replace Tonemap.
Velocity = 4
};
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Public/PostProcess/PostProcessMaterialInputs.h:68
Scope (from outer to inner):
file
function inline void Validate
Source code excerpt:
}
inline void Validate() const
{
ValidateInputExists(EPostProcessMaterialInput::SceneColor);
ValidateInputExists(EPostProcessMaterialInput::SeparateTranslucency);
// Either override output format is valid or the override output texture is; not both.
if (OutputFormat != PF_Unknown)
{
check(OverrideOutput.Texture == nullptr);
}
if (OverrideOutput.Texture)
{
check(OutputFormat == PF_Unknown);
}