UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SceneManagement.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*=============================================================================
4 SceneManagement.h: Scene manager definitions.
5=============================================================================*/
6
7#pragma once
8
9// Includes the draw mesh macros
10
11#include "CoreMinimal.h"
13#include "Stats/Stats.h"
14#include "Misc/Guid.h"
15#include "Misc/MemStack.h"
16#include "Misc/IQueuedWork.h"
17#include "RHI.h"
18#include "RenderResource.h"
19#include "EngineDefines.h"
20#include "HitProxies.h"
21#include "SceneTypes.h"
22#include "ConvexVolume.h"
25#include "RendererInterface.h"
26#include "BatchedElements.h"
27#include "MeshBatch.h"
29#include "SceneUtils.h"
32#include "Math/SHMath.h"
34
35#if RHI_RAYTRACING
36#include "RayTracingInstance.h"
37#endif // RHI_RAYTRACING
38
39class FCanvas;
43class FLightMap;
45class FLightSceneInfo;
48class FScene;
49class FSceneViewState;
50class FShadowMap;
53class FTexture;
54class UDecalComponent;
59class UTexture2D;
60class UTexture;
65struct FViewMatrices;
66struct FEngineShowFlags;
67class FViewport;
71
72namespace RayTracing
73{
75 using GeometryGroupHandle UE_DEPRECATED(5.6, "Use FGeometryGroupHandle instead.") = FGeometryGroupHandle;
76}
77
78namespace UE { namespace Color { class FColorSpace; } }
79
85
86// -----------------------------------------------------------------------------
87
88
93{
100
102 : TemporalLODLag(0.0f) // nothing else is used if this is zero
103 {
104
105 }
109 float GetTemporalLODTransition(float LastRenderTime) const
110 {
111 if (TemporalLODLag == 0.0)
112 {
113 return 0.0f; // no fade
114 }
115 return FMath::Clamp((LastRenderTime - TemporalLODLag - TemporalLODTime[0]) / (TemporalLODTime[1] - TemporalLODTime[0]), 0.0f, 1.0f);
116 }
117
118 ENGINE_API void UpdateTemporalLODTransition(const FSceneView& View, float LastRenderTime);
119};
120
127
132{
133public:
137
139 virtual void Destroy() = 0;
140
141public:
144
145 virtual void AddReferencedObjects(FReferenceCollector& Collector) = 0;
146
147 virtual SIZE_T GetSizeBytes() const { return 0; }
148
151
158
163
164#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
166 virtual const FViewMatrices* GetFrozenViewMatrices() const = 0;
167
169 virtual void ActivateFrozenViewMatrices(FSceneView& SceneView) = 0;
170
172 virtual void RestoreUnfrozenViewMatrices(FSceneView& SceneView) = 0;
173#endif
174 // rest some state (e.g. FrameIndexMod8, TemporalAASampleIndex) to make the rendering [more] deterministic
175 virtual void ResetViewState() = 0;
176
179 virtual const FTemporalLODState& GetTemporalLODState() const = 0;
180
184 virtual float GetTemporalLODTransition() const = 0;
185
189 virtual uint32 GetViewKey() const = 0;
190
191 /* Return the active volumetric cloud texture, can be null. */
195
196 //
198
203
206
209
211 virtual float GetLastEyeAdaptationExposure() const = 0;
212
214 virtual float GetLastAverageSceneLuminance() const = 0;
215
217
219
221
223 virtual float GetPreExposure() const = 0;
224
228 virtual uint32 GetOcclusionFrameCounter() const = 0;
229
230#if RHI_RAYTRACING
234 virtual uint32 GetPathTracingSampleIndex() const = 0;
235
239 virtual uint32 GetPathTracingSampleCount() const = 0;
240
243#endif
244
246 virtual void AddLumenSceneData(FSceneInterface* InScene, float SurfaceCacheResolution = 1.0f) {}
248 virtual bool HasLumenSceneData() const = 0;
249
250 UE_DEPRECATED(5.3, "SetViewParent is deprecated")
252
253 UE_DEPRECATED(5.3, "GetViewParent is deprecated")
255
256 UE_DEPRECATED(5.3, "GetViewParent is deprecated")
257 const FSceneViewStateInterface* GetViewParent() const { return nullptr; }
258
259 UE_DEPRECATED(5.3, "HasViewParent is deprecated")
260 bool HasViewParent() const { return false; }
261
262 UE_DEPRECATED(5.3, "IsViewParent is deprecated")
263 bool IsViewParent() const { return false; }
264
271
274
275protected:
276 // Don't allow direct deletion of the view state, Destroy should be called instead.
278
280
281private:
282 friend class FScene;
283};
284
285class UE_DEPRECATED(5.7, "FFrozenSceneViewMatricesGuard is no longer used.") FFrozenSceneViewMatricesGuard
286{
287public:
290};
291
302 SHADER_PARAMETER(uint32, bIsSRGB)
304
312
314
315
328
355
356
357
358
359
361inline constexpr int32 NUM_STORED_LIGHTMAP_COEF = 4;
362
364inline constexpr int32 NUM_HQ_LIGHTMAP_COEF = 2;
365
367inline constexpr int32 NUM_LQ_LIGHTMAP_COEF = 2;
368
370inline constexpr int32 LQ_LIGHTMAP_COEF_INDEX = 2;
371
373// @todo-mobile: Need to fix this!
374#ifndef ALLOW_LQ_LIGHTMAPS
375#define ALLOW_LQ_LIGHTMAPS (PLATFORM_DESKTOP || PLATFORM_IOS || PLATFORM_ANDROID)
376#endif
377
379#define ALLOW_HQ_LIGHTMAPS 1
380
382#if !ALLOW_LQ_LIGHTMAPS && !ALLOW_HQ_LIGHTMAPS
383#error At least one of ALLOW_LQ_LIGHTMAPS and ALLOW_HQ_LIGHTMAPS needs to be defined!
384#endif
385
390{
391public:
392
393 // Factory functions.
395 {
397 Result.Type = LMIT_None;
398 return Result;
399 }
400
402 {
404 Result.Type = LMIT_GlobalVolume;
405 return Result;
406 }
407
409 const class ULightMapTexture2D* const* InTextures,
416 bool bAllowHighQualityLightMaps);
417
424 bool bAllowHighQualityLightMaps);
425
429 HighQualityTexture(NULL),
430 SkyOcclusionTexture(NULL),
431 AOMaterialMaskTexture(NULL),
432#endif
435#endif
438#endif
439 Type(LMIT_None)
440 {}
441
442 // Accessors.
443 ELightMapInteractionType GetType() const { return Type; }
444
445 const ULightMapTexture2D* GetTexture(bool bHighQuality) const
446 {
447 check(Type == LMIT_Texture);
448#if ALLOW_LQ_LIGHTMAPS && ALLOW_HQ_LIGHTMAPS
449 return bHighQuality ? HighQualityTexture : LowQualityTexture;
450#elif ALLOW_HQ_LIGHTMAPS
451 return HighQualityTexture;
452#else
453 return LowQualityTexture;
454#endif
455 }
456
458 {
459 check(Type == LMIT_Texture);
460#if ALLOW_HQ_LIGHTMAPS
461 return SkyOcclusionTexture;
462#else
463 return NULL;
464#endif
465 }
466
468 {
469 check(Type == LMIT_Texture);
470#if ALLOW_HQ_LIGHTMAPS
471 return AOMaterialMaskTexture;
472#else
473 return NULL;
474#endif
475 }
476
478 {
479 check(Type == LMIT_Texture);
480#if ALLOW_HQ_LIGHTMAPS || ALLOW_LQ_LIGHTMAPS
481 return VirtualTexture;
482#else
483 return NULL;
484#endif
485 }
486
488 {
489#if ALLOW_LQ_LIGHTMAPS && ALLOW_HQ_LIGHTMAPS
490 return AllowsHighQualityLightmaps() ? HighQualityCoefficientScales : LowQualityCoefficientScales;
491#elif ALLOW_HQ_LIGHTMAPS
492 return HighQualityCoefficientScales;
493#else
495#endif
496 }
497
498 const FVector4f* GetAddArray() const
499 {
500#if ALLOW_LQ_LIGHTMAPS && ALLOW_HQ_LIGHTMAPS
501 return AllowsHighQualityLightmaps() ? HighQualityCoefficientAdds : LowQualityCoefficientAdds;
502#elif ALLOW_HQ_LIGHTMAPS
503 return HighQualityCoefficientAdds;
504#else
506#endif
507 }
508
510 {
511 check(Type == LMIT_Texture);
512 return CoordinateScale;
513 }
515 {
516 check(Type == LMIT_Texture);
517 return CoordinateBias;
518 }
519
521 {
522#if ALLOW_LQ_LIGHTMAPS && ALLOW_HQ_LIGHTMAPS
523#if PLATFORM_DESKTOP && (!(UE_BUILD_SHIPPING || UE_BUILD_TEST) || WITH_EDITOR) // This is to allow for dynamic switching between simple and directional light maps in the PC editor
525 {
527 }
528#endif
530#elif ALLOW_HQ_LIGHTMAPS
532#else
534#endif
535 }
536
540 inline bool AllowsHighQualityLightmaps() const
541 {
542#if ALLOW_LQ_LIGHTMAPS && ALLOW_HQ_LIGHTMAPS
543 return bAllowHighQualityLightMaps;
544#elif ALLOW_HQ_LIGHTMAPS
545 return true;
546#else
547 return false;
548#endif
549 }
550
567 {
568 CoordinateScale = InCoordinateScale;
569 }
576 {
577 CoordinateBias = InCoordinateBias;
578 }
579
580private:
581
582#if ALLOW_HQ_LIGHTMAPS
583 FVector4f HighQualityCoefficientScales[NUM_HQ_LIGHTMAP_COEF];
584 FVector4f HighQualityCoefficientAdds[NUM_HQ_LIGHTMAP_COEF];
585 const class ULightMapTexture2D* HighQualityTexture;
586 const ULightMapTexture2D* SkyOcclusionTexture;
587 const ULightMapTexture2D* AOMaterialMaskTexture;
588#endif
589
590#if ALLOW_LQ_LIGHTMAPS
594#endif
595
596#if ALLOW_LQ_LIGHTMAPS && ALLOW_HQ_LIGHTMAPS
597 bool bAllowHighQualityLightMaps;
599#endif
600
601#if ALLOW_HQ_LIGHTMAPS || ALLOW_LQ_LIGHTMAPS
603#endif
604
606
607 FVector2D CoordinateScale;
608 FVector2D CoordinateBias;
609};
610
613{
614public:
615
616 // Factory functions.
618 {
620 Result.Type = SMIT_None;
621 return Result;
622 }
623
625 {
627 Result.Type = SMIT_GlobalVolume;
628 return Result;
629 }
630
635 const bool* InChannelValid,
637 {
639 Result.Type = SMIT_Texture;
640 Result.ShadowTexture = InTexture;
641 Result.CoordinateScale = InCoordinateScale;
642 Result.CoordinateBias = InCoordinateBias;
643 Result.InvUniformPenumbraSize = InInvUniformPenumbraSize;
644
645 for (int Channel = 0; Channel < 4; Channel++)
646 {
647 Result.bChannelValid[Channel] = InChannelValid[Channel];
648 }
649
650 return Result;
651 }
652
657 const bool* InChannelValid,
659 {
661 Result.Type = SMIT_Texture;
662 Result.VirtualTexture = InTexture;
663 Result.CoordinateScale = InCoordinateScale;
664 Result.CoordinateBias = InCoordinateBias;
665 Result.InvUniformPenumbraSize = InInvUniformPenumbraSize;
666 for (int Channel = 0; Channel < 4; Channel++)
667 {
668 Result.bChannelValid[Channel] = InChannelValid[Channel];
669 }
670
671 return Result;
672 }
673
676 ShadowTexture(nullptr),
677 VirtualTexture(nullptr),
678 InvUniformPenumbraSize(FVector4f(0, 0, 0, 0)),
679 Type(SMIT_None)
680 {
681 for (int Channel = 0; Channel < UE_ARRAY_COUNT(bChannelValid); Channel++)
682 {
683 bChannelValid[Channel] = false;
684 }
685 }
686
687 // Accessors.
688 EShadowMapInteractionType GetType() const { return Type; }
689
691 {
692 checkSlow(Type == SMIT_Texture);
693 return ShadowTexture;
694 }
695
697 {
698 checkSlow(Type == SMIT_Texture);
699 return VirtualTexture;
700 }
701
703 {
704 checkSlow(Type == SMIT_Texture);
705 return CoordinateScale;
706 }
707
709 {
710 checkSlow(Type == SMIT_Texture);
711 return CoordinateBias;
712 }
713
714 bool GetChannelValid(int32 ChannelIndex) const
715 {
716 checkSlow(Type == SMIT_Texture);
717 return bChannelValid[ChannelIndex];
718 }
719
721 {
722 return InvUniformPenumbraSize;
723 }
724
725private:
726 UShadowMapTexture2D* ShadowTexture;
728 FVector2D CoordinateScale;
729 FVector2D CoordinateBias;
730 bool bChannelValid[4];
731 FVector4f InvUniformPenumbraSize;
733};
734
735class FLightMap;
736class FShadowMap;
737
739 SHADER_PARAMETER_TEXTURE(Texture2D, LightMapTexture)
740 SHADER_PARAMETER_TEXTURE(Texture2D, SkyOcclusionTexture)
741 SHADER_PARAMETER_TEXTURE(Texture2D, AOMaterialMaskTexture)
756
758{
759public:
760
762 {
763 LightMapTextures[0] = nullptr;
764 LightMapTextures[1] = nullptr;
765 SkyOcclusionTexture = nullptr;
766 AOMaterialMaskTexture = nullptr;
767 LightMapVirtualTextures[0] = nullptr;
768 LightMapVirtualTextures[1] = nullptr;
769 ShadowMapTexture = nullptr;
770 }
771
772 const UTexture2D* LightMapTextures[2];
775 const ULightMapVirtualTexture2D* LightMapVirtualTextures[2];
777
779 {
780 // TODO - LightMapVirtualTexture needed here? What about Sky/AO textures? Or is it enough to just check LightMapTexture[n]?
781 return
782 PointerHash(Cluster.LightMapTextures[0],
783 PointerHash(Cluster.LightMapTextures[1],
784 PointerHash(Cluster.LightMapVirtualTextures[0],
785 PointerHash(Cluster.LightMapVirtualTextures[1],
786 PointerHash(Cluster.ShadowMapTexture)))));
787 }
788
790 {
791 return LightMapTextures[0] == Rhs.LightMapTextures[0]
792 && LightMapTextures[1] == Rhs.LightMapTextures[1]
793 && SkyOcclusionTexture == Rhs.SkyOcclusionTexture
794 && AOMaterialMaskTexture == Rhs.AOMaterialMaskTexture
795 && LightMapVirtualTextures[0] == Rhs.LightMapVirtualTextures[0]
796 && LightMapVirtualTextures[1] == Rhs.LightMapVirtualTextures[1]
797 && ShadowMapTexture == Rhs.ShadowMapTexture;
798 }
799};
800
802 ERHIFeatureLevel::Type FeatureLevel,
804 const IAllocatedVirtualTexture* AllocatedVT,
806
807class FDefaultLightmapResourceClusterUniformBuffer : public TUniformBuffer< FLightmapResourceClusterShaderParameters >
808{
810public:
811 virtual void InitRHI(FRHICommandListBase& RHICmdList) override;
812};
813
815
820{
821public:
823
824 // @param LightSceneProxy must not be 0
826
827 // helper function to implement GetInteraction(), call after checking for this: if(LightSceneProxy->HasStaticShadowing())
828 // @param LightSceneProxy same as in GetInteraction(), must not be 0
830
832
834
835 // @param InLightMap may be 0
837 {
838 LightMap = InLightMap;
839 }
840
846
847 // @return may be 0
848 const FLightMap* GetLightMap() const
849 {
850 return LightMap;
851 }
852
853 // @param InShadowMap may be 0
855 {
856 ShadowMap = InShadowMap;
857 }
858
859 // @return may be 0
861 {
862 return ShadowMap;
863 }
864
866 {
867 return ResourceCluster;
868 }
869
871 {
872 bGlobalVolumeLightmap = bInGlobalVolumeLightmap;
873 }
874
876 {
877 return PrecomputedLightingUniformBuffer;
878 }
879
884
886
888
889public:
890 // Load parameters from GPUScene when possible
891 // Basically this is the same as VF_SUPPORTS_PRIMITIVE_SCENE_DATA on the vertex factory, but we can't deduce automatically
892 // because we don't know about VF type until we see the actual mesh batch
894
895private:
896
897 bool bGlobalVolumeLightmap = false;
898
899 // The light-map used by the element. may be 0
900 const FLightMap* LightMap = nullptr;
901
902 // The shadowmap used by the element, may be 0
903 const FShadowMap* ShadowMap = nullptr;
904
905 const FLightmapResourceCluster* ResourceCluster = nullptr;
906
908 FUniformBufferRHIRef PrecomputedLightingUniformBuffer = nullptr;
909};
910
911
912template<typename TPendingTextureType>
914{
915private:
916 TPendingTextureType* PendingTexture;
917 FThreadSafeCounter& Counter;
918 const FStaticLightingBuildContext* LightingContext;
920
921public:
922
928
929 void Abandon()
930 {
931 PendingTexture->StartEncoding(LightingContext, Compressor);
932 Counter.Decrement();
933 }
934
936 {
937 PendingTexture->StartEncoding(LightingContext, Compressor);
938 Counter.Decrement();
939 }
940};
941
942
943
944// Information about a single shadow cascade.
946{
947public:
948 // The following 3 floats represent the view space depth of the split planes for this cascade.
949 // SplitNear <= FadePlane <= SplitFar
950
951 // The distance from the camera to the near split plane, in world units (linear).
953
954 // The distance from the camera to the far split plane, in world units (linear).
955 float SplitFar;
956
957 // in world units (linear).
959
960 // in world units (linear).
962
963 // ??
964 // The distance from the camera to the start of the fade region, in world units (linear).
965 // The area between the fade plane and the far split plane is blended to smooth between cascades.
967
968 // The length of the fade region (SplitFar - FadePlaneOffset), in world units (linear).
970
971 // The accurate bounds of the cascade used for primitive culling.
973
976
979
985
988
1001};
1002
1005{
1006public:
1007
1010
1014
1019
1023
1025 {
1026 return PreShadowTranslation == CachedShadow.PreShadowTranslation
1027 && WorldToLight == CachedShadow.WorldToLight
1028 && Scales == CachedShadow.Scales
1029 && SubjectBounds.Origin == CachedShadow.SubjectBounds.Origin
1030 && SubjectBounds.BoxExtent == CachedShadow.SubjectBounds.BoxExtent
1031 && SubjectBounds.SphereRadius == CachedShadow.SubjectBounds.SphereRadius
1032 && WAxis == CachedShadow.WAxis
1033 && MinLightW == CachedShadow.MinLightW
1034 && MaxDistanceToCastInLightW == CachedShadow.MaxDistanceToCastInLightW;
1035 }
1036};
1037
1040{
1041public:
1042
1043};
1044
1065
1067
1069
1071
1073
1075
1077
1081inline bool PrimitiveNeedsDistanceFieldSceneData(bool bTrackAllPrimitives,
1082 bool bCastsDynamicIndirectShadow,
1084 bool bIsDrawnInGame,
1085 bool bCastsHiddenShadow,
1088 bool bAffectIndirectLightingWhileHidden)
1089{
1090 return (bTrackAllPrimitives || bCastsDynamicIndirectShadow)
1092 && (bIsDrawnInGame || bCastsHiddenShadow || bAffectIndirectLightingWhileHidden)
1094}
1095
1097 SHADER_PARAMETER(FVector4f, Params) // x - inv average brightness, y - sky cubemap max mip, z - unused, w - brightness of reflection capture
1100 SHADER_PARAMETER_TEXTURE(TextureCube, TextureBlend) // Only used when this refelction is a sky light
1103
1110
1112
1115 // Position of the light in the translated world space.
1117
1118 // 1 / light's falloff radius from Position.
1119 SHADER_PARAMETER(float, InvRadius)
1120
1121 // Color of the light.
1123
1124 // The exponent for the falloff of the light intensity from the distance.
1125 SHADER_PARAMETER(float, FalloffExponent)
1126
1127 // Direction of the light if applies.
1128 SHADER_PARAMETER(FVector3f, Direction)
1129
1130 // Factor to applies on the specular.
1131 SHADER_PARAMETER(float, SpecularScale)
1132
1133 // Factor to applies on the diffuse.
1134 SHADER_PARAMETER(float, DiffuseScale)
1135
1136 // One tangent of the light if applies.
1137 // Note: BiTangent is on purpose not stored for memory optimisation purposes.
1139
1140 // Radius of the point light.
1141 SHADER_PARAMETER(float, SourceRadius)
1142
1143 // Dimensions of the light, for spot light, but also
1144 SHADER_PARAMETER(FVector2f, SpotAngles)
1145
1146 // Radius of the soft source.
1147 SHADER_PARAMETER(float, SoftSourceRadius)
1148
1149 // Other dimensions of the light source for rect light specifically.
1150 SHADER_PARAMETER(float, SourceLength)
1151
1152 // Barn door angle for rect light
1153 SHADER_PARAMETER(float, RectLightBarnCosAngle)
1154
1155 // Barn door length for rect light
1156 SHADER_PARAMETER(float, RectLightBarnLength)
1157
1158 // Rect. light atlas transformation
1159 SHADER_PARAMETER(FVector2f, RectLightAtlasUVOffset)
1160 SHADER_PARAMETER(FVector2f, RectLightAtlasUVScale)
1161 SHADER_PARAMETER(float, RectLightAtlasMaxLevel)
1162
1163 // IES texture slice index
1164 SHADER_PARAMETER(float, IESAtlasIndex)
1165
1166 // Index of the light function in the atlas
1167 SHADER_PARAMETER(uint32, LightFunctionAtlasLightIndex)
1168
1169 // Wether the light affect translucent material or not
1170 SHADER_PARAMETER(uint32, bAffectsTranslucentLighting)
1171
1173
1174
1175// Movable local light shadow parameters for mobile deferred
1177 SHADER_PARAMETER(FVector4f, SpotLightShadowSharpenAndFadeFractionAndReceiverDepthBiasAndSoftTransitionScale) // x ShadowSharpen, y ShadowFadFraction, z ReceiverDepthBias, w SoftTransitionScale
1185
1192{
1193 ENGINE_API void MakeShaderParameters(const FViewMatrices& ViewMatrices, float Exposure, FLightShaderParameters& OutShaderParameters) const;
1194 ENGINE_API float GetLightExposureScale(float Exposure) const;
1195 static ENGINE_API float GetLightExposureScale(float Exposure, float InverseExposureBlend);
1196
1197 // Position of the light in world space.
1199
1200 // 1 / light's falloff radius from Position.
1202
1203 // Color of the light.
1205
1206 // The exponent for the falloff of the light intensity from the distance.
1208
1209 // Direction of the light if applies.
1211
1212 // Factor to applies on the specular.
1214
1215 // Factor to applies on the diffuse.
1217
1218 // One tangent of the light if applies.
1219 // Note: BiTangent is on purpose not stored for memory optimisation purposes.
1221
1222 // Radius of the point light.
1224
1225 // Dimensions of the light, for spot light, but also
1227
1228 // Radius of the soft source.
1230
1231 // Other dimensions of the light source for rect light specifically.
1233
1234 // Barn door angle for rect light
1236
1237 // Barn door length for rect light
1239
1240 // Rect. light atlas transformation
1244
1245 // IES atlas slice index
1247
1248 // Index of the light in the Light function atlas data
1250
1251 // Wether this lights affect translucent materials or not
1253
1255
1256 // Return Invalid rect light atlas MIP level
1257 static float GetRectLightAtlasInvalidMIPLevel() { return 32.f; }
1258};
1259
1260
1262
1267{
1268public:
1269 UE_DEPRECATED(5.3, "InitPrimitiveResource now requires a command list.")
1271
1272 virtual void InitPrimitiveResource(FRHICommandListBase& RHICmdList) = 0;
1273 virtual void ReleasePrimitiveResource() = 0;
1274};
1275
1280{
1281public:
1282
1286 virtual void Draw(const FSceneView* View,FPrimitiveDrawInterface* PDI) {}
1287};
1288
1293{
1294public:
1296
1297 virtual void SetHitProxy(HHitProxy* HitProxy) = 0;
1298
1303
1304 virtual void DrawMesh(
1305 const FMeshBatch& Mesh,
1306 float ScreenSize
1307 ) = 0;
1308};
1309
1310
1313{
1314public:
1315
1318
1319 ENGINE_API virtual void SetHitProxy(HHitProxy* HitProxy) override;
1320 virtual void AddReserveLines(uint8 DepthPriorityGroup, int32 NumLines, bool bDepthBiased = false, bool bThickLines = false) override {}
1321
1322 ENGINE_API virtual void DrawSprite(
1323 const FVector& Position,
1324 float SizeX,
1325 float SizeY,
1326 const FTexture* Sprite,
1327 const FLinearColor& Color,
1328 uint8 DepthPriorityGroup,
1329 float U,
1330 float UL,
1331 float V,
1332 float VL,
1333 uint8 BlendMode = SE_BLEND_Masked,
1334 float OpacityMaskRevVal = .5f
1335 ) override;
1336
1337 ENGINE_API virtual void DrawLine(
1338 const FVector& Start,
1339 const FVector& End,
1340 const FLinearColor& Color,
1341 uint8 DepthPriorityGroup,
1342 float Thickness = 0.0f,
1343 float DepthBias = 0.0f,
1344 bool bScreenSpace = false
1345 ) override;
1346
1347 ENGINE_API virtual void DrawTranslucentLine(
1348 const FVector& Start,
1349 const FVector& End,
1350 const FLinearColor& Color,
1351 uint8 DepthPriorityGroup,
1352 float Thickness = 0.0f,
1353 float DepthBias = 0.0f,
1354 bool bScreenSpace = false
1355 ) override;
1356
1357 ENGINE_API virtual void DrawPoint(
1358 const FVector& Position,
1359 const FLinearColor& Color,
1360 float PointSize,
1361 uint8 DepthPriorityGroup
1362 ) override;
1363
1365
1366 // Not supported
1367 virtual bool IsHitTesting() override
1368 {
1369 static bool bTriggered = false;
1370
1371 if (!bTriggered)
1372 {
1373 bTriggered = true;
1374 ensureMsgf(false, TEXT("FSimpleElementCollector::DrawMesh called"));
1375 }
1376
1377 return false;
1378 }
1379
1380 // Not supported
1381 virtual int32 DrawMesh(const FMeshBatch& Mesh) override
1382 {
1383 static bool bTriggered = false;
1384
1385 if (!bTriggered)
1386 {
1387 bTriggered = true;
1388 ensureMsgf(false, TEXT("FSimpleElementCollector::DrawMesh called"));
1389 }
1390
1391 return 0;
1392 }
1393
1395
1397 {
1398 public:
1399 FAllocationInfo() = default;
1400
1401 private:
1402 FBatchedElements::FAllocationInfo BatchedElements;
1403 FBatchedElements::FAllocationInfo TopBatchedElements;
1404 uint32 NumDynamicResources = 0;
1405
1407 };
1408
1410 ENGINE_API void AddAllocationInfo(FAllocationInfo& AllocationInfo) const;
1411
1413 ENGINE_API void Reserve(const FAllocationInfo& AllocationInfo);
1414
1417
1422
1424 {
1425 if (DPG == SDPG_World)
1426 {
1428 }
1429
1431 }
1432
1436
1437private:
1438 FHitProxyId HitProxyId;
1439
1442
1444};
1445
1446
1452{
1453public:
1454
1456};
1457
1462{
1464
1467
1468private:
1473 uint32 bHasOpaqueMaterial : 1;
1474 uint32 bHasMaskedMaterial : 1;
1475 uint32 bRenderInMainPass : 1;
1476
1477public:
1479
1480 bool GetHasOpaqueMaterial() const { return bHasOpaqueMaterial; }
1481 bool GetHasMaskedMaterial() const { return bHasMaskedMaterial; }
1482 bool GetHasOpaqueOrMaskedMaterial() const { return bHasOpaqueMaterial || bHasMaskedMaterial; }
1483 bool GetRenderInMainPass() const { return bRenderInMainPass; }
1484};
1485
1486#if RHI_RAYTRACING
1487
1489{
1490 TArray<FMeshBatch> MeshBatches;
1491
1492 bool bUsingIndirectDraw = false;
1493 // When bUsingIndirectDraw == false, NumVertices == the actual number of vertices to process
1494 // When bUsingIndirectDraw == true, it is the maximum possible vertices that GPU can emit
1495 uint32 NumVertices = 0;
1497 uint32 NumTriangles = 0;
1498
1499 FRayTracingGeometry* Geometry = nullptr;
1500 FRWBuffer* Buffer = nullptr;
1501
1502 bool bApplyWorldPositionOffset = true;
1503
1504 uint32 InstanceId = 0;
1506
1507 bool bAlphaMasked = false;
1508 FBufferRHIRef IndexBuffer = nullptr;
1509};
1510
1511namespace RayTracing
1512{
1514}
1515
1521{
1522public:
1523 // No MeshBatch should be allocated from an FRayTracingInstanceCollector.
1524 inline FMeshBatch& AllocateMesh() = delete;
1526
1527 TConstArrayView<const FSceneView*> GetViews() const { return Views; }
1528 uint32 GetVisibilityMap() const { return VisibilityMap; }
1529
1530 UE_DEPRECATED(5.7, "Use Views array passed directly to GetDynamicRayTracingInstances.")
1531 const FSceneView* GetReferenceView() const { return Views[0]; }
1532
1533 UE_DEPRECATED(5.7, "Please specify ViewIndex.")
1535
1537
1538 ENGINE_API void AddReferencedGeometryGroup(RayTracing::FGeometryGroupHandle GeometryGroup);
1539
1540 ENGINE_API void AddReferencedGeometryGroupForDynamicUpdate(RayTracing::FGeometryGroupHandle GeometryGroup);
1541
1542 UE_DEPRECATED(5.7, "Please specify ViewIndex.")
1544
1546
1547 UE_DEPRECATED(5.7, "Please specify ViewIndex.")
1548 void AddRDGPooledBuffer(FRDGPooledBuffer* PooledBuffer)
1549 {
1550 AddRDGPooledBuffer(0, PooledBuffer);
1551 }
1552
1553 void AddRDGPooledBuffer(int32 ViewIndex, FRDGPooledBuffer* PooledBuffer)
1554 {
1555 RDGPooledBuffers[ViewIndex].Add(PooledBuffer);
1556 }
1557
1558private:
1559
1564
1566 const FSceneView* InView,
1567 FGPUScenePrimitiveCollector* DynamicPrimitiveCollector
1568 );
1569
1570 ENGINE_API void SetVisibilityMap(uint32 VisibilityMap);
1571
1573 {
1575 int32 ViewIndex;
1576 };
1577
1579 {
1581 int32 ViewIndex;
1582 };
1583
1590
1592
1593 uint32 VisibilityMap;
1594
1595 friend RayTracing::FDynamicRayTracingInstancesContext;
1596};
1597
1598#endif
1599
1601{
1602public:
1604 // FDynamicPrimitiveUniformBuffer is non-copyable
1607
1609
1611
1612 ENGINE_API void Set(
1613 FRHICommandListBase& RHICmdList,
1614 const FMatrix& LocalToWorld,
1615 const FMatrix& PreviousLocalToWorld,
1616 const FVector& ActorPositionWS,
1617 const FBoxSphereBounds& WorldBounds,
1618 const FBoxSphereBounds& LocalBounds,
1619 const FBoxSphereBounds& PreSkinnedLocalBounds,
1620 bool bReceivesDecals,
1622 bool bOutputVelocity,
1624
1625 ENGINE_API void Set(
1626 FRHICommandListBase& RHICmdList,
1627 const FMatrix& LocalToWorld,
1628 const FMatrix& PreviousLocalToWorld,
1629 const FBoxSphereBounds& WorldBounds,
1630 const FBoxSphereBounds& LocalBounds,
1631 const FBoxSphereBounds& PreSkinnedLocalBounds,
1632 bool bReceivesDecals,
1634 bool bOutputVelocity,
1636
1637 ENGINE_API void Set(
1638 FRHICommandListBase& RHICmdList,
1639 const FMatrix& LocalToWorld,
1640 const FMatrix& PreviousLocalToWorld,
1641 const FBoxSphereBounds& WorldBounds,
1642 const FBoxSphereBounds& LocalBounds,
1643 const FBoxSphereBounds& PreSkinnedLocalBounds,
1644 bool bReceivesDecals,
1646 bool bOutputVelocity);
1647
1649 ENGINE_API void Set(
1650 FRHICommandListBase& RHICmdList,
1651 const FMatrix& LocalToWorld,
1652 const FMatrix& PreviousLocalToWorld,
1653 const FBoxSphereBounds& WorldBounds,
1654 const FBoxSphereBounds& LocalBounds,
1655 bool bReceivesDecals,
1657 bool bOutputVelocity);
1658
1659 UE_DEPRECATED(5.4, "Set requires a command list")
1660 ENGINE_API void Set(
1661 const FMatrix& LocalToWorld,
1662 const FMatrix& PreviousLocalToWorld,
1663 const FVector& ActorPositionWS,
1664 const FBoxSphereBounds& WorldBounds,
1665 const FBoxSphereBounds& LocalBounds,
1666 const FBoxSphereBounds& PreSkinnedLocalBounds,
1667 bool bReceivesDecals,
1669 bool bOutputVelocity,
1671
1672 UE_DEPRECATED(5.4, "Set requires a command list")
1673 ENGINE_API void Set(
1674 const FMatrix& LocalToWorld,
1675 const FMatrix& PreviousLocalToWorld,
1676 const FBoxSphereBounds& WorldBounds,
1677 const FBoxSphereBounds& LocalBounds,
1678 const FBoxSphereBounds& PreSkinnedLocalBounds,
1679 bool bReceivesDecals,
1681 bool bOutputVelocity,
1683
1684 UE_DEPRECATED(5.4, "Set requires a command list")
1685 ENGINE_API void Set(
1686 const FMatrix& LocalToWorld,
1687 const FMatrix& PreviousLocalToWorld,
1688 const FBoxSphereBounds& WorldBounds,
1689 const FBoxSphereBounds& LocalBounds,
1690 const FBoxSphereBounds& PreSkinnedLocalBounds,
1691 bool bReceivesDecals,
1693 bool bOutputVelocity);
1694
1696 UE_DEPRECATED(5.4, "Set requires a command list")
1697 ENGINE_API void Set(
1698 const FMatrix& LocalToWorld,
1699 const FMatrix& PreviousLocalToWorld,
1700 const FBoxSphereBounds& WorldBounds,
1701 const FBoxSphereBounds& LocalBounds,
1702 bool bReceivesDecals,
1704 bool bOutputVelocity);
1705};
1706
1707extern ENGINE_API FVector CalcConeVert(float Angle1, float Angle2, float AzimuthAngle);
1708extern ENGINE_API void BuildConeVerts(float Angle1, float Angle2, float Scale, float XOffset, uint32 NumSides, TArray<FDynamicMeshVertex>& OutVerts, TArray<uint32>& OutIndices);
1709
1710extern ENGINE_API void BuildCylinderVerts(const FVector& Base, const FVector& XAxis, const FVector& YAxis, const FVector& ZAxis, double Radius, double HalfHeight, uint32 Sides, TArray<FDynamicMeshVertex>& OutVerts, TArray<uint32>& OutIndices);
1711
1713extern ENGINE_API void BuildTaperedCylinderVerts(const FVector& Base, const FVector& XAxis, const FVector& YAxis, const FVector& ZAxis, double BaseRadius, double TopRadius, double HalfHeight, uint32 Sides, TArray<FDynamicMeshVertex>& OutVerts, TArray<uint32>& OutIndices);
1714
1715
1725extern ENGINE_API FLinearColor GetViewSelectionColor(const FLinearColor& BaseColor, const FSceneView& View, bool bSelected, bool bHovered, bool bUseOverlayIntensity, bool bIndividuallySelected);
1726
1731extern ENGINE_API bool IsRichView(const FSceneViewFamily& ViewFamily);
1732
1734 int32 ViewIndex,
1735 const FEngineShowFlags& EngineShowFlags,
1736 ERHIFeatureLevel::Type FeatureLevel,
1737 const FPrimitiveSceneProxy* PrimitiveSceneProxy,
1738 bool bSelected,
1740 FMeshElementCollector& Collector
1741 );
1742
1745
1748
1758float ENGINE_API ComputeBoundsScreenSize(const FVector4& Origin, const float SphereRadius, const FSceneView& View);
1759
1770float ENGINE_API ComputeBoundsScreenSize(const FVector4& BoundsOrigin, const float SphereRadius, const FVector4& ViewOrigin, const FMatrix& ProjMatrix);
1771
1781float ENGINE_API ComputeBoundsScreenRadiusSquared(const FVector4& Origin, const float SphereRadius, const FSceneView& View);
1782
1792float ENGINE_API ComputeBoundsScreenRadiusSquared(const FVector4& BoundsOrigin, const float SphereRadius, const FVector4& ViewOrigin, const FMatrix& ProjMatrix);
1793
1801float ENGINE_API ComputeBoundsDrawDistance(const float ScreenSize, const float SphereRadius, const FMatrix& ProjMatrix);
1802
1811int8 ENGINE_API ComputeStaticMeshLOD(const FStaticMeshRenderData* RenderData, const FVector4& Origin, const float SphereRadius, const FSceneView& View, int32 MinLOD, float FactorScale = 1.0f);
1812
1822int8 ENGINE_API ComputeTemporalStaticMeshLOD( const FStaticMeshRenderData* RenderData, const FVector4& Origin, const float SphereRadius, const FSceneView& View, int32 MinLOD, float FactorScale, int32 SampleIndex );
1823
1831{
1832 // Assumes a max lod index of 127.
1833 // In fact MAX_STATIC_MESH_LODS is 8 so we could use 3 bits per LODIndex and fit in a uint8 here.
1838
1840 : LODIndex0(0)
1841 , LODIndex1(0)
1842 , bIsValid(0)
1843 , bIsRange(0)
1844 {
1845 }
1846
1847 bool IsValid() const
1848 {
1849 return bIsValid;
1850 }
1851 void SetLOD(uint32 LODIndex)
1852 {
1853 LODIndex0 = LODIndex1 = (uint8)LODIndex;
1854 bIsValid = 1;
1855 bIsRange = 0;
1856 }
1857 void SetLODSample(uint32 LODIndex, uint32 SampleIndex)
1858 {
1859 if (SampleIndex == 0)
1860 {
1861 LODIndex0 = (uint8)LODIndex;
1862 }
1863 else if (SampleIndex == 1)
1864 {
1865 LODIndex1 = (uint8)LODIndex;
1866 }
1867 bIsValid = 1;
1868 bIsRange = 0;
1869 }
1871 {
1872 LODIndex0 = (uint8)MinLODIndex;
1873 LODIndex1 = (uint8)MaxLODIndex;
1874 bIsValid = 1;
1875 bIsRange = 1;
1876 }
1878 {
1879 LODIndex0 = LODIndex0 > (uint8)FirstLODIdx ? LODIndex0 : (uint8)FirstLODIdx;
1880 LODIndex1 = LODIndex1 > (uint8)FirstLODIdx ? LODIndex1 : (uint8)FirstLODIdx;
1881 }
1882 bool IsDithered() const
1883 {
1884 return IsValid() && !bIsRange && LODIndex0 != LODIndex1;
1885 }
1886 bool IsLODRange() const
1887 {
1888 return IsValid() && bIsRange && LODIndex0 != LODIndex1;
1889 }
1890 bool ContainsLOD(int32 LODIndex) const
1891 {
1892 if (!IsValid())
1893 {
1894 return false;
1895 }
1896 if (bIsRange)
1897 {
1898 return (int32)LODIndex0 <= LODIndex && (int32)LODIndex1 >= LODIndex;
1899 }
1900 return (int32)LODIndex0 == LODIndex || (int32)LODIndex1 == LODIndex;
1901 }
1902 bool IsMinLODInRange(int32 LODIndex) const
1903 {
1904 return IsLODRange() && LODIndex == LODIndex0;
1905 }
1906 bool IsMaxLODInRange(int32 LODIndex) const
1907 {
1908 return IsLODRange() && LODIndex == LODIndex1;
1909 }
1910
1911 //#dxr_todo UE-72106: We should probably add both LoDs but mask them based on their
1912 //LodFade value within the BVH based on the LodFadeMask in the GBuffer
1914 {
1915 return LODIndex1;
1916 }
1917};
1918
1926FLODMask ENGINE_API ComputeLODForMeshes(const TArray<class FStaticMeshBatchRelevance>& StaticMeshRelevances, const FSceneView& View, const FVector4& Origin, float SphereRadius, int32 ForcedLODLevel, float& OutScreenRadiusSquared, int8 CurFirstLODIdx, float ScreenSizeScale = 1.0f, bool bDitheredLODTransition = true);
1927
1936FLODMask ENGINE_API ComputeLODForMeshes(const TArray<class FStaticMeshBatchRelevance>& StaticMeshRelevances, const FSceneView& View, const FVector4& Origin, float SphereRadius, float InstanceSphereRadius, int32 ForcedLODLevel, float& OutScreenRadiusSquared, int8 CurFirstLODIdx, float ScreenSizeScale = 1.0f);
1937
1939{
1940public:
1942 bool bWrap;
1943
1945 bWrap(bInWrap)
1946 {}
1947
1948 virtual void InitRHI(FRHICommandListBase& RHICmdList) override;
1949
1950 virtual void ReleaseRHI() override
1951 {
1952 SamplerStateRHI.SafeRelease();
1953 }
1954};
1955
1958
1961
1964
1965#if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_5
1966#include "MeshPaintVisualize.h"
1973#endif
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define NULL
Definition oodle2base.h:134
#define checkSlow(expr)
Definition AssertionMacros.h:332
#define check(expr)
Definition AssertionMacros.h:314
#define ensureMsgf( InExpression, InFormat,...)
Definition AssertionMacros.h:465
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
FPlatformTypes::int8 int8
An 8-bit signed integer.
Definition Platform.h:1121
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
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 WORLD_MAX
Definition EngineDefines.h:53
ESceneDepthPriorityGroup
Definition EngineTypes.h:187
@ SDPG_World
Definition EngineTypes.h:189
return true
Definition ExternalRpcRegistry.cpp:601
#define DECLARE_LOG_CATEGORY_EXTERN(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
Definition LogMacros.h:361
const bool
Definition NetworkReplayStreaming.h:178
EShaderPlatform
Definition RHIShaderPlatform.h:11
ESequencerState
Definition SceneManagement.h:122
@ ESS_Playing
Definition SceneManagement.h:125
@ ESS_None
Definition SceneManagement.h:123
@ ESS_Paused
Definition SceneManagement.h:124
ENGINE_API bool IsRichView(const FSceneViewFamily &ViewFamily)
Definition PrimitiveDrawingUtils.cpp:1576
ENGINE_API bool DoesPlatformSupportDistanceFieldShadowing(EShaderPlatform Platform)
Definition SceneManagement.cpp:44
ENGINE_API bool ShouldCompileDistanceFieldShaders(EShaderPlatform ShaderPlatform)
Definition SceneManagement.cpp:71
ENGINE_API FVector CalcConeVert(float Angle1, float Angle2, float AzimuthAngle)
Definition PrimitiveDrawingUtils.cpp:385
ENGINE_API bool DoesPlatformSupportDistanceFields(const FStaticShaderPlatform Platform)
Definition SceneManagement.cpp:39
float ENGINE_API ComputeBoundsDrawDistance(const float ScreenSize, const float SphereRadius, const FMatrix &ProjMatrix)
Definition SceneManagement.cpp:941
int8 ENGINE_API ComputeStaticMeshLOD(const FStaticMeshRenderData *RenderData, const FVector4 &Origin, const float SphereRadius, const FSceneView &View, int32 MinLOD, float FactorScale=1.0f)
Definition SceneManagement.cpp:989
ENGINE_API void GetLightmapClusterResourceParameters(ERHIFeatureLevel::Type FeatureLevel, const FLightmapClusterResourceInput &Input, const IAllocatedVirtualTexture *AllocatedVT, FLightmapResourceClusterShaderParameters &Parameters)
Definition SceneManagement.cpp:1400
ENGINE_API TGlobalResource< FDefaultLightmapResourceClusterUniformBuffer > GDefaultLightmapResourceClusterUniformBuffer
Definition SceneManagement.cpp:1514
ENGINE_API const FSceneView & GetLODView(const FSceneView &InView)
Definition SceneManagement.cpp:975
ENGINE_API FSharedSamplerState * Clamp_WorldGroupSettings
Definition SceneManagement.cpp:1337
ENGINE_API void BuildCylinderVerts(const FVector &Base, const FVector &XAxis, const FVector &YAxis, const FVector &ZAxis, double Radius, double HalfHeight, uint32 Sides, TArray< FDynamicMeshVertex > &OutVerts, TArray< uint32 > &OutIndices)
Definition PrimitiveDrawingUtils.cpp:576
float ENGINE_API ComputeBoundsScreenSize(const FVector4 &Origin, const float SphereRadius, const FSceneView &View)
Definition SceneManagement.cpp:917
ENGINE_API void BuildConeVerts(float Angle1, float Angle2, float Scale, float XOffset, uint32 NumSides, TArray< FDynamicMeshVertex > &OutVerts, TArray< uint32 > &OutIndices)
Definition PrimitiveDrawingUtils.cpp:423
#define ALLOW_HQ_LIGHTMAPS
Definition SceneManagement.h:379
ENGINE_API FLinearColor GetViewSelectionColor(const FLinearColor &BaseColor, const FSceneView &View, bool bSelected, bool bHovered, bool bUseOverlayIntensity, bool bIndividuallySelected)
Definition PrimitiveDrawingUtils.cpp:1559
ENGINE_API void DrawUVs(FViewport *InViewport, FCanvas *InCanvas, int32 InTextYPos, const int32 LODLevel, int32 UVChannel, TArray< FVector2D > SelectedEdgeTexCoords, class FStaticMeshRenderData *StaticMeshRenderData, class FSkeletalMeshLODRenderData *SkeletalMeshRenderData)
Definition PrimitiveDrawingUtils.cpp:1924
ENGINE_API TGlobalResource< FDefaultMobileReflectionCaptureUniformBuffer > GDefaultMobileReflectionCaptureUniformBuffer
Definition SceneManagement.cpp:1748
ENGINE_API bool DoesPlatformSupportDistanceFieldAO(EShaderPlatform Platform)
Definition SceneManagement.cpp:49
constexpr int32 NUM_LQ_LIGHTMAP_COEF
Definition SceneManagement.h:367
ENGINE_API FLinearColor GetSelectionColor(const FLinearColor &BaseColor, bool bSelected, bool bHovered, bool bUseOverlayIntensity=true)
Definition PrimitiveDrawingUtils.cpp:1547
float ENGINE_API ComputeBoundsScreenRadiusSquared(const FVector4 &Origin, const float SphereRadius, const FSceneView &View)
Definition SceneManagement.cpp:912
constexpr int32 LQ_LIGHTMAP_COEF_INDEX
Definition SceneManagement.h:370
ENGINE_API bool ShouldAllPrimitivesHaveDistanceField(EShaderPlatform ShaderPlatform)
Definition SceneManagement.cpp:64
ENGINE_API void ComputeShadowCullingVolume(bool bReverseCulling, const FVector *CascadeFrustumVerts, const FVector &LightDirection, FConvexVolume &ConvexVolumeOut, FPlane &NearPlaneOut, FPlane &FarPlaneOut)
Definition DirectionalLightComponent.cpp:101
ELightInteractionType
Definition SceneManagement.h:320
@ LIT_CachedSignedDistanceFieldShadowMap2D
Definition SceneManagement.h:324
@ LIT_Dynamic
Definition SceneManagement.h:323
@ LIT_MAX
Definition SceneManagement.h:326
@ LIT_CachedLightMap
Definition SceneManagement.h:322
@ LIT_CachedIrrelevant
Definition SceneManagement.h:321
bool PrimitiveNeedsDistanceFieldSceneData(bool bTrackAllPrimitives, bool bCastsDynamicIndirectShadow, bool bAffectsDistanceFieldLighting, bool bIsDrawnInGame, bool bCastsHiddenShadow, bool bCastsDynamicShadow, bool bAffectsDynamicIndirectLighting, bool bAffectIndirectLightingWhileHidden)
Definition SceneManagement.h:1081
constexpr int32 NUM_HQ_LIGHTMAP_COEF
Definition SceneManagement.h:364
#define ALLOW_LQ_LIGHTMAPS
Definition SceneManagement.h:375
FLODMask ENGINE_API ComputeLODForMeshes(const TArray< class FStaticMeshBatchRelevance > &StaticMeshRelevances, const FSceneView &View, const FVector4 &Origin, float SphereRadius, int32 ForcedLODLevel, float &OutScreenRadiusSquared, int8 CurFirstLODIdx, float ScreenSizeScale=1.0f, bool bDitheredLODTransition=true)
Definition SceneManagement.cpp:1013
ENGINE_API void InitializeSharedSamplerStates()
Definition SceneManagement.cpp:1339
constexpr int32 NUM_STORED_LIGHTMAP_COEF
Definition SceneManagement.h:361
int8 ENGINE_API ComputeTemporalStaticMeshLOD(const FStaticMeshRenderData *RenderData, const FVector4 &Origin, const float SphereRadius, const FSceneView &View, int32 MinLOD, float FactorScale, int32 SampleIndex)
Definition SceneManagement.cpp:953
ENGINE_API bool DoesProjectSupportDistanceFields()
Definition SceneManagement.cpp:54
ENGINE_API void ApplyViewModeOverrides(int32 ViewIndex, const FEngineShowFlags &EngineShowFlags, ERHIFeatureLevel::Type FeatureLevel, const FPrimitiveSceneProxy *PrimitiveSceneProxy, bool bSelected, struct FMeshBatch &Mesh, FMeshElementCollector &Collector)
Definition PrimitiveDrawingUtils.cpp:1609
ENGINE_API TGlobalResource< FDefaultWorkingColorSpaceUniformBuffer > GDefaultWorkingColorSpaceUniformBuffer
Definition SceneManagement.cpp:134
ENGINE_API void BuildTaperedCylinderVerts(const FVector &Base, const FVector &XAxis, const FVector &YAxis, const FVector &ZAxis, double BaseRadius, double TopRadius, double HalfHeight, uint32 Sides, TArray< FDynamicMeshVertex > &OutVerts, TArray< uint32 > &OutIndices)
Definition PrimitiveDrawingUtils.cpp:582
ENGINE_API FSharedSamplerState * Wrap_WorldGroupSettings
Definition SceneManagement.cpp:1336
EShadowMapInteractionType
Definition SceneTypes.h:120
@ SMIT_GlobalVolume
Definition SceneTypes.h:122
@ SMIT_Texture
Definition SceneTypes.h:123
@ SMIT_None
Definition SceneTypes.h:121
ELightMapInteractionType
Definition SceneTypes.h:111
@ LMIT_None
Definition SceneTypes.h:112
@ LMIT_Texture
Definition SceneTypes.h:114
@ LMIT_GlobalVolume
Definition SceneTypes.h:113
@ SE_BLEND_Masked
Definition SceneTypes.h:193
#define SHADER_PARAMETER_TEXTURE(ShaderType, MemberName)
Definition ShaderParameterMacros.h:1708
#define END_GLOBAL_SHADER_PARAMETER_STRUCT
Definition ShaderParameterMacros.h:1669
#define SHADER_PARAMETER_SRV(ShaderType, MemberName)
Definition ShaderParameterMacros.h:1720
#define SHADER_PARAMETER_SAMPLER(ShaderType, MemberName)
Definition ShaderParameterMacros.h:1740
#define BEGIN_SHADER_PARAMETER_STRUCT(StructTypeName, DllStorage)
Definition ShaderParameterMacros.h:1482
#define BEGIN_GLOBAL_SHADER_PARAMETER_STRUCT
Definition ShaderParameterMacros.h:1663
#define END_SHADER_PARAMETER_STRUCT()
Definition ShaderParameterMacros.h:1485
#define SHADER_PARAMETER(MemberType, MemberName)
Definition ShaderParameterMacros.h:1684
uint32 PointerHash(const void *Key)
Definition TypeHash.h:91
#define UE_ARRAY_COUNT(array)
Definition UnrealTemplate.h:212
if(Failed) console_printf("Failed.\n")
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 SceneManagement.h:914
void DoThreadedWork()
Definition SceneManagement.h:935
void Abandon()
Definition SceneManagement.h:929
FAsyncEncode(TPendingTextureType *InPendingTexture, const FStaticLightingBuildContext *InLightingContext, FThreadSafeCounter &InCounter, ITextureCompressorModule *InCompressor)
Definition SceneManagement.h:923
Definition BatchedElements.h:234
Definition BatchedElements.h:102
bool HasPrimsToDraw() const
Definition BatchedElements.h:208
Definition CanvasTypes.h:211
Definition SceneManagement.h:808
virtual void InitRHI(FRHICommandListBase &RHICmdList) override
Definition SceneManagement.cpp:1505
Definition SceneManagement.h:1105
Definition SceneManagement.h:306
Definition SceneManagement.h:1267
ENGINE_API void InitPrimitiveResource()
Definition SceneManagement.cpp:261
virtual void InitPrimitiveResource(FRHICommandListBase &RHICmdList)=0
virtual void ReleasePrimitiveResource()=0
Definition SceneManagement.h:1601
virtual ENGINE_API ~FDynamicPrimitiveUniformBuffer()
Definition SceneManagement.cpp:639
TUniformBuffer< FPrimitiveUniformShaderParameters > UniformBuffer
Definition SceneManagement.h:1608
FDynamicPrimitiveUniformBuffer(const FDynamicPrimitiveUniformBuffer &)=delete
ENGINE_API FDynamicPrimitiveUniformBuffer()
Definition GPUScene.h:80
Definition GlobalRenderResources.h:300
Definition DynamicBufferAllocator.h:56
Definition GlobalRenderResources.h:216
Definition HitProxies.h:86
Definition SceneManagement.h:820
ENGINE_API ELightInteractionType GetStaticInteraction(const FLightSceneProxy *LightSceneProxy, const TArray< FGuid > &IrrelevantLights) const
Definition SceneManagement.cpp:1548
void SetShadowMap(const FShadowMap *InShadowMap)
Definition SceneManagement.h:854
ENGINE_API FLightMapInteraction GetLightMapInteraction(ERHIFeatureLevel::Type InFeatureLevel) const
Definition SceneManagement.cpp:1516
bool bCanUsePrecomputedLightingParametersFromGPUScene
Definition SceneManagement.h:893
FRHIUniformBuffer * GetPrecomputedLightingBuffer() const
Definition SceneManagement.h:875
const FLightmapResourceCluster * GetResourceCluster() const
Definition SceneManagement.h:865
void SetResourceCluster(const FLightmapResourceCluster *InResourceCluster)
Definition SceneManagement.h:841
void SetPrecomputedLightingBuffer(FRHIUniformBuffer *InPrecomputedLightingUniformBuffer)
Definition SceneManagement.h:880
ENGINE_API void CreatePrecomputedLightingUniformBuffer_RenderingThread(ERHIFeatureLevel::Type FeatureLevel)
Definition SceneManagement.cpp:1350
ENGINE_API FShadowMapInteraction GetShadowMapInteraction(ERHIFeatureLevel::Type InFeatureLevel) const
Definition SceneManagement.cpp:1526
ENGINE_API bool GetVirtualTextureLightmapProducer(ERHIFeatureLevel::Type FeatureLevel, FVirtualTextureProducerHandle &OutProducerHandle)
Definition SceneManagement.cpp:1371
virtual FLightInteraction GetInteraction(const class FLightSceneProxy *LightSceneProxy) const =0
void SetLightMap(const FLightMap *InLightMap)
Definition SceneManagement.h:836
virtual ~FLightCacheInterface()
Definition SceneManagement.h:822
const FShadowMap * GetShadowMap() const
Definition SceneManagement.h:860
const FLightMap * GetLightMap() const
Definition SceneManagement.h:848
void SetGlobalVolumeLightmap(bool bInGlobalVolumeLightmap)
Definition SceneManagement.h:870
Definition SceneManagement.h:333
static FLightInteraction LightMap()
Definition SceneManagement.h:338
FLightInteraction(ELightInteractionType InType)
Definition SceneManagement.h:348
static FLightInteraction ShadowMap2D()
Definition SceneManagement.h:340
ELightInteractionType GetType() const
Definition SceneManagement.h:343
static FLightInteraction Irrelevant()
Definition SceneManagement.h:339
static FLightInteraction Dynamic()
Definition SceneManagement.h:337
Definition SceneManagement.h:390
const FVector2D & GetCoordinateBias() const
Definition SceneManagement.h:514
ELightMapInteractionType GetType() const
Definition SceneManagement.h:443
void SetCoordinateBias(const FVector2D &InCoordinateBias)
Definition SceneManagement.h:575
const ULightMapTexture2D * GetAOMaterialMaskTexture() const
Definition SceneManagement.h:467
const FVector4f * GetScaleArray() const
Definition SceneManagement.h:487
const ULightMapTexture2D * GetSkyOcclusionTexture() const
Definition SceneManagement.h:457
static FLightMapInteraction InitVirtualTexture(const ULightMapVirtualTexture2D *VirtualTexture, const FVector4f *InCoefficientScales, const FVector4f *InCoefficientAdds, const FVector2D &InCoordinateScale, const FVector2D &InCoordinateBias, bool bAllowHighQualityLightMaps)
Definition SceneManagement.cpp:838
void SetCoordinateScale(const FVector2D &InCoordinateScale)
Definition SceneManagement.h:566
bool AllowsHighQualityLightmaps() const
Definition SceneManagement.h:540
const ULightMapTexture2D * GetTexture(bool bHighQuality) const
Definition SceneManagement.h:445
const FVector4f * GetAddArray() const
Definition SceneManagement.h:498
uint32 GetNumLightmapCoefficients() const
Definition SceneManagement.h:520
const ULightMapVirtualTexture2D * GetVirtualTexture() const
Definition SceneManagement.h:477
FLightMapInteraction()
Definition SceneManagement.h:427
static FLightMapInteraction None()
Definition SceneManagement.h:394
const FVector2D & GetCoordinateScale() const
Definition SceneManagement.h:509
static FLightMapInteraction GlobalVolume()
Definition SceneManagement.h:401
void SetLightMapInteractionType(ELightMapInteractionType InType)
Definition SceneManagement.h:557
Definition LightMap.h:50
Definition LightSceneInfo.h:208
Definition LightSceneProxy.h:43
Definition SceneManagement.h:758
const UTexture2D * SkyOcclusionTexture
Definition SceneManagement.h:773
FLightmapClusterResourceInput()
Definition SceneManagement.h:761
bool operator==(const FLightmapClusterResourceInput &Rhs) const
Definition SceneManagement.h:789
const UTexture2D * AOMaterialMaskTexture
Definition SceneManagement.h:774
const UTexture2D * ShadowMapTexture
Definition SceneManagement.h:776
friend uint32 GetTypeHash(const FLightmapClusterResourceInput &Cluster)
Definition SceneManagement.h:778
Definition LightMap.h:609
Definition MaterialRenderProxy.h:102
Definition MeshElementCollector.h:26
ENGINE_API void AddViewMeshArrays(const FSceneView *InView, TArray< FMeshBatchAndRelevance, SceneRenderingAllocator > *ViewMeshes, FSimpleElementCollector *ViewSimpleElementCollector, FGPUScenePrimitiveCollector *DynamicPrimitiveCollector, FSimpleElementCollector *DebugSimpleElementCollector=nullptr)
Definition SceneManagement.cpp:490
ENGINE_API void RegisterOneFrameMaterialProxy(FMaterialRenderProxy *Proxy)
Definition SceneManagement.cpp:432
FMeshBatch & AllocateMesh()
Definition MeshElementCollector.h:40
TArray< const FSceneView *, TInlineAllocator< 2, SceneRenderingAllocator > > Views
Definition MeshElementCollector.h:187
Definition SceneManagement.h:1452
virtual ~FOneFrameResource()
Definition SceneManagement.h:1455
Definition SceneManagement.h:1040
Definition PrimitiveDrawInterface.h:19
Definition PrimitiveSceneProxy.h:296
Definition SceneManagement.h:1005
FProjectedShadowInitializer()
Definition SceneManagement.h:1021
float MinLightW
Definition SceneManagement.h:1017
bool IsCachedShadowValid(const FProjectedShadowInitializer &CachedShadow) const
Definition SceneManagement.h:1024
FVector4 WAxis
Definition SceneManagement.h:1016
FMatrix WorldToLight
Definition SceneManagement.h:1011
float MaxDistanceToCastInLightW
Definition SceneManagement.h:1018
FVector2D Scales
Definition SceneManagement.h:1013
FVector PreShadowTranslation
Definition SceneManagement.h:1009
FBoxSphereBounds SubjectBounds
Definition SceneManagement.h:1015
Definition RenderGraphBuilder.h:49
Definition RenderGraphResources.h:1196
Definition RenderGraphResources.h:571
Definition RHICommandList.h:455
Definition RHICommandList.h:3819
Definition RHIResources.h:1232
Definition RayTracingGeometry.h:31
Definition UObjectGlobals.h:2492
Definition RenderResource.h:37
Definition SceneInterface.h:106
Definition SceneView.h:2212
Definition SceneManagement.h:132
virtual void RemoveLumenSceneData(FSceneInterface *InScene)
Definition SceneManagement.h:247
virtual UMaterialInstanceDynamic * GetReusableMID(class UMaterialInterface *InSource)=0
bool IsViewParent() const
Definition SceneManagement.h:263
virtual FTemporalLODState & GetTemporalLODState()=0
virtual uint32 GetOcclusionFrameCounter() const =0
virtual const FTemporalLODState & GetTemporalLODState() const =0
virtual uint32 GetViewKey() const =0
virtual uint32 GetCurrentTemporalAASampleIndex() const =0
void SetViewParent(FSceneViewStateInterface *)
Definition SceneManagement.h:251
virtual SIZE_T GetSizeBytes() const
Definition SceneManagement.h:147
virtual float GetTemporalLODTransition() const =0
virtual void SystemMemoryMirrorRestore(FSceneViewStateSystemMemoryMirror *SystemMemoryMirror)=0
virtual void AddLumenSceneData(FSceneInterface *InScene, float SurfaceCacheResolution=1.0f)
Definition SceneManagement.h:246
uint8 bValidEyeAdaptationBuffer
Definition SceneManagement.h:279
virtual FRDGPooledBuffer * GetCurrentEyeAdaptationBuffer() const =0
virtual ~FSceneViewStateInterface()
Definition SceneManagement.h:277
virtual FRDGTextureRef GetVolumetricCloudTexture(FRDGBuilder &GraphBuilder)=0
virtual bool HasLumenSceneData() const =0
virtual void SetSequencerState(ESequencerState InSequencerState)=0
virtual float GetPreExposure() const =0
virtual uint32 GetDistanceFieldTemporalSampleIndex() const =0
virtual ESequencerState GetSequencerState()=0
virtual const FViewMatrices * GetFrozenViewMatrices() const =0
virtual FVector2f GetVolumetricCloudTextureUVScale() const =0
virtual FSceneViewState * GetConcreteViewState()=0
bool HasViewParent() const
Definition SceneManagement.h:260
virtual void ResetViewState()=0
virtual void SetExposureCompensationCurve(class UCurveFloat *NewCurve)
Definition SceneManagement.h:216
virtual void Destroy()=0
FSceneViewStateInterface * GetViewParent()
Definition SceneManagement.h:254
FSceneViewStateInterface()
Definition SceneManagement.h:134
bool HasValidEyeAdaptationBuffer() const
Definition SceneManagement.h:205
virtual void ActivateFrozenViewMatrices(FSceneView &SceneView)=0
virtual float GetLastEyeAdaptationExposure() const =0
virtual void AddReferencedObjects(FReferenceCollector &Collector)=0
virtual void ClearMIDPool(FStringView MidParentRootPath={})=0
virtual void RestoreUnfrozenViewMatrices(FSceneView &SceneView)=0
virtual void OnStartPostProcessing(FSceneView &CurrentView)=0
virtual FVector2f GetVolumetricCloudTextureUVMax() const =0
virtual float GetLastAverageSceneLuminance() const =0
virtual void SystemMemoryMirrorBackup(FSceneViewStateSystemMemoryMirror *SystemMemoryMirror)=0
static ENGINE_API TPimplPtr< FSceneViewStateSystemMemoryMirror > SystemMemoryMirrorAllocate()
Definition SceneView.cpp:3221
Definition ScenePrivate.h:746
Definition SceneView.h:1425
Definition ScenePrivate.h:2875
Definition SceneManagement.h:946
float FadePlaneLength
Definition SceneManagement.h:969
float FadePlaneOffset
Definition SceneManagement.h:966
FShadowCascadeSettings()
Definition SceneManagement.h:989
float CascadeBiasDistribution
Definition SceneManagement.h:987
float SplitNearFadeRegion
Definition SceneManagement.h:958
FConvexVolume ShadowBoundsAccurate
Definition SceneManagement.h:972
FPlane FarFrustumPlane
Definition SceneManagement.h:975
float SplitNear
Definition SceneManagement.h:952
int32 ShadowSplitIndex
Definition SceneManagement.h:984
float SplitFar
Definition SceneManagement.h:955
FPlane NearFrustumPlane
Definition SceneManagement.h:974
bool bFarShadowCascade
Definition SceneManagement.h:978
float SplitFarFadeRegion
Definition SceneManagement.h:961
Definition SceneManagement.h:613
const ULightMapVirtualTexture2D * GetVirtualTexture() const
Definition SceneManagement.h:696
EShadowMapInteractionType GetType() const
Definition SceneManagement.h:688
bool GetChannelValid(int32 ChannelIndex) const
Definition SceneManagement.h:714
static FShadowMapInteraction InitVirtualTexture(class ULightMapVirtualTexture2D *InTexture, const FVector2D &InCoordinateScale, const FVector2D &InCoordinateBias, const bool *InChannelValid, const FVector4f &InInvUniformPenumbraSize)
Definition SceneManagement.h:653
static FShadowMapInteraction None()
Definition SceneManagement.h:617
const FVector2D & GetCoordinateScale() const
Definition SceneManagement.h:702
const FVector2D & GetCoordinateBias() const
Definition SceneManagement.h:708
static FShadowMapInteraction Texture(class UShadowMapTexture2D *InTexture, const FVector2D &InCoordinateScale, const FVector2D &InCoordinateBias, const bool *InChannelValid, const FVector4f &InInvUniformPenumbraSize)
Definition SceneManagement.h:631
static FShadowMapInteraction GlobalVolume()
Definition SceneManagement.h:624
UShadowMapTexture2D * GetTexture() const
Definition SceneManagement.h:690
FShadowMapInteraction()
Definition SceneManagement.h:675
FVector4f GetInvUniformPenumbraSize() const
Definition SceneManagement.h:720
Definition ShadowMap.h:227
Definition SceneManagement.h:1939
bool bWrap
Definition SceneManagement.h:1942
virtual void ReleaseRHI() override
Definition SceneManagement.h:1950
FSamplerStateRHIRef SamplerStateRHI
Definition SceneManagement.h:1941
FSharedSamplerState(bool bInWrap)
Definition SceneManagement.h:1944
Definition SceneManagement.h:1397
Definition SceneManagement.h:1313
FBatchedElements BatchedElements
Definition SceneManagement.h:1434
virtual ENGINE_API void RegisterDynamicResource(FDynamicPrimitiveResource *DynamicResource) override
Definition SceneManagement.cpp:266
virtual ENGINE_API void DrawSprite(const FVector &Position, float SizeX, float SizeY, const FTexture *Sprite, const FLinearColor &Color, uint8 DepthPriorityGroup, float U, float UL, float V, float VL, uint8 BlendMode=SE_BLEND_Masked, float OpacityMaskRevVal=.5f) override
Definition SceneManagement.cpp:163
ENGINE_API void AddAllocationInfo(FAllocationInfo &AllocationInfo) const
Definition SceneManagement.cpp:292
virtual ENGINE_API void SetHitProxy(HHitProxy *HitProxy) override
Definition SceneManagement.cpp:151
ENGINE_API void DrawBatchedElements(FRHICommandList &RHICmdList, const FMeshPassProcessorRenderState &DrawRenderState, const FSceneView &InView, EBlendModeFilter::Type Filter, ESceneDepthPriorityGroup DPG, uint32 NumInstances=1) const
Definition SceneManagement.cpp:275
virtual void AddReserveLines(uint8 DepthPriorityGroup, int32 NumLines, bool bDepthBiased=false, bool bThickLines=false) override
Definition SceneManagement.h:1320
virtual ENGINE_API void DrawLine(const FVector &Start, const FVector &End, const FLinearColor &Color, uint8 DepthPriorityGroup, float Thickness=0.0f, float DepthBias=0.0f, bool bScreenSpace=false) override
Definition SceneManagement.cpp:196
FBatchedElements TopBatchedElements
Definition SceneManagement.h:1435
virtual bool IsHitTesting() override
Definition SceneManagement.h:1367
ENGINE_API FSimpleElementCollector()
Definition SceneManagement.cpp:137
bool HasAnyPrimitives() const
Definition SceneManagement.h:1418
virtual int32 DrawMesh(const FMeshBatch &Mesh) override
Definition SceneManagement.h:1381
bool HasPrimitives(ESceneDepthPriorityGroup DPG) const
Definition SceneManagement.h:1423
ENGINE_API ~FSimpleElementCollector()
Definition SceneManagement.cpp:141
virtual ENGINE_API void DrawPoint(const FVector &Position, const FLinearColor &Color, float PointSize, uint8 DepthPriorityGroup) override
Definition SceneManagement.cpp:244
ENGINE_API void Reserve(const FAllocationInfo &AllocationInfo)
Definition SceneManagement.cpp:299
virtual ENGINE_API void DrawTranslucentLine(const FVector &Start, const FVector &End, const FLinearColor &Color, uint8 DepthPriorityGroup, float Thickness=0.0f, float DepthBias=0.0f, bool bScreenSpace=false) override
Definition SceneManagement.cpp:220
Definition SkeletalMeshLODRenderData.h:128
Definition StaticMeshResources.h:774
Definition SceneManagement.h:1293
virtual ~FStaticPrimitiveDrawInterface()
Definition SceneManagement.h:1295
virtual void DrawMesh(const FMeshBatch &Mesh, float ScreenSize)=0
virtual void SetHitProxy(HHitProxy *HitProxy)=0
virtual void ReserveMemoryForMeshes(int32 MeshNum)=0
Definition RenderResource.h:354
Definition ThreadSafeCounter.h:14
int32 Decrement()
Definition ThreadSafeCounter.h:75
Definition SceneManagement.h:1280
virtual void Draw(const FSceneView *View, FPrimitiveDrawInterface *PDI)
Definition SceneManagement.h:1286
Definition UnrealClient.h:412
Definition SceneManagement.h:1047
FShadowCascadeSettings CascadeSettings
Definition SceneManagement.h:1049
FWholeSceneProjectedShadowInitializer()
Definition SceneManagement.h:1053
bool bOnePassPointLightShadow
Definition SceneManagement.h:1050
bool IsCachedShadowValid(const FWholeSceneProjectedShadowInitializer &CachedShadow) const
Definition SceneManagement.h:1058
bool bRayTracedDistanceField
Definition SceneManagement.h:1051
Definition HitProxies.h:135
Definition VirtualTexturing.h:374
Definition IQueuedWork.h:62
Definition Array.h:670
Definition RenderResource.h:543
UE_FORCEINLINE_HINT void SafeRelease()
Definition RefCounting.h:599
Definition ContainerAllocationPolicies.h:894
Definition UniformBuffer.h:29
Definition CurveFloat.h:31
Definition ColorSpace.h:98
Definition LightMapTexture2D.h:25
Definition LightmapVirtualTexture.h:22
Definition MaterialInstanceDynamic.h:15
Definition MaterialInterface.h:296
Definition ShadowMapTexture2D.h:13
Definition Texture2D.h:26
Definition Texture.h:1219
Type
Definition BatchedElements.h:30
Definition SceneComponent.h:24
Type
Definition RHIFeatureLevel.h:20
FUniformParams Params
Definition MeshPaintVirtualTexture.cpp:162
Definition SceneManagement.h:73
int32 FGeometryGroupHandle
Definition SceneManagement.h:74
Definition AdvancedWidgetsModule.cpp:13
Definition VirtualTextureRecreate.cpp:16
@ false
Definition radaudio_common.h:23
Definition ConvexVolume.h:44
Definition SceneTypes.h:30
Definition DynamicMeshBuilder.h:26
Definition ShowFlags.h:56
Definition SceneManagement.h:1831
bool IsValid() const
Definition SceneManagement.h:1847
uint16 LODIndex1
Definition SceneManagement.h:1835
bool IsMaxLODInRange(int32 LODIndex) const
Definition SceneManagement.h:1906
bool IsMinLODInRange(int32 LODIndex) const
Definition SceneManagement.h:1902
uint16 bIsRange
Definition SceneManagement.h:1837
uint16 LODIndex0
Definition SceneManagement.h:1834
void SetLOD(uint32 LODIndex)
Definition SceneManagement.h:1851
int8 GetRayTracedLOD() const
Definition SceneManagement.h:1913
bool IsDithered() const
Definition SceneManagement.h:1882
void SetLODSample(uint32 LODIndex, uint32 SampleIndex)
Definition SceneManagement.h:1857
void ClampToFirstLOD(uint32 FirstLODIdx)
Definition SceneManagement.h:1877
FLODMask()
Definition SceneManagement.h:1839
bool IsLODRange() const
Definition SceneManagement.h:1886
bool ContainsLOD(int32 LODIndex) const
Definition SceneManagement.h:1890
uint16 bIsValid
Definition SceneManagement.h:1836
void SetLODRange(uint32 MinLODIndex, uint32 MaxLODIndex)
Definition SceneManagement.h:1870
Definition SceneManagement.h:1192
FVector2f RectLightAtlasUVOffset
Definition SceneManagement.h:1241
float SourceRadius
Definition SceneManagement.h:1223
float IESAtlasIndex
Definition SceneManagement.h:1246
FVector3f Tangent
Definition SceneManagement.h:1220
static float GetRectLightAtlasInvalidMIPLevel()
Definition SceneManagement.h:1257
uint32 LightFunctionAtlasLightIndex
Definition SceneManagement.h:1249
float InverseExposureBlend
Definition SceneManagement.h:1254
float DiffuseScale
Definition SceneManagement.h:1216
FVector3f Direction
Definition SceneManagement.h:1210
float RectLightBarnCosAngle
Definition SceneManagement.h:1235
float RectLightBarnLength
Definition SceneManagement.h:1238
float FalloffExponent
Definition SceneManagement.h:1207
float SoftSourceRadius
Definition SceneManagement.h:1229
float SourceLength
Definition SceneManagement.h:1232
FVector2f RectLightAtlasUVScale
Definition SceneManagement.h:1242
float InvRadius
Definition SceneManagement.h:1201
FLinearColor Color
Definition SceneManagement.h:1204
float SpecularScale
Definition SceneManagement.h:1213
float RectLightAtlasMaxLevel
Definition SceneManagement.h:1243
uint32 bAffectsTranslucentLighting
Definition SceneManagement.h:1252
FVector WorldPosition
Definition SceneManagement.h:1198
FVector2f SpotAngles
Definition SceneManagement.h:1226
Definition Color.h:48
static constexpr UE_FORCEINLINE_HINT T Clamp(const T X, const T MinValue, const T MaxValue)
Definition UnrealMathUtility.h:592
Definition SceneManagement.h:1462
const FPrimitiveSceneProxy * PrimitiveSceneProxy
Definition SceneManagement.h:1466
bool GetHasMaskedMaterial() const
Definition SceneManagement.h:1481
const FMeshBatch * Mesh
Definition SceneManagement.h:1463
bool GetHasOpaqueOrMaskedMaterial() const
Definition SceneManagement.h:1482
bool GetHasOpaqueMaterial() const
Definition SceneManagement.h:1480
bool GetRenderInMainPass() const
Definition SceneManagement.h:1483
Definition MeshBatch.h:371
Definition MeshPassProcessor.h:2118
Definition PrimitiveUniformShaderParametersBuilder.h:18
Definition RHIUtilities.h:181
Definition RayTracingInstance.h:17
Definition SceneViewStateSystemMemory.h:22
Definition AndroidStaticShaderPlatform.inl:18
Definition SceneManagement.h:93
float TemporalLODLag
Definition SceneManagement.h:99
ENGINE_API void UpdateTemporalLODTransition(const FSceneView &View, float LastRenderTime)
Definition SceneManagement.cpp:77
float TemporalLODTime[2]
Definition SceneManagement.h:97
FTemporalLODState()
Definition SceneManagement.h:101
float GetTemporalLODTransition(float LastRenderTime) const
Definition SceneManagement.h:109
FVector TemporalLODViewOrigin[2]
Definition SceneManagement.h:95
Definition SceneView.h:317
Definition PimplPtr.h:50
Definition BoxSphereBounds.h:25
TVector< TExtent > BoxExtent
Definition BoxSphereBounds.h:32
TExtent SphereRadius
Definition BoxSphereBounds.h:35
TVector< T > Origin
Definition BoxSphereBounds.h:29
static CORE_API const TMatrix Identity
Definition Matrix.h:52
Definition VirtualTexturing.h:33