UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
RayTracing.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "RendererInterface.h"
7#include "RayTracingDefinitions.h"
9#include "RHIDefinitions.h"
10#include "ShaderCore.h"
11
12enum class EDiffuseIndirectMethod;
13enum class EReflectionsMethod;
17class FScene;
18class FViewInfo;
19class FViewFamilyInfo;
22
23// Settings controlling ray tracing instance caching
24namespace RayTracing
25{
27 {
29 bool bIncludeSky = true;
31
33 const FScene& Scene,
34 const FViewFamilyInfo& ViewFamily,
35 const FViewInfo& View,
36 EDiffuseIndirectMethod DiffuseIndirectMethod,
37 EReflectionsMethod ReflectionsMethod);
38 };
39};
40
41#if RHI_RAYTRACING
42
43namespace RayTracing
44{
46
47 void OnRenderBegin(const FSceneRenderUpdateInputs& SceneUpdateInputs);
48
52 uint32 NumViews);
53
54 void AddView(
56 FViewInfo& View,
57 EDiffuseIndirectMethod DiffuseIndirectMethod,
58 EReflectionsMethod ReflectionsMethod);
59
61
63
64 // Fills RayTracingScene instance list for the given View and adds relevant ray tracing data to the view. Does not reset previous scene contents.
65 // This function must run on render thread
67 FRDGBuilder& GraphBuilder,
69 FRayTracingScene& RayTracingScene,
73
75
76 // Wait for shader bindings related tasks to complete and combine bindings from all views
77 // This function must run on render thread
79
80 // Must be called after FinishGatherVisibleShaderBindings(...) completes
82
84}
85
86#endif // RHI_RAYTRACING
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EReflectionsMethod
Definition DeferredShadingRenderer.h:307
EDiffuseIndirectMethod
Definition DeferredShadingRenderer.h:291
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition DynamicBufferAllocator.h:56
Definition RenderGraphBuilder.h:49
Definition RayTracingMeshDrawCommands.h:165
Definition ScenePrivate.h:2875
Definition SceneRendering.h:1970
Definition SceneRendering.h:1132
Definition SceneManagement.h:73
Definition SceneRendering.h:2692
Definition RayTracing.h:27
bool bTranslucentGeometry
Definition RayTracing.h:28
bool bIncludeSky
Definition RayTracing.h:29
bool bLightingChannelsUsingAHS
Definition RayTracing.h:30
FSceneOptions(const FScene &Scene, const FViewFamilyInfo &ViewFamily, const FViewInfo &View, EDiffuseIndirectMethod DiffuseIndirectMethod, EReflectionsMethod ReflectionsMethod)