UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MegaLights.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "SceneView.h"
6#include "CoreMinimal.h"
8
12class FRDGTexture;
14
16
18{
19 enum Type : int;
20};
21
23{
24 enum class EMaterialSource;
25}
26
34
36{
40};
41
42// Public MegaLights interface
43namespace MegaLights
44{
45 bool IsEnabled(const FSceneViewFamily& ViewFamily);
46
47 bool IsUsingClosestHZB(const FSceneViewFamily& ViewFamily);
48 bool IsUsingGlobalSDF(const FSceneViewFamily& ViewFamily);
49 bool IsUsingLightFunctions(const FSceneViewFamily& ViewFamily);
51
52 bool IsSoftwareRayTracingSupported(const FSceneViewFamily& ViewFamily);
53 bool IsHardwareRayTracingSupported(const FSceneViewFamily& ViewFamily);
54
56 bool UseHardwareRayTracing(const FSceneViewFamily& ViewFamily);
57 bool UseInlineHardwareRayTracing(const FSceneViewFamily& ViewFamily);
58 bool ShouldCompileShaders(EShaderPlatform ShaderPlatform);
60
61 bool UseFarField(const FSceneViewFamily& ViewFamily);
62
63 bool UseVolume();
64
68
69 bool IsMarkingVSMPages();
70
72
73 bool HasWarning(const FSceneViewFamily& ViewFamily);
74 void WriteWarnings(const FSceneViewFamily& ViewFamily, FScreenMessageWriter& Writer);
75
79
81
82 FIntPoint GetDownsampleFactorXY(StochasticLighting::EMaterialSource MaterialSource, EShaderPlatform ShaderPlatform);
83};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EMegaLightsMode
Definition MegaLights.h:36
EShaderPlatform
Definition RHIShaderPlatform.h:11
@ TVC_MAX
Definition SceneView.h:839
#define BEGIN_SHADER_PARAMETER_STRUCT(StructTypeName, DllStorage)
Definition ShaderParameterMacros.h:1482
#define END_SHADER_PARAMETER_STRUCT()
Definition ShaderParameterMacros.h:1485
#define SHADER_PARAMETER(MemberType, MemberName)
Definition ShaderParameterMacros.h:1684
uint8_t uint8
Definition binka_ue_file_header.h:8
uint16_t uint16
Definition binka_ue_file_header.h:7
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition MegaLights.h:28
FRDGTextureRef TranslucencyDirectional[TVC_MAX]
Definition MegaLights.h:32
FRDGTextureRef Texture
Definition MegaLights.h:30
FRDGTextureRef TranslucencyAmbient[TVC_MAX]
Definition MegaLights.h:31
Definition RenderGraphResources.h:571
Definition SceneView.h:2212
Definition SceneRendering.h:1132
Definition EnumAsByte.h:22
Definition EngineTypes.h:501
Type
Definition EngineTypes.h:503
Definition MegaLights.cpp:462
bool IsSoftwareRayTracingSupported(const FSceneViewFamily &ViewFamily)
Definition MegaLightsRayTracing.cpp:227
bool ShouldCompileShadersForReferenceMode(EShaderPlatform InPlatform)
Definition MegaLights.cpp:591
bool HasWarning(const FSceneViewFamily &ViewFamily)
Definition MegaLights.cpp:2001
bool IsUsingLightingChannels()
Definition MegaLights.cpp:551
bool UseInlineHardwareRayTracing(const FSceneViewFamily &ViewFamily)
Definition MegaLightsRayTracing.cpp:255
uint32 GetSampleMargin()
Definition MegaLights.cpp:515
bool UseHardwareRayTracing(const FSceneViewFamily &ViewFamily)
Definition MegaLightsRayTracing.cpp:250
bool ShouldCompileShaders(EShaderPlatform ShaderPlatform)
Definition MegaLights.cpp:467
EMegaLightsMode GetMegaLightsMode(const FSceneViewFamily &ViewFamily, uint8 LightType, bool bLightAllowsMegaLights, TEnumAsByte< EMegaLightsShadowMethod::Type > ShadowMethod)
Definition MegaLights.cpp:556
bool IsUsingClosestHZB(const FSceneViewFamily &ViewFamily)
Definition MegaLightsRayTracing.cpp:297
bool IsHardwareRayTracingSupported(const FSceneViewFamily &ViewFamily)
Definition MegaLightsRayTracing.cpp:232
bool IsEnabled(const FSceneViewFamily &ViewFamily)
Definition MegaLights.cpp:494
bool IsMarkingVSMPages()
Definition MegaLights.cpp:541
void SetupTileClassifyParameters(const FViewInfo &View, MegaLights::FTileClassifyParameters &OutParameters)
Definition MegaLights.cpp:864
bool IsUsingGlobalSDF(const FSceneViewFamily &ViewFamily)
Definition MegaLightsRayTracing.cpp:303
bool IsTranslucencyVolumeSpatialFilterEnabled()
Definition MegaLights.cpp:531
bool UseVolume()
Definition MegaLights.cpp:521
bool UseFarField(const FSceneViewFamily &ViewFamily)
Definition MegaLightsRayTracing.cpp:271
bool IsUsingLightFunctions(const FSceneViewFamily &ViewFamily)
Definition MegaLights.cpp:546
FIntPoint GetDownsampleFactorXY(EMegaLightsInput InputType, EShaderPlatform ShaderPlatform)
Definition MegaLights.cpp:627
bool IsTranslucencyVolumeTemporalFilterEnabled()
Definition MegaLights.cpp:536
void WriteWarnings(const FSceneViewFamily &ViewFamily, FScreenMessageWriter &Writer)
Definition MegaLights.cpp:2006
bool UseTranslucencyVolume()
Definition MegaLights.cpp:526
Definition MegaLights.h:23
EMaterialSource
Definition StochasticLighting.h:17
Definition GlobalShader.h:73
Definition CanvasTypes.h:854
Definition IntPoint.h:25