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

Go to the source code of this file.

Classes

class  FShadowDepthPassMeshProcessor
 
struct  FTiledShadowRendering
 
class  FShadowMapRenderTargets
 
class  FProjectedShadowInfo
 
class  FShadowVolumeBoundProjectionVS
 
class  FShadowProjectionNoTransformVS
 
class  FShadowProjectionPixelShaderInterface
 
class  FShadowProjectionShaderParameters
 
class  TShadowProjectionPS< Quality, bUseFadePlane, bModulatedShadows, bUseTransmission, SubPixelShadow >
 
class  TModulatedShadowProjection< Quality >
 
class  FEmptyTranslucentSelfShadowUniformBuffer
 
class  TShadowProjectionFromTranslucencyPS< Quality >
 
class  FOnePassPointShadowProjectionShaderParameters
 
class  TOnePassPointShadowProjectionPS< Quality, bUseTransmission, bUseSubPixel >
 
struct  FShadowProjectionMatrix
 
class  TDirectionalPercentageCloserShadowProjectionPS< Quality, bUseFadePlane >
 
class  TSpotPercentageCloserShadowProjectionPS< Quality, bUseFadePlane >
 
struct  FCompareFProjectedShadowInfoByResolution
 
struct  FCompareFProjectedShadowInfoBySplitIndex
 

Namespaces

namespace  ShadowRendering
 

Typedefs

typedef TFunctionRef< void(FRHICommandList &RHICmdList, bool bFirst)> FBeginShadowRenderPassFunction
 
using FPackedNaniteView = Nanite::FPackedView
 

Enumerations

enum  EShadowDepthRenderMode { ShadowDepthRenderMode_Normal , ShadowDepthRenderMode_EmissiveOnly , ShadowDepthRenderMode_GIBlockingVolumes }
 
enum class  EShadowDepthType {
  None = 0 , VSM = 1 << 0 , Directional = 1 << 1 , Point = 1 << 2 ,
  OnePassPoint = 1 << 3
}
 
enum class  EShadowMeshSelection : uint8 { SM = 1U << 0U , VSM = 1U << 1U , All = SM | VSM }
 
enum  EShadowDepthCacheMode { SDCM_MovablePrimitivesOnly , SDCM_StaticPrimitivesOnly , SDCM_CSMScrolling , SDCM_Uncached }
 
enum class  EShadowProjectionVertexShaderFlags { None , DrawingFrustum = 0x01 }
 

Functions

 DECLARE_GPU_DRAWCALL_STAT_NAMED_EXTERN (ShadowDepths, TEXT("Shadow Depths"))
 
void DrawStencilingCone (const FMatrix &ConeToWorld, float ConeAngle, float SphereRadius, const FVector &PreViewTranslation)
 
void OverrideWithDefaultMaterialForShadowDepth (const FMaterialRenderProxy *&InOutMaterialRenderProxy, const FMaterial *&InOutMaterialResource, ERHIFeatureLevel::Type InFeatureLevel)
 
 ENUM_CLASS_FLAGS (EShadowDepthType)
 
EMeshPass::Type GetShadowMeshPassType (EShadowDepthType ShadowDepthType)
 
bool UseCachedMeshDrawCommands (EShadowDepthType ShadowDepthType)
 
bool IsShadowCacheModeOcclusionQueryable (EShadowDepthCacheMode CacheMode)
 
void SetupTranslucentSelfShadowUniformParameters (const FProjectedShadowInfo *ShadowInfo, FTranslucentSelfShadowUniformParameters &OutParameters)
 
void GetOnePassPointShadowProjectionParameters (FRDGBuilder &GraphBuilder, const FProjectedShadowInfo *ShadowInfo, FOnePassPointShadowProjection &OutParameters)
 

Variables

constexpr uint32 ShadowRendering::ShadowStencilMask = 0x07u
 
TGlobalResource< FEmptyTranslucentSelfShadowUniformBufferGEmptyTranslucentSelfShadowUniformBuffer
 

Typedef Documentation

◆ FBeginShadowRenderPassFunction

◆ FPackedNaniteView

Enumeration Type Documentation

◆ EShadowDepthCacheMode

Enumerator
SDCM_MovablePrimitivesOnly 
SDCM_StaticPrimitivesOnly 
SDCM_CSMScrolling 
SDCM_Uncached 

◆ EShadowDepthRenderMode

Enumerator
ShadowDepthRenderMode_Normal 

The render mode used by regular shadows

ShadowDepthRenderMode_EmissiveOnly 

The render mode used when injecting emissive-only objects into the RSM.

ShadowDepthRenderMode_GIBlockingVolumes 

The render mode used when rendering volumes which block global illumination.

◆ EShadowDepthType

enum class EShadowDepthType
strong
Enumerator
None 
VSM 
Directional 
Point 
OnePassPoint 

◆ EShadowMeshSelection

Used to select what meshes to draw into what shadow infos. Each mesh selects the support it has, and the shadow info stores a mask of what types it collects. This makes it easy to allow regular SMs to collect both types if VSMs are disabled.

Enumerator
SM 
VSM 
All 

◆ EShadowProjectionVertexShaderFlags

Enumerator
None 
DrawingFrustum 

Function Documentation

◆ DECLARE_GPU_DRAWCALL_STAT_NAMED_EXTERN()

DECLARE_GPU_DRAWCALL_STAT_NAMED_EXTERN ( ShadowDepths  ,
TEXT("Shadow Depths"  
)

◆ DrawStencilingCone()

void DrawStencilingCone ( const FMatrix ConeToWorld,
float  ConeAngle,
float  SphereRadius,
const FVector PreViewTranslation 
)
extern

Renders a cone with a spherical cap, used for rendering spot lights in deferred passes.

◆ ENUM_CLASS_FLAGS()

ENUM_CLASS_FLAGS ( EShadowDepthType  )

◆ GetOnePassPointShadowProjectionParameters()

void GetOnePassPointShadowProjectionParameters ( FRDGBuilder GraphBuilder,
const FProjectedShadowInfo ShadowInfo,
FOnePassPointShadowProjection OutParameters 
)
extern

◆ GetShadowMeshPassType()

EMeshPass::Type GetShadowMeshPassType ( EShadowDepthType  ShadowDepthType)
extern

◆ IsShadowCacheModeOcclusionQueryable()

bool IsShadowCacheModeOcclusionQueryable ( EShadowDepthCacheMode  CacheMode)
inline

◆ OverrideWithDefaultMaterialForShadowDepth()

void OverrideWithDefaultMaterialForShadowDepth ( const FMaterialRenderProxy *&  InOutMaterialRenderProxy,
const FMaterial *&  InOutMaterialResource,
ERHIFeatureLevel::Type  InFeatureLevel 
)

Overrides a material used for shadow depth rendering with the default material when appropriate. Overriding in this manner can reduce state switches and the number of shaders that have to be compiled. This logic needs to stay in sync with shadow depth shader ShouldCache logic.

◆ SetupTranslucentSelfShadowUniformParameters()

void SetupTranslucentSelfShadowUniformParameters ( const FProjectedShadowInfo ShadowInfo,
FTranslucentSelfShadowUniformParameters OutParameters 
)
extern

Translucency shadow projection uniform buffer containing data needed for Fourier opacity maps.

◆ UseCachedMeshDrawCommands()

bool UseCachedMeshDrawCommands ( EShadowDepthType  ShadowDepthType)
extern

Variable Documentation

◆ GEmptyTranslucentSelfShadowUniformBuffer

TGlobalResource< FEmptyTranslucentSelfShadowUniformBuffer > GEmptyTranslucentSelfShadowUniformBuffer
extern

Global uniform buffer containing the default precomputed lighting data.