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

Classes

class  FSingleLayerWaterCompositePS
 
class  FSingleLayerWaterRefractionMaskPS
 
class  FSingleLayerWaterRefractionCullingPS
 
class  FWaterTileCategorisationMarkCS
 
class  FWaterTileClassificationBuildListsCS
 
class  FWaterRefractionCopyPS
 
class  FSingleLayerWaterPassMeshProcessor
 
class  FSingleLayerWaterDepthPrepassMeshProcessor
 

Namespaces

namespace  ESingleLayerWaterReflections
 
namespace  ScreenSpaceRayTracing
 

Enumerations

enum  ESingleLayerWaterReflections::Type {
  ESingleLayerWaterReflections::Disabled = 0 , ESingleLayerWaterReflections::Enabled = 1 , ESingleLayerWaterReflections::ReflectionCaptures = 2 , ESingleLayerWaterReflections::SSR = 3 ,
  ESingleLayerWaterReflections::MaxValue = SSR
}
 

Functions

 DECLARE_GPU_STAT_NAMED (RayTracingWaterReflections, TEXT("Ray Tracing Water Reflections"))
 
 DECLARE_GPU_DRAWCALL_STAT (SingleLayerWaterDepthPrepass)
 
 DECLARE_GPU_DRAWCALL_STAT (SingleLayerWater)
 
bool SingleLayerWaterUsesSimpleShading (EShaderPlatform ShaderPlatform)
 
bool ShouldRenderSingleLayerWater (TArrayView< const FViewInfo > Views)
 
bool ShouldRenderSingleLayerWaterSkippedRenderEditorNotification (TArrayView< const FViewInfo > Views)
 
bool ShouldRenderSingleLayerWaterDepthPrepass (TArrayView< const FViewInfo > Views)
 
ESingleLayerWaterPrepassLocation GetSingleLayerWaterDepthPrepassLocation (bool bFullDepthPrepass, ECustomDepthPassLocation CustomDepthPassLocation)
 
bool ScreenSpaceRayTracing::ShouldRenderScreenSpaceReflectionsWater (const FViewInfo &View)
 
bool ShouldRenderLumenReflectionsWater (const FViewInfo &View, bool bSkipTracingDataCheck, bool bSkipProjectCheck)
 
bool ShouldUseBilinearSamplerForDepthWithoutSingleLayerWater (EPixelFormat DepthTextureFormat)
 
bool UseSingleLayerWaterIndirectDraw (EShaderPlatform ShaderPlatform)
 
bool IsWaterDistanceFieldShadowEnabled_Runtime (const FStaticShaderPlatform Platform)
 
bool IsWaterVirtualShadowMapFilteringEnabled_Runtime (const FStaticShaderPlatform Platform)
 
bool NeedsSeparatedMainDirectionalLightTexture_Runtime (const FStaticShaderPlatform Platform)
 
 IMPLEMENT_STATIC_UNIFORM_BUFFER_STRUCT (FSingleLayerWaterPassUniformParameters, "SingleLayerWater", DeferredDecals)
 
 IMPLEMENT_GLOBAL_SHADER (FSingleLayerWaterCompositePS, "/Engine/Private/SingleLayerWaterComposite.usf", "SingleLayerWaterCompositePS", SF_Pixel)
 
 IMPLEMENT_GLOBAL_SHADER (FSingleLayerWaterRefractionMaskPS, "/Engine/Private/SingleLayerWaterRefractionCulling.usf", "SingleLayerWaterRefractionMaskPS", SF_Pixel)
 
 IMPLEMENT_GLOBAL_SHADER (FSingleLayerWaterRefractionCullingPS, "/Engine/Private/SingleLayerWaterRefractionCulling.usf", "SingleLayerWaterRefractionCullingPS", SF_Pixel)
 
 IMPLEMENT_GLOBAL_SHADER (FWaterTileCategorisationMarkCS, "/Engine/Private/SingleLayerWaterComposite.usf", "WaterTileCatergorisationMarkCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FWaterTileClassificationBuildListsCS, "/Engine/Private/SingleLayerWaterComposite.usf", "WaterTileClassificationBuildListsCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FWaterTileVS, "/Engine/Private/SingleLayerWaterComposite.usf", "WaterTileVS", SF_Vertex)
 
 IMPLEMENT_GLOBAL_SHADER (FWaterRefractionCopyPS, "/Engine/Private/SingleLayerWaterComposite.usf", "WaterRefractionCopyPS", SF_Pixel)
 
bool IsVSMTranslucentHighQualityEnabled ()
 
FSingleLayerWaterPassUniformParametersCreateSingleLayerWaterPassUniformParameters (FRDGBuilder &GraphBuilder, const FScene *Scene, const FViewInfo &View, const FSceneTextures &SceneTextures, FRDGTextureRef SceneDepthWithoutWater, FRDGTextureRef SceneColorWithoutWater, FRDGTextureRef RefractionMaskTexture, const FVector4f &MinMaxUV)
 
FMeshPassProcessorCreateSingleLayerWaterPassProcessor (ERHIFeatureLevel::Type FeatureLevel, const FScene *Scene, const FSceneView *InViewIfDynamicMeshCommand, FMeshPassDrawListContext *InDrawListContext)
 
 REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR (SingleLayerWater, CreateSingleLayerWaterPassProcessor, EShadingPath::Deferred, EMeshPass::SingleLayerWaterPass, EMeshPassFlags::CachedMeshCommands|EMeshPassFlags::MainView)
 
FMeshPassProcessorCreateSingleLayerWaterDepthPrepassProcessor (ERHIFeatureLevel::Type FeatureLevel, const FScene *Scene, const FSceneView *InViewIfDynamicMeshCommand, FMeshPassDrawListContext *InDrawListContext)
 
 REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR (SingleLayerWaterDepthPrepass, CreateSingleLayerWaterDepthPrepassProcessor, EShadingPath::Deferred, EMeshPass::SingleLayerWaterDepthPrepass, EMeshPassFlags::CachedMeshCommands|EMeshPassFlags::MainView)
 

Function Documentation

◆ CreateSingleLayerWaterDepthPrepassProcessor()

FMeshPassProcessor * CreateSingleLayerWaterDepthPrepassProcessor ( ERHIFeatureLevel::Type  FeatureLevel,
const FScene Scene,
const FSceneView InViewIfDynamicMeshCommand,
FMeshPassDrawListContext InDrawListContext 
)

◆ CreateSingleLayerWaterPassProcessor()

FMeshPassProcessor * CreateSingleLayerWaterPassProcessor ( ERHIFeatureLevel::Type  FeatureLevel,
const FScene Scene,
const FSceneView InViewIfDynamicMeshCommand,
FMeshPassDrawListContext InDrawListContext 
)

◆ CreateSingleLayerWaterPassUniformParameters()

FSingleLayerWaterPassUniformParameters * CreateSingleLayerWaterPassUniformParameters ( FRDGBuilder GraphBuilder,
const FScene Scene,
const FViewInfo View,
const FSceneTextures SceneTextures,
FRDGTextureRef  SceneDepthWithoutWater,
FRDGTextureRef  SceneColorWithoutWater,
FRDGTextureRef  RefractionMaskTexture,
const FVector4f MinMaxUV 
)

◆ DECLARE_GPU_DRAWCALL_STAT() [1/2]

DECLARE_GPU_DRAWCALL_STAT ( SingleLayerWater  )

◆ DECLARE_GPU_DRAWCALL_STAT() [2/2]

DECLARE_GPU_DRAWCALL_STAT ( SingleLayerWaterDepthPrepass  )

◆ DECLARE_GPU_STAT_NAMED()

DECLARE_GPU_STAT_NAMED ( RayTracingWaterReflections  ,
TEXT("Ray Tracing Water Reflections"  
)

◆ GetSingleLayerWaterDepthPrepassLocation()

ESingleLayerWaterPrepassLocation GetSingleLayerWaterDepthPrepassLocation ( bool  bFullDepthPrepass,
ECustomDepthPassLocation  CustomDepthPassLocation 
)

◆ IMPLEMENT_GLOBAL_SHADER() [1/7]

IMPLEMENT_GLOBAL_SHADER ( FSingleLayerWaterCompositePS  ,
"/Engine/Private/SingleLayerWaterComposite.usf"  ,
"SingleLayerWaterCompositePS"  ,
SF_Pixel   
)

◆ IMPLEMENT_GLOBAL_SHADER() [2/7]

IMPLEMENT_GLOBAL_SHADER ( FSingleLayerWaterRefractionCullingPS  ,
"/Engine/Private/SingleLayerWaterRefractionCulling.usf"  ,
"SingleLayerWaterRefractionCullingPS"  ,
SF_Pixel   
)

◆ IMPLEMENT_GLOBAL_SHADER() [3/7]

IMPLEMENT_GLOBAL_SHADER ( FSingleLayerWaterRefractionMaskPS  ,
"/Engine/Private/SingleLayerWaterRefractionCulling.usf"  ,
"SingleLayerWaterRefractionMaskPS"  ,
SF_Pixel   
)

◆ IMPLEMENT_GLOBAL_SHADER() [4/7]

IMPLEMENT_GLOBAL_SHADER ( FWaterRefractionCopyPS  ,
"/Engine/Private/SingleLayerWaterComposite.usf"  ,
"WaterRefractionCopyPS"  ,
SF_Pixel   
)

◆ IMPLEMENT_GLOBAL_SHADER() [5/7]

IMPLEMENT_GLOBAL_SHADER ( FWaterTileCategorisationMarkCS  ,
"/Engine/Private/SingleLayerWaterComposite.usf"  ,
"WaterTileCatergorisationMarkCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [6/7]

IMPLEMENT_GLOBAL_SHADER ( FWaterTileClassificationBuildListsCS  ,
"/Engine/Private/SingleLayerWaterComposite.usf"  ,
"WaterTileClassificationBuildListsCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [7/7]

IMPLEMENT_GLOBAL_SHADER ( FWaterTileVS  ,
"/Engine/Private/SingleLayerWaterComposite.usf"  ,
"WaterTileVS"  ,
SF_Vertex   
)

◆ IMPLEMENT_STATIC_UNIFORM_BUFFER_STRUCT()

IMPLEMENT_STATIC_UNIFORM_BUFFER_STRUCT ( FSingleLayerWaterPassUniformParameters  ,
"SingleLayerWater"  ,
DeferredDecals   
)

◆ IsVSMTranslucentHighQualityEnabled()

bool IsVSMTranslucentHighQualityEnabled ( )

◆ IsWaterDistanceFieldShadowEnabled_Runtime()

bool IsWaterDistanceFieldShadowEnabled_Runtime ( const FStaticShaderPlatform  Platform)

◆ IsWaterVirtualShadowMapFilteringEnabled_Runtime()

bool IsWaterVirtualShadowMapFilteringEnabled_Runtime ( const FStaticShaderPlatform  Platform)

◆ NeedsSeparatedMainDirectionalLightTexture_Runtime()

bool NeedsSeparatedMainDirectionalLightTexture_Runtime ( const FStaticShaderPlatform  Platform)

◆ REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR() [1/2]

◆ REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR() [2/2]

◆ ShouldRenderLumenReflectionsWater()

bool ShouldRenderLumenReflectionsWater ( const FViewInfo View,
bool  bSkipTracingDataCheck,
bool  bSkipProjectCheck 
)

◆ ShouldRenderSingleLayerWater()

bool ShouldRenderSingleLayerWater ( TArrayView< const FViewInfo Views)

◆ ShouldRenderSingleLayerWaterDepthPrepass()

bool ShouldRenderSingleLayerWaterDepthPrepass ( TArrayView< const FViewInfo Views)

◆ ShouldRenderSingleLayerWaterSkippedRenderEditorNotification()

bool ShouldRenderSingleLayerWaterSkippedRenderEditorNotification ( TArrayView< const FViewInfo Views)

◆ ShouldUseBilinearSamplerForDepthWithoutSingleLayerWater()

bool ShouldUseBilinearSamplerForDepthWithoutSingleLayerWater ( EPixelFormat  DepthTextureFormat)

◆ SingleLayerWaterUsesSimpleShading()

bool SingleLayerWaterUsesSimpleShading ( EShaderPlatform  ShaderPlatform)

◆ UseSingleLayerWaterIndirectDraw()

bool UseSingleLayerWaterIndirectDraw ( EShaderPlatform  ShaderPlatform)