UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GPUSceneWriter.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "ShaderParameters.h"
8#include "MeshBatch.h"
9#include "RenderGraphFwd.h"
10#include "SceneManagement.h"
11
12class FSceneView;
13class FRDGBuilder;
15
17
18
22#if ENABLE_SCENE_DATA_DX11_UB_ERROR_WORKAROUND
23
24// Parameter sub struct that is common to all parameter use-cases
34
35#endif
36
48
50#if ENABLE_SCENE_DATA_DX11_UB_ERROR_WORKAROUND
52#else
53 // This is retained purely for backwards API compatibility
55#endif
56
58
59
61{
63 uint32 PersistentPrimitiveId = (uint32)INDEX_NONE;
65 uint32 InstanceSceneDataOffset = (uint32)INDEX_NONE;
67 uint32 NumCustomDataFloats = (uint32)INDEX_NONE;
69 uint32 PackedInstanceSceneDataFlags = 0u;
73 FSceneView* View = nullptr;
75 UE_DEPRECATED(5.6, "Only the opaque UB (see GPUSceneWriterUB below) should be referenced")
82};
83
85
91{
92public:
97
101 template <typename LambdaType>
103 {
104 return CreateInternal(MeshElementCollector, FGPUSceneWriteDelegateImpl::CreateLambda(MoveTemp(Lambda)));
105 }
106
109 template <typename LambdaType>
111 {
112 return FGPUSceneWriteDelegate(FGPUSceneWriteDelegateImpl::CreateLambda(MoveTemp(Lambda)));
113 }
114
117 RENDERER_API void Execute(FRDGBuilder& GraphBuilder, const FGPUSceneWriteDelegateParams& Params) const;
118
121 bool IsBound() const { return Delegate.IsBound(); }
122
123private:
125
127};
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_DELEGATE_TwoParams(DelegateName, Param1Type, Param2Type)
Definition DelegateCombinations.h:57
EGPUSceneGPUWritePass
Definition MeshBatch.h:61
#define SHADER_PARAMETER_RDG_BUFFER_UAV(ShaderType, MemberName)
Definition ShaderParameterMacros.h:1812
#define BEGIN_SHADER_PARAMETER_STRUCT(StructTypeName, DllStorage)
Definition ShaderParameterMacros.h:1482
#define SHADER_PARAMETER_STRUCT_INCLUDE(StructType, MemberName)
Definition ShaderParameterMacros.h:1895
#define SHADER_PARAMETER_RDG_UNIFORM_BUFFER(StructType, MemberName)
Definition ShaderParameterMacros.h:1823
#define END_SHADER_PARAMETER_STRUCT()
Definition ShaderParameterMacros.h:1485
#define SHADER_PARAMETER(MemberType, MemberName)
Definition ShaderParameterMacros.h:1684
#define DECLARE_UNIFORM_BUFFER_STRUCT(StructTypeName, PrefixKeywords)
Definition ShaderParameterStructDeclaration.h:10
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition MeshBatch.h:44
Definition GPUSceneWriter.h:91
FGPUSceneWriteDelegate()=default
static FGPUSceneWriteDelegate CreateLambda(LambdaType &&Lambda)
Definition GPUSceneWriter.h:110
static FGPUSceneWriteDelegateRef CreateLambda(FMeshElementCollector *MeshElementCollector, LambdaType &&Lambda)
Definition GPUSceneWriter.h:102
FGPUSceneWriteDelegate(FGPUSceneWriteDelegate &&)=default
bool IsBound() const
Definition GPUSceneWriter.h:121
FGPUSceneWriteDelegate & operator=(FGPUSceneWriteDelegate &&)=default
Definition MeshElementCollector.h:26
Definition SceneManagement.h:1452
Definition RenderGraphBuilder.h:49
Definition SceneView.h:1425
Definition RenderGraphResources.h:251
Definition GPUSceneWriter.h:61