UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TranslucentRendering.cpp File Reference

Classes

class  FCopySceneColorPS
 
class  FCopyBackgroundVisibilityPS
 
class  FComposeSeparateTranslucencyPS
 
class  FTranslucencyUpsampleResponsiveAAPS
 

Functions

 DECLARE_CYCLE_STAT (TEXT("TranslucencyTimestampQueryFence Wait"), STAT_TranslucencyTimestampQueryFence_Wait, STATGROUP_SceneRendering)
 
 DECLARE_CYCLE_STAT (TEXT("TranslucencyTimestampQuery Wait"), STAT_TranslucencyTimestampQuery_Wait, STATGROUP_SceneRendering)
 
 DECLARE_FLOAT_COUNTER_STAT (TEXT("Translucency GPU Time (MS)"), STAT_TranslucencyGPU, STATGROUP_SceneRendering)
 
 DEFINE_GPU_DRAWCALL_STAT (Translucency)
 
bool ShouldRenderVolumetricCloud (const FScene *Scene, const FEngineShowFlags &EngineShowFlags)
 
bool IsVSMTranslucentHighQualityEnabled ()
 
DynamicRenderScaling::FHeuristicSettings GetDynamicTranslucencyResolutionSettings ()
 
DynamicRenderScaling::FBudget GDynamicTranslucencyResolution (TEXT("DynamicTranslucencyResolution"), &GetDynamicTranslucencyResolutionSettings)
 
EMeshPass::Type TranslucencyPassToMeshPass (ETranslucencyPass::Type TranslucencyPass)
 
ETranslucencyView GetTranslucencyView (const FViewInfo &View)
 
ETranslucencyView GetTranslucencyViews (TArrayView< const FViewInfo > Views)
 
bool IsSeparateTranslucencyEnabled (ETranslucencyPass::Type TranslucencyPass, float DownsampleScale)
 
FSeparateTranslucencyDimensions UpdateSeparateTranslucencyDimensions (const FSceneRenderer &SceneRenderer)
 
 IMPLEMENT_GLOBAL_SHADER (FCopySceneColorPS, "/Engine/Private/TranslucentLightingShaders.usf", "CopySceneColorMain", SF_Pixel)
 
FRDGTextureRef AddCopySceneColorPass (FRDGBuilder &GraphBuilder, TArrayView< const FViewInfo > Views, FRDGTextureMSAA SceneColor, bool WithAlpha, bool bSkipIfUnderwater)
 
 IMPLEMENT_GLOBAL_SHADER (FCopyBackgroundVisibilityPS, "/Engine/Private/ComposeSeparateTranslucency.usf", "CopyBackgroundVisibilityPS", SF_Pixel)
 
 IMPLEMENT_GLOBAL_SHADER (FComposeSeparateTranslucencyPS, "/Engine/Private/ComposeSeparateTranslucency.usf", "MainPS", SF_Pixel)
 
 IMPLEMENT_GLOBAL_SHADER (FTranslucencyUpsampleResponsiveAAPS, "/Engine/Private/TranslucencyUpsampling.usf", "UpsampleResponsiveAAPS", SF_Pixel)
 
void SetupPostMotionBlurTranslucencyViewParameters (const FViewInfo &View, FViewUniformShaderParameters &Parameters)
 
const FRDGTextureDesc GetPostDOFTranslucentTextureDesc (ETranslucencyPass::Type TranslucencyPass, const FSeparateTranslucencyDimensions &SeparateTranslucencyDimensions, bool bIsModulate, EShaderPlatform ShaderPlatform)
 
FRDGTextureMSAA CreatePostDOFTranslucentTexture (FRDGBuilder &GraphBuilder, ETranslucencyPass::Type TranslucencyPass, const FSeparateTranslucencyDimensions &SeparateTranslucencyDimensions, bool bIsModulate, EShaderPlatform ShaderPlatform)
 
void SetupDownsampledTranslucencyViewParameters (const FViewInfo &View, FIntPoint TextureExtent, FIntRect ViewRect, ETranslucencyPass::Type TranslucencyPass, FViewUniformShaderParameters &DownsampledTranslucencyViewParameters)
 
TRDGUniformBufferRef< FTranslucentBasePassUniformParametersCreateTranslucentBasePassUniformBuffer (FRDGBuilder &GraphBuilder, const FScene *Scene, const FViewInfo &View, const int32 ViewIndex, const FTranslucencyLightingVolumeTextures &TranslucencyLightingVolumeTextures, FRDGTextureRef SceneColorCopyTexture, const ESceneTextureSetupMode SceneTextureSetupMode, bool bLumenGIEnabled, const FOITData &OITData, ETranslucencyPass::Type TranslucencyPass)
 
TRDGUniformBufferRef< FTranslucentBasePassUniformParametersCreateTranslucentBasePassUniformBuffer (FRDGBuilder &GraphBuilder, const FScene *Scene, const FViewInfo &View, const int32 ViewIndex, const FTranslucencyLightingVolumeTextures &TranslucencyLightingVolumeTextures, FRDGTextureRef SceneColorCopyTexture, const ESceneTextureSetupMode SceneTextureSetupMode, bool bLumenGIEnabled, ETranslucencyPass::Type TranslucencyPass)
 

Variables

int32 GSeparateTranslucencyUpsampleMode = 1
 

Function Documentation

◆ AddCopySceneColorPass()

FRDGTextureRef AddCopySceneColorPass ( FRDGBuilder GraphBuilder,
TArrayView< const FViewInfo Views,
FRDGTextureMSAA  SceneColor,
bool  WithAlpha = false,
bool  bSkipIfUnderwater = true 
)

Add Copy SceneColor Pass.

◆ CreatePostDOFTranslucentTexture()

FRDGTextureMSAA CreatePostDOFTranslucentTexture ( FRDGBuilder GraphBuilder,
ETranslucencyPass::Type  TranslucencyPass,
const FSeparateTranslucencyDimensions SeparateTranslucencyDimensions,
bool  bIsModulate,
EShaderPlatform  ShaderPlatform 
)

Shared function used to create Post DOF translucent textures

◆ CreateTranslucentBasePassUniformBuffer() [1/2]

TRDGUniformBufferRef< FTranslucentBasePassUniformParameters > CreateTranslucentBasePassUniformBuffer ( FRDGBuilder GraphBuilder,
const FScene Scene,
const FViewInfo View,
const int32  ViewIndex,
const FTranslucencyLightingVolumeTextures TranslucencyLightingVolumeTextures,
FRDGTextureRef  SceneColorCopyTexture,
const ESceneTextureSetupMode  SceneTextureSetupMode,
bool  bLumenGIEnabled,
const FOITData OITData,
ETranslucencyPass::Type  TranslucencyPass 
)

◆ CreateTranslucentBasePassUniformBuffer() [2/2]

TRDGUniformBufferRef< FTranslucentBasePassUniformParameters > CreateTranslucentBasePassUniformBuffer ( FRDGBuilder GraphBuilder,
const FScene Scene,
const FViewInfo View,
const int32  ViewIndex,
const FTranslucencyLightingVolumeTextures TranslucencyLightingVolumeTextures,
FRDGTextureRef  SceneColorCopyTexture,
const ESceneTextureSetupMode  SceneTextureSetupMode,
bool  bLumenGIEnabled,
ETranslucencyPass::Type  TranslucencyPass 
)

◆ DECLARE_CYCLE_STAT() [1/2]

DECLARE_CYCLE_STAT ( TEXT("TranslucencyTimestampQuery Wait" ,
STAT_TranslucencyTimestampQuery_Wait  ,
STATGROUP_SceneRendering   
)

◆ DECLARE_CYCLE_STAT() [2/2]

DECLARE_CYCLE_STAT ( TEXT("TranslucencyTimestampQueryFence Wait" ,
STAT_TranslucencyTimestampQueryFence_Wait  ,
STATGROUP_SceneRendering   
)

◆ DECLARE_FLOAT_COUNTER_STAT()

DECLARE_FLOAT_COUNTER_STAT ( TEXT("Translucency GPU Time (MS)")  ,
STAT_TranslucencyGPU  ,
STATGROUP_SceneRendering   
)

◆ DEFINE_GPU_DRAWCALL_STAT()

DEFINE_GPU_DRAWCALL_STAT ( Translucency  )

◆ GDynamicTranslucencyResolution()

DynamicRenderScaling::FBudget GDynamicTranslucencyResolution ( TEXT("DynamicTranslucencyResolution")  ,
GetDynamicTranslucencyResolutionSettings 
)

◆ GetDynamicTranslucencyResolutionSettings()

DynamicRenderScaling::FHeuristicSettings GetDynamicTranslucencyResolutionSettings ( )

◆ GetPostDOFTranslucentTextureDesc()

const FRDGTextureDesc GetPostDOFTranslucentTextureDesc ( ETranslucencyPass::Type  TranslucencyPass,
const FSeparateTranslucencyDimensions SeparateTranslucencyDimensions,
bool  bIsModulate,
EShaderPlatform  ShaderPlatform 
)

Shared function to get the post DOF texture pixel format and creation flags

◆ GetTranslucencyView()

ETranslucencyView GetTranslucencyView ( const FViewInfo View)

Returns the translucency views to render for the requested view.

◆ GetTranslucencyViews()

ETranslucencyView GetTranslucencyViews ( TArrayView< const FViewInfo Views)

Returns the union of all translucency views to render.

◆ IMPLEMENT_GLOBAL_SHADER() [1/4]

IMPLEMENT_GLOBAL_SHADER ( FComposeSeparateTranslucencyPS  ,
"/Engine/Private/ComposeSeparateTranslucency.usf"  ,
"MainPS"  ,
SF_Pixel   
)

◆ IMPLEMENT_GLOBAL_SHADER() [2/4]

IMPLEMENT_GLOBAL_SHADER ( FCopyBackgroundVisibilityPS  ,
"/Engine/Private/ComposeSeparateTranslucency.usf"  ,
"CopyBackgroundVisibilityPS"  ,
SF_Pixel   
)

◆ IMPLEMENT_GLOBAL_SHADER() [3/4]

IMPLEMENT_GLOBAL_SHADER ( FCopySceneColorPS  ,
"/Engine/Private/TranslucentLightingShaders.usf"  ,
"CopySceneColorMain"  ,
SF_Pixel   
)

◆ IMPLEMENT_GLOBAL_SHADER() [4/4]

IMPLEMENT_GLOBAL_SHADER ( FTranslucencyUpsampleResponsiveAAPS  ,
"/Engine/Private/TranslucencyUpsampling.usf"  ,
"UpsampleResponsiveAAPS"  ,
SF_Pixel   
)

◆ IsSeparateTranslucencyEnabled()

bool IsSeparateTranslucencyEnabled ( ETranslucencyPass::Type  TranslucencyPass,
float  DownsampleScale 
)

Check if separate translucency pass is needed for given pass and downsample scale

◆ IsVSMTranslucentHighQualityEnabled()

bool IsVSMTranslucentHighQualityEnabled ( )

◆ SetupDownsampledTranslucencyViewParameters()

void SetupDownsampledTranslucencyViewParameters ( const FViewInfo View,
FIntPoint  TextureExtent,
FIntRect  ViewRect,
ETranslucencyPass::Type  TranslucencyPass,
FViewUniformShaderParameters DownsampledTranslucencyViewParameters 
)

◆ SetupPostMotionBlurTranslucencyViewParameters()

void SetupPostMotionBlurTranslucencyViewParameters ( const FViewInfo View,
FViewUniformShaderParameters Parameters 
)

◆ ShouldRenderVolumetricCloud()

bool ShouldRenderVolumetricCloud ( const FScene Scene,
const FEngineShowFlags EngineShowFlags 
)

◆ TranslucencyPassToMeshPass()

EMeshPass::Type TranslucencyPassToMeshPass ( ETranslucencyPass::Type  TranslucencyPass)

Converts the the translucency pass into the respective mesh pass.

◆ UpdateSeparateTranslucencyDimensions()

FSeparateTranslucencyDimensions UpdateSeparateTranslucencyDimensions ( const FSceneRenderer SceneRenderer)

Computes the translucency dimensions.

Variable Documentation

◆ GSeparateTranslucencyUpsampleMode

int32 GSeparateTranslucencyUpsampleMode = 1