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

Classes

struct  MegaLights::FTraceStats
 
class  FCompactLightSampleTracesCS
 
class  FVolumeCompactLightSampleTracesCS
 
class  FInitCompactedTraceTexelIndirectArgsCS
 
class  FPrintTraceStatsCS
 
class  FSoftwareRayTraceLightSamplesCS
 
class  FVolumeSoftwareRayTraceLightSamplesCS
 
class  FScreenSpaceRayTraceLightSamplesCS
 
class  FVirtualShadowMapTraceLightSamplesCS
 
class  FVirtualShadowMapMarkLightSamplesCS
 

Namespaces

namespace  MegaLights
 

Enumerations

enum class  MegaLights::ECompactedTraceIndirectArgs { MegaLights::NumTracesDiv64 = 0 * sizeof(FRHIDispatchIndirectParameters) , MegaLights::NumTracesDiv32 = 1 * sizeof(FRHIDispatchIndirectParameters) , MegaLights::NumTraces = 2 * sizeof(FRHIDispatchIndirectParameters) , MegaLights::MAX = 3 }
 
enum class  MegaLights::EMaterialMode : uint8 { MegaLights::Disabled , MegaLights::AHS , MegaLights::RetraceAHS , MegaLights::MAX }
 

Functions

bool MegaLights::IsSoftwareRayTracingSupported (const FSceneViewFamily &ViewFamily)
 
bool MegaLights::IsHardwareRayTracingSupported (const FSceneViewFamily &ViewFamily)
 
bool MegaLights::UseHardwareRayTracing (const FSceneViewFamily &ViewFamily)
 
bool MegaLights::UseInlineHardwareRayTracing (const FSceneViewFamily &ViewFamily)
 
bool MegaLights::UseFarField (const FSceneViewFamily &ViewFamily)
 
bool MegaLights::UseScreenTraces (EMegaLightsInput InputType)
 
bool MegaLights::UseHairScreenTraces (EMegaLightsInput InputType)
 
bool MegaLights::IsUsingClosestHZB (const FSceneViewFamily &ViewFamily)
 
bool MegaLights::IsUsingGlobalSDF (const FSceneViewFamily &ViewFamily)
 
bool MegaLights::ShouldForceTwoSided ()
 
bool MegaLights::UseDistantScreenTraces (const FViewInfo &View, bool bUseFarField)
 
FCompactedTraceParameters MegaLights::CompactMegaLightsTraces (const FViewInfo &View, FRDGBuilder &GraphBuilder, const FIntPoint SampleBufferSize, FRDGTextureRef LightSamples, const FMegaLightsParameters &MegaLightsParameters, EMegaLightsInput InputType, bool bCompactForScreenSpaceTraces)
 
FCompactedTraceParameters MegaLights::CompactMegaLightsVolumeTraces (const FViewInfo &View, FRDGBuilder &GraphBuilder, const FIntVector VolumeSampleBufferSize, FRDGTextureRef VolumeLightSampleRays, const FMegaLightsParameters &MegaLightsParameters, const FMegaLightsVolumeParameters &MegaLightsVolumeParameters)
 
EMaterialMode MegaLights::GetMaterialMode ()
 
 IMPLEMENT_GLOBAL_SHADER (FCompactLightSampleTracesCS, "/Engine/Private/MegaLights/MegaLightsRayTracing.usf", "CompactLightSampleTracesCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FVolumeCompactLightSampleTracesCS, "/Engine/Private/MegaLights/MegaLightsVolumeRayTracing.usf", "VolumeCompactLightSampleTracesCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FInitCompactedTraceTexelIndirectArgsCS, "/Engine/Private/MegaLights/MegaLightsRayTracing.usf", "InitCompactedTraceTexelIndirectArgsCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FPrintTraceStatsCS, "/Engine/Private/MegaLights/MegaLightsRayTracing.usf", "PrintTraceStatsCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FSoftwareRayTraceLightSamplesCS, "/Engine/Private/MegaLights/MegaLightsRayTracing.usf", "SoftwareRayTraceLightSamplesCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FVolumeSoftwareRayTraceLightSamplesCS, "/Engine/Private/MegaLights/MegaLightsVolumeRayTracing.usf", "VolumeSoftwareRayTraceLightSamplesCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FScreenSpaceRayTraceLightSamplesCS, "/Engine/Private/MegaLights/MegaLightsRayTracing.usf", "ScreenSpaceRayTraceLightSamplesCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FVirtualShadowMapTraceLightSamplesCS, "/Engine/Private/MegaLights/MegaLightsVSMTracing.usf", "VirtualShadowMapTraceLightSamplesCS", SF_Compute)
 
 IMPLEMENT_GLOBAL_SHADER (FVirtualShadowMapMarkLightSamplesCS, "/Engine/Private/MegaLights/MegaLightsVSMMarking.usf", "VirtualShadowMapMarkLightSamplesCS", SF_Compute)
 

Function Documentation

◆ IMPLEMENT_GLOBAL_SHADER() [1/9]

IMPLEMENT_GLOBAL_SHADER ( FCompactLightSampleTracesCS  ,
"/Engine/Private/MegaLights/MegaLightsRayTracing.usf"  ,
"CompactLightSampleTracesCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [2/9]

IMPLEMENT_GLOBAL_SHADER ( FInitCompactedTraceTexelIndirectArgsCS  ,
"/Engine/Private/MegaLights/MegaLightsRayTracing.usf"  ,
"InitCompactedTraceTexelIndirectArgsCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [3/9]

IMPLEMENT_GLOBAL_SHADER ( FPrintTraceStatsCS  ,
"/Engine/Private/MegaLights/MegaLightsRayTracing.usf"  ,
"PrintTraceStatsCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [4/9]

IMPLEMENT_GLOBAL_SHADER ( FScreenSpaceRayTraceLightSamplesCS  ,
"/Engine/Private/MegaLights/MegaLightsRayTracing.usf"  ,
"ScreenSpaceRayTraceLightSamplesCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [5/9]

IMPLEMENT_GLOBAL_SHADER ( FSoftwareRayTraceLightSamplesCS  ,
"/Engine/Private/MegaLights/MegaLightsRayTracing.usf"  ,
"SoftwareRayTraceLightSamplesCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [6/9]

IMPLEMENT_GLOBAL_SHADER ( FVirtualShadowMapMarkLightSamplesCS  ,
"/Engine/Private/MegaLights/MegaLightsVSMMarking.usf"  ,
"VirtualShadowMapMarkLightSamplesCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [7/9]

IMPLEMENT_GLOBAL_SHADER ( FVirtualShadowMapTraceLightSamplesCS  ,
"/Engine/Private/MegaLights/MegaLightsVSMTracing.usf"  ,
"VirtualShadowMapTraceLightSamplesCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [8/9]

IMPLEMENT_GLOBAL_SHADER ( FVolumeCompactLightSampleTracesCS  ,
"/Engine/Private/MegaLights/MegaLightsVolumeRayTracing.usf"  ,
"VolumeCompactLightSampleTracesCS"  ,
SF_Compute   
)

◆ IMPLEMENT_GLOBAL_SHADER() [9/9]

IMPLEMENT_GLOBAL_SHADER ( FVolumeSoftwareRayTraceLightSamplesCS  ,
"/Engine/Private/MegaLights/MegaLightsVolumeRayTracing.usf"  ,
"VolumeSoftwareRayTraceLightSamplesCS"  ,
SF_Compute   
)