UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
LandscapeRender.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*=============================================================================
4LandscapeRender.h: New terrain rendering
5=============================================================================*/
6
7#pragma once
8
9#include "CoreMinimal.h"
10#include "Misc/Guid.h"
11#include "Engine/EngineTypes.h"
14#include "ShaderParameters.h"
15#include "RenderResource.h"
16#include "UniformBuffer.h"
17#include "VertexFactory.h"
18#include "MaterialShared.h"
20#include "LandscapeProxy.h"
21#include "RendererInterface.h"
22#include "MeshBatch.h"
23#include "SceneManagement.h"
25#include "LandscapeComponent.h"
28#include "PrimitiveSceneProxy.h"
29#include "StaticMeshResources.h"
31#include "SceneViewExtension.h"
33#include "Tasks/Task.h"
34
35#define LANDSCAPE_LOD_LEVELS 8
36#define LANDSCAPE_MAX_SUBSECTION_NUM 2
37
40
41#if WITH_EDITOR
43#endif
44
45namespace UE::Renderer::Private { class IShadowInvalidatingInstances; }
46
47#if RHI_RAYTRACING
49#endif
50
51#if WITH_EDITOR
52namespace ELandscapeViewMode
53{
54 enum Type: int32
55 {
56 Invalid = -1,
58 Normal = 0,
59 EditLayer,
64 LOD,
67 };
68}
69
71
73{
74 enum Type
75 {
76 None = 0x0,
77 Gizmo = 0x1,
78 SelectRegion = 0x2,
79 SelectComponent = 0x4,
81 Mask = 0x8,
82 InvertedMask = 0x10, // Should not be overlapped with other bits
84
85 };
86}
87
90
91UE_DEPRECATED(5.6, "This global has been deprecated. Please use ULandscapeEditResourcesSubsystem->GetLayerDebugColorMaterial")
93UE_DEPRECATED(5.6, "This global has been deprecated. Please use ULandscapeEditResourcesSubsystem->GetSelectionColorMaterial")
95UE_DEPRECATED(5.6, "This global has been deprecated. Please use ULandscapeEditResourcesSubsystem->GetSelectionRegionMaterial")
97UE_DEPRECATED(5.6, "This global has been deprecated. Please use ULandscapeEditResourcesSubsystem->GetMaskRegionMaterial")
99UE_DEPRECATED(5.6, "This global has been deprecated. Please use ULandscapeEditResourcesSubsystem->GetColorMaskRegionMaterial")
101UE_DEPRECATED(5.6, "This global has been deprecated. Please use ULandscapeEditResourcesSubsystem->GetLandscapeBlackTexture")
103UE_DEPRECATED(5.6, "This global has been deprecated. Please use ULandscapeEditResourcesSubsystem->GetLandscapeLayerUsageMaterial")
105UE_DEPRECATED(5.6, "This global has been deprecated. Please use ULandscapeEditResourcesSubsystem->GetLandscapeDirtyMaterial")
107#endif
108
109namespace UE::Landscape
110{
113} // namespace UE::Landscape
114
119 SHADER_PARAMETER(int32, SubsectionSizeVerts)
120 SHADER_PARAMETER(int32, NumSubsections)
122 SHADER_PARAMETER(int32, NumRayTracingSections)
124 SHADER_PARAMETER(int32, LastLOD)
125 SHADER_PARAMETER(uint32, VirtualTexturePerPixelHeight)
126 SHADER_PARAMETER(float, InvLODBlendRange)
135 SHADER_PARAMETER(FMatrix44f, LocalToWorldNoScaling)
136 SHADER_PARAMETER_TEXTURE(Texture2D, HeightmapTexture)
141
146
148
150 SHADER_PARAMETER(int32, LandscapeIndex)
155
159
160/* Data needed for the landscape vertex factory to set the render state for an individual batch element */
172
178
180{
182public:
187 void Bind(const FShaderParameterMap& ParameterMap)
188 {
189 }
190
192 const class FSceneInterface* Scene,
193 const FSceneView* InView,
194 const class FMeshMaterialShader* Shader,
196 ERHIFeatureLevel::Type FeatureLevel,
197 const FVertexFactory* VertexFactory,
199 class FMeshDrawSingleShaderBindings& ShaderBindings,
200 FVertexInputStreamArray& VertexStreams
201 ) const;
202};
203
206{
208public:
210 const class FSceneInterface* Scene,
211 const FSceneView* InView,
212 const class FMeshMaterialShader* Shader,
214 ERHIFeatureLevel::Type FeatureLevel,
215 const FVertexFactory* VertexFactory,
217 class FMeshDrawSingleShaderBindings& ShaderBindings,
218 FVertexInputStreamArray& VertexStreams
219 ) const;
220
221
222
223};
224
283
284
286class UE_DEPRECATED(5.7, "XYOffset deprecated with the removal of non-edit layer landscapes") FLandscapeXYOffsetVertexFactory : public FLandscapeVertexFactory
287{
289
290public:
293 {
294 }
295};
296
297
311
312
320
321//
322// FLandscapeVertexBuffer
323//
325{
326 ERHIFeatureLevel::Type FeatureLevel;
327 int32 NumVertices;
328 int32 SubsectionSizeVerts;
329 int32 NumSubsections;
330public:
331
342
345 {
347 }
348
352 virtual void InitRHI(FRHICommandListBase& RHICmdList) override;
353};
354
355//
356// FLandscapeSharedBuffers
357//
359{
360public:
368
375
379
381
385
386 // array per mip level, storing FIndexBuffer pointers
388
389 // array per mip level, storing index buffer ranges per subssection, and for the entire component
391
395
396#if RHI_RAYTRACING
398#endif
399
400 UE_DEPRECATED(5.6, "This constructor has been deprecated. Please use constructor which also provides the number of raytracing sections.")
401 LANDSCAPE_API FLandscapeSharedBuffers(FRHICommandListBase& RHICmdList, int32 SharedBuffersKey, int32 SubsectionSizeQuads, int32 NumSubsections, ERHIFeatureLevel::Type FeatureLevel, const FName& OwnerName = NAME_None);
402
404
406 void CreateIndexBuffers(FRHICommandListBase& RHICmdList, const FName& OwnerName);
407
410
412};
413
414//
415// FLandscapeSectionInfo
416//
417
419{
420public:
422 virtual ~FLandscapeSectionInfo() = default;
423
424 virtual float ComputeLODForView(const FSceneView& InView) const = 0;
425 virtual float ComputeLODBias() const = 0;
426 virtual int32 GetSectionPriority() const { return INDEX_NONE; }
427 virtual const FPrimitiveSceneInfo* GetPrimitiveSceneInfo() const = 0;
428
430 virtual double ComputeSectionResolution() const { return -1.0; }
431
432 virtual void GetSectionBoundsAndLocalToWorld(FBoxSphereBounds& LocalBounds, FMatrix& LocalToWorld) const = 0;
434
435 /* return the resolution of a component, in vertices (-1 for any sections that are not grid based, i.e. mesh sections) */
436 virtual int32 GetComponentResolution() const { return -1; }
437
438 /* Used to notify derived classes when render coords are calculated */
439 virtual void OnRenderCoordsChanged(FRHICommandListBase& RHICmdList) = 0;
440
441 virtual bool ShouldInvalidateShadows(const FSceneView& InView, float InLODValue, float InLastShadowInvalidationLODValue) const { return false; }
442
443#if RHI_RAYTRACING
445#endif
446
447public:
448 // A hash of the world and (LandscapeGUID or LOD Group Key)
449 uint32 LandscapeKey = 0;
450 // LOD Group Key (0 if no group)
451 uint32 LODGroupKey = 0;
452 // Coordinate in the RenderSystem
454 // Component base coordinate (relative to the ALandscape actor)
455 FIntPoint ComponentBase = FIntPoint(ForceInit);
456 // Scene that this landscape section belongs to
458
459 bool bResourcesCreated = false;
460 bool bRegistered = false;
461};
462
463//
464// FLandscapeRenderSystem
465//
467{
469
482
483 static float ComputeLODFromScreenSize(const LODSettingsComponent& InLODSettings, float InScreenSizeSquared);
484
486
488
491
494 // Number of sections with resources created
496 // Number of sections registered
498
501
503
504 // For a given view, we use those 2 maps to store, for each FLandscapeSectionInfo in SectionInfos, the current LOD Values so that it can be passed down to the renderer
505 // These are only really valid for a given render since the list of sections can change in the next frame.
506 // The first map is for views that don't have a persistent view state
507 TMap<const FSceneView*, TResourceArray<float>> PerViewCachedSectionLODValues; // Key = view to render, Value = linear list of LOD values for each FLandscapeSectionInfo
508 TMap<uint32, TResourceArray<float>> PerViewStateCachedSectionLODValues; // Key = view state key corresponding to the view to render, Value = linear list of LOD values for each FLandscapeSectionInfo
509
510 // This map allows to track, for each FLandscapeSectionInfo that triggered a shadow invalidation, the LOD value that was used when the invalidation occurred
511 // Key = SectionInfo's RenderCoord (we cannot use a linear index like the TMaps above because these might change as new sections get added/removed dynamically and this needs to be tracked across frames)
512 // Value = LOD value of the section when the last shadow invalidation occurred
514 TMap<uint32, SectionKeyToLODValueMap> PerViewStateLastShadowInvalidationSectionLODValues; // Key = view state key corresponding to the view to render, Value = see above
515
516 // List of shadow invalidations to perform this frame (because IShadowInvalidatingInstances is not parallel-render thread-safe, we have to store them temporarily and issue them on the render thread later on) :
518
521
522 // Resolution, Origin and Size, for use in LOD Groups to verify that all landscapes are of matching resolutions, orientation and scale
523 int32 ComponentResolution = -1;
524 FVector ComponentOrigin = FVector::ZeroVector; // world space position of the center of the origin component (render coord 0,0)
525 FVector ComponentXVector = FVector::ZeroVector; // world space vector in the direction of component local X
526 FVector ComponentYVector = FVector::ZeroVector; // world space vector in the direction of component local Y
527
528 // Counter used to reduce how often we call compact on the map when removing sections
530
531 uint32 LandscapeKey = 0;
533
536
537 static void CreateResources(FRHICommandListBase& RHICmdList, FLandscapeSectionInfo* SectionInfo);
538 static void DestroyResources(FLandscapeSectionInfo* SectionInfo);
539
540 static void RegisterSection(FLandscapeSectionInfo* SectionInfo);
541 static void UnregisterSection(FLandscapeSectionInfo* SectionInfo);
542
544 {
545 return InRenderCoord.X >= Min.X && InRenderCoord.X < Min.X + Size.X &&
546 InRenderCoord.Y >= Min.Y && InRenderCoord.Y < Min.Y + Size.Y;
547 }
548
550 {
551 check(IsValidCoord(InRenderCoord));
552 int32 LinearIndex = (InRenderCoord.Y - Min.Y) * Size.X + InRenderCoord.X - Min.X;
553 return LinearIndex;
554 }
555
556 void ResizeAndMoveTo(FIntPoint NewMin, FIntPoint NewMax);
557 void ResizeToInclude(const FIntPoint& NewCoord);
558 void CompactMap();
559 bool AnySectionsInRangeInclusive(FIntPoint RangeMin, FIntPoint RangeMax);
560
562 {
563 if (IsValidCoord(InRenderCoord))
564 {
565 SectionInfos[GetSectionLinearIndex(InRenderCoord)] = InSectionInfo;
566 }
567 }
568
570 {
571 if (IsValidCoord(InRenderCoord))
572 {
573 return SectionInfos[GetSectionLinearIndex(InRenderCoord)];
574 }
575 return nullptr;
576 }
577
578 float GetSectionLODValue(const FSceneView& InView, FIntPoint InRenderCoord) const;
579 const TResourceArray<float>& GetCachedSectionLODValues(const FSceneView& InView) const;
580
581 float GetSectionLODBias(FIntPoint InRenderCoord) const;
582
585 void FetchHeightmapLODBiases();
586 void UpdateBuffers(FRHICommandListBase& RHICmdList);
587
588private:
589 void CreateResources_Internal(FRHICommandListBase& RHICmdList, FLandscapeSectionInfo* InSectionInfo);
590 void DestroyResources_Internal(FLandscapeSectionInfo* InSectionInfo);
591};
592
593//
594// FLandscapeLODOverridesCustomRenderPassUserData
595//
611
612//
613// FLandscapeSceneViewExtension
614//
616{
617public:
620
621 virtual void BeginRenderViewFamily(FSceneViewFamily& InViewFamily) override;
622
623 virtual void PreRenderViewFamily_RenderThread(FRDGBuilder& GraphBuilder, FSceneViewFamily& InViewFamily) override;
624 virtual void PreRenderView_RenderThread(FRDGBuilder& GraphBuilder, FSceneView& InView) override;
625 virtual void PreInitViews_RenderThread(FRDGBuilder& GraphBuilder) override;
626
627 LANDSCAPE_API static const TMap<uint32, FLandscapeRenderSystem*>& GetLandscapeRenderSystems();
629 static FLandscapeRenderSystem* GetLandscapeRenderSystem(const class FSceneInterface* InScene, uint32 InLandscapeKey);
630 int32 GetNumViewsWithShowCollision() const { return NumViewsWithShowCollision; }
631
632private:
633 void EndFrame_GameThread();
634 void EndFrame_RenderThread();
635
636private:
637
638 struct FLandscapeViewData
639 {
640 FLandscapeViewData() = default;
641 FLandscapeViewData(FSceneView& InView);
642
643 FSceneView* View = nullptr;
644 // Optional interface to use if the view needs to invalidate the shadow cache :
645 UE::Renderer::Private::IShadowInvalidatingInstances* ShadowInvalidatingInstances = nullptr;
646 TResourceArray<uint32> LandscapeIndirection;
647 TResourceArray<float> LandscapeLODData;
648 };
649
650 TArray<FLandscapeViewData> LandscapeViews;
651 UE::Tasks::FTask LandscapeSetupTask;
652 int32 NumViewsWithShowCollision = 0; // Last frame number of views with collision enabled.
653 int32 NumViewsWithShowCollisionAcc = 0; // Accumulate the number of views with collision
654};
655
656//
657// FLandscapeDebugOptions
658//
660{
662
665
666private:
667 FAutoConsoleCommand PatchesConsoleCommand;
668 FAutoConsoleCommand StaticConsoleCommand;
669
670 void Patches();
671 void Static();
672};
673
675
676//
677// FLandscapeMeshProxySceneProxy
678//
680{
681public:
682 SIZE_T GetTypeHash() const override;
683
685 virtual void CreateRenderThreadResources(FRHICommandListBase& RHICmdList) override;
686 virtual void DestroyRenderThreadResources() override;
687
688protected:
689 virtual void OnForceHiddenChanged() override;
690
691private:
692 void RegisterSections();
693 void UnregisterSections();
694
696};
697
698//
699// FLandscapeComponentSceneProxy
700//
702{
704
705 LANDSCAPE_API SIZE_T GetTypeHash() const override;
706 class FLandscapeLCI final : public FLightCacheInterface
707 {
708 public:
710 FLandscapeLCI(const ULandscapeComponent* InComponent, ERHIFeatureLevel::Type FeatureLevel, bool bVFRequiresPrimitiveUniformBuffer)
712 {
713 if (InComponent->GetLightmapType() == ELightmapType::ForceVolumetric)
714 {
715 SetGlobalVolumeLightmap(true);
716 }
717
718 const FMeshMapBuildData* MapBuildData = InComponent->GetMeshMapBuildData();
719
720 if (MapBuildData)
721 {
722 SetLightMap(MapBuildData->LightMap);
723 SetShadowMap(MapBuildData->ShadowMap);
724 SetResourceCluster(MapBuildData->ResourceCluster);
725 // If landscape uses VF that requires primitive UB that means it does not use GPUScene therefore it may need precomputed lighting buffer as well
726 if (FeatureLevel >= ERHIFeatureLevel::SM5 && !bVFRequiresPrimitiveUniformBuffer)
727 {
728 // Landscape does not support GPUScene on mobile
729 // TODO: enable this when GPUScene support is implemented
730 bCanUsePrecomputedLightingParametersFromGPUScene = true;
731 }
732 IrrelevantLights = MapBuildData->IrrelevantLights;
733 }
734 }
735
736 // FLightCacheInterface
737 virtual FLightInteraction GetInteraction(const FLightSceneProxy* LightSceneProxy) const override;
738
739 private:
740 TArray<FGuid> IrrelevantLights;
741 };
742
743public:
744 static const int8 MAX_SUBSECTION_COUNT = 2*2;
745
746#if RHI_RAYTRACING
748#endif
749
751
752 // Reference counted vertex and index buffer shared among all landscape scene proxies of the same component size
753 // Key is the component size and number of subsections.
754 // Also being reused by GPULightmass currently to save mem
756
757protected:
758 // Maximum LOD level, user override possible
764 // Table of valid screen size -> LOD index
766 // First LOD we have batch elements for
768 // Last LOD we have batch elements for
772 // The max extend value in any axis
774 // 1.0 / LODBlendRange
776
778
797
801
803
804 // Storage for static draw list batch params
806
809
810 // Precomputed grass rendering MeshBatch and per-LOD params
813
816
819
820#if WITH_EDITOR
821 TArray<FLinearColor> LayerColors;
823#endif
824 // Heightmap in RG and Normalmap in BA
829
834
837
838 // FLightCacheInterface
840
843
846
849
851 int32 NumRelevantMips = 0;
852
857
860
863
864#if WITH_EDITORONLY_DATA
866#endif
867
868 // data used in editor or visualisers
869#if WITH_EDITOR || !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
872
874#endif
875
876#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
879#endif
880
882
883 // Cached versions of these
885
886#if !UE_BUILD_SHIPPING
888#endif // !UE_BUILD_SHIPPING
889
890protected:
892
894 template<class ArrayType> bool GetStaticMeshElement(int32 LODIndex, bool bForToolMesh, FMeshBatch& MeshBatch, ArrayType& OutStaticBatchParamArray) const;
895
896 LANDSCAPE_API virtual void OnForceHiddenChanged() override;
897
898public:
899 // constructor
901
902 // FPrimitiveSceneProxy interface.
903 LANDSCAPE_API virtual void DrawStaticElements(FStaticPrimitiveDrawInterface* PDI) override;
904 LANDSCAPE_API virtual void GetDynamicMeshElements(const TArray<const FSceneView*>& Views, const FSceneViewFamily& ViewFamily, uint32 VisibilityMap, FMeshElementCollector& Collector) const override;
905 LANDSCAPE_API virtual void ApplyViewDependentMeshArguments(const FSceneView& View, FMeshBatch& ViewDependentMeshBatch) const override;
906 virtual uint32 GetMemoryFootprint() const override { return(sizeof(*this) + GetAllocatedSize()); }
907 LANDSCAPE_API virtual FPrimitiveViewRelevance GetViewRelevance(const FSceneView* View) const override;
908 LANDSCAPE_API virtual bool CanBeOccluded() const override;
909 LANDSCAPE_API virtual void GetLightRelevance(const FLightSceneProxy* LightSceneProxy, bool& bDynamic, bool& bRelevant, bool& bLightMapped, bool& bShadowMapped) const override;
910 LANDSCAPE_API virtual void OnTransformChanged(FRHICommandListBase& RHICmdList) override;
911 LANDSCAPE_API virtual void CreateRenderThreadResources(FRHICommandListBase& RHICmdList) override;
912 LANDSCAPE_API virtual void DestroyRenderThreadResources() override;
913
914 friend class ULandscapeComponent;
916 friend class FLandscapeXYOffsetVertexFactoryVertexShaderParameters;
919
920 const FMeshBatch& GetGrassMeshBatch() const { return GrassMeshBatch; }
921
922 // FLandcapeSceneProxy
923 LANDSCAPE_API virtual bool HeightfieldHasPendingStreaming() const override;
924
926
927 LANDSCAPE_API virtual void GetLCIs(FLCIArray& LCIs) override;
928
929#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
930 virtual int32 GetLightMapResolution() const override { return LightMapResolution; }
931#endif
932
933#if RHI_RAYTRACING
934 LANDSCAPE_API virtual void GetDynamicRayTracingInstances(FRayTracingInstanceCollector& Collector) override final;
935 virtual bool HasRayTracingRepresentation() const override { return true; }
936 virtual bool IsRayTracingRelevant() const override { return true; }
937#endif
938
939 // FLandscapeSectionInfo interface
940 LANDSCAPE_API virtual float ComputeLODForView(const FSceneView& InView) const override;
941 LANDSCAPE_API virtual float ComputeLODBias() const override;
942 LANDSCAPE_API virtual void OnRenderCoordsChanged(FRHICommandListBase& RHICmdList) override;
943 LANDSCAPE_API virtual int32 GetComponentResolution() const override;
944 LANDSCAPE_API virtual double ComputeSectionResolution() const override;
945 LANDSCAPE_API virtual void GetSectionBoundsAndLocalToWorld(FBoxSphereBounds& LocalBounds, FMatrix& LocalToWorld) const override;
947 LANDSCAPE_API virtual const FPrimitiveSceneInfo* GetPrimitiveSceneInfo() const override;
948 LANDSCAPE_API virtual bool ShouldInvalidateShadows(const FSceneView& InView, float InLODValue, float InLastShadowInvalidationLODValue) const override;
949
950#if RHI_RAYTRACING
952#endif
953
954};
955
957{
958public:
966
969 const FLinearColor& InR, const FLinearColor& InG, const FLinearColor& InB) :
970 FMaterialRenderProxy(InParent->GetMaterialName()),
972 RedTexture(TexR),
973 GreenTexture(TexG),
974 BlueTexture(TexB),
975 R(InR),
976 G(InG),
977 B(InB)
978 {}
979
980 // FMaterialRenderProxy interface.
982 {
983 return Parent->GetMaterialNoFallback(InFeatureLevel);
984 }
985
990
992 {
993 switch (Type)
994 {
996 if (ParameterInfo.Name == FName(TEXT("Landscape_RedMask")))
997 {
998 OutValue = R;
999 return true;
1000 }
1001 else if (ParameterInfo.Name == FName(TEXT("Landscape_GreenMask")))
1002 {
1003 OutValue = G;
1004 return true;
1005 }
1006 else if (ParameterInfo.Name == FName(TEXT("Landscape_BlueMask")))
1007 {
1008 OutValue = B;
1009 return true;
1010 }
1011 break;
1013 if (ParameterInfo.Name == FName(TEXT("Landscape_RedTexture")))
1014 {
1015 OutValue = RedTexture;
1016 return true;
1017 }
1018 else if (ParameterInfo.Name == FName(TEXT("Landscape_GreenTexture")))
1019 {
1020 OutValue = GreenTexture;
1021 return true;
1022 }
1023 else if (ParameterInfo.Name == FName(TEXT("Landscape_BlueTexture")))
1024 {
1025 OutValue = BlueTexture;
1026 return true;
1027 }
1028 break;
1029 default:
1030 break;
1031 }
1032 return Parent->GetParameterValue(Type, ParameterInfo, OutValue, Context);
1033 }
1034};
1035
1037{
1038public:
1041
1048
1049 // FMaterialRenderProxy interface.
1051 {
1052 return Parent->GetMaterialNoFallback(InFeatureLevel);
1053 }
1058
1060 {
1061 switch (Type)
1062 {
1064 if (ParameterInfo.Name == FName(TEXT("HighlightColor")))
1065 {
1066 OutValue = FLinearColor(1.f, 0.5f, 0.5f);
1067 return true;
1068 }
1069 break;
1071 if (ParameterInfo.Name == FName(TEXT("SelectedData")))
1072 {
1073 OutValue = SelectTexture;
1074 return true;
1075 }
1076 break;
1077 default:
1078 break;
1079 }
1080 return Parent->GetParameterValue(Type, ParameterInfo, OutValue, Context);
1081 }
1082};
1083
1085{
1086public:
1089 const bool bInverted;
1090
1093 FMaterialRenderProxy(InParent->GetMaterialName()),
1095 SelectTexture(InTexture),
1096 bInverted(InbInverted)
1097 {}
1098
1099 // FMaterialRenderProxy interface.
1101 {
1102 return Parent->GetMaterialNoFallback(InFeatureLevel);
1103 }
1108
1110 {
1111 switch (Type)
1112 {
1114 if (ParameterInfo.Name == FName(TEXT("bInverted")))
1115 {
1116 OutValue = (float)bInverted;
1117 return true;
1118 }
1119 break;
1121 if (ParameterInfo.Name == FName(TEXT("SelectedData")))
1122 {
1123 OutValue = SelectTexture;
1124 return true;
1125 }
1126 break;
1127 default:
1128 break;
1129 }
1130 return Parent->GetParameterValue(Type, ParameterInfo, OutValue, Context);
1131 }
1132};
1133
1135{
1136 const FMaterialRenderProxy* const Parent;
1137
1138 int32 ComponentSizeVerts;
1139 TArray<FLinearColor> LayerColors;
1140 float Rotation;
1141public:
1149
1150 // FMaterialRenderProxy interface.
1152 {
1153 return Parent->GetMaterialNoFallback(InFeatureLevel);
1154 }
1159
1161 {
1162 static FName ColorNames[] =
1163 {
1164 FName(TEXT("Color0")),
1165 FName(TEXT("Color1")),
1166 FName(TEXT("Color2")),
1167 FName(TEXT("Color3")),
1168 FName(TEXT("Color4")),
1169 FName(TEXT("Color5")),
1170 FName(TEXT("Color6")),
1171 FName(TEXT("Color7")),
1172 FName(TEXT("Color8")),
1173 FName(TEXT("Color9")),
1174 FName(TEXT("Color10")),
1175 FName(TEXT("Color11")),
1176 FName(TEXT("Color12")),
1177 FName(TEXT("Color13")),
1178 FName(TEXT("Color14")),
1179 FName(TEXT("Color15"))
1180 };
1181
1182 switch (Type)
1183 {
1185 for (int32 i = 0; i < UE_ARRAY_COUNT(ColorNames) && i < LayerColors.Num(); i++)
1186 {
1187 if (ParameterInfo.Name == ColorNames[i])
1188 {
1189 OutValue = LayerColors[i];
1190 return true;
1191 }
1192 }
1193 break;
1195 if (ParameterInfo.Name == FName(TEXT("Rotation")))
1196 {
1198 return true;
1199 }
1200 else if (ParameterInfo.Name == FName(TEXT("NumStripes")))
1201 {
1202 OutValue = (float)LayerColors.Num();
1203 return true;
1204 }
1205 else if (ParameterInfo.Name == FName(TEXT("ComponentSizeVerts")))
1206 {
1207 OutValue = (float)ComponentSizeVerts;
1208 return true;
1209 }
1210 break;
1211 default:
1212 break;
1213 }
1214
1215 return Parent->GetParameterValue(Type, ParameterInfo, OutValue, Context);
1216 }
1217};
@ Normal
Definition AndroidInputInterface.h:116
#define check(expr)
Definition AssertionMacros.h:314
@ INDEX_NONE
Definition CoreMiscDefines.h:150
@ ForceInit
Definition CoreMiscDefines.h:155
#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
LANDSCAPE_API FLandscapeDebugOptions GLandscapeDebugOptions
Definition LandscapeRender.cpp:404
#define LANDSCAPE_MAX_SUBSECTION_NUM
Definition LandscapeRender.h:36
EMaterialParameterType
Definition MaterialParameters.h:187
FInt32Point FIntPoint
Definition MathFwd.h:124
#define DECLARE_TYPE_LAYOUT(T, Interface)
Definition MemoryLayout.h:557
EShaderPlatform
Definition RHIShaderPlatform.h:11
#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_GLOBAL_SHADER_PARAMETER_STRUCT
Definition ShaderParameterMacros.h:1663
#define SHADER_PARAMETER(MemberType, MemberName)
Definition ShaderParameterMacros.h:1684
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
#define UE_ARRAY_COUNT(array)
Definition UnrealTemplate.h:212
EVertexInputStreamType
Definition VertexFactory.h:128
#define DECLARE_VERTEX_FACTORY_TYPE_API(FactoryClass, ModuleApi)
Definition VertexFactory.h:553
uint32 Size
Definition VulkanMemory.cpp:4034
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 IConsoleManager.h:2026
Definition SceneViewExtension.h:266
Definition PrimitiveSceneProxy.h:211
Definition RenderResource.h:509
Definition LandscapeRender.h:702
FIntPoint SectionBase
Definition LandscapeRender.h:800
TUniformBuffer< FLandscapeUniformShaderParameters > LandscapeUniformShaderParameters
Definition LandscapeRender.h:881
TArray< int8 > MaterialIndexToStaticMeshBatchLOD
Definition LandscapeRender.h:845
TArray< int8 > LODIndexToMaterialIndex
Definition LandscapeRender.h:842
uint32 SharedBuffersKey
Definition LandscapeRender.h:830
int32 SubsectionSizeVerts
Definition LandscapeRender.h:787
int32 SubsectionSizeQuads
Definition LandscapeRender.h:785
TUniquePtr< FLandscapeLCI > ComponentLightInfo
Definition LandscapeRender.h:839
TArray< float > LODScreenRatioSquared
Definition LandscapeRender.h:765
float VirtualShadowMapConstantDepthBias
Definition LandscapeRender.h:859
float ComponentMaxExtend
Definition LandscapeRender.h:773
float HeightmapSubsectionOffsetV
Definition LandscapeRender.h:828
int32 LastVirtualTextureLOD
Definition LandscapeRender.h:771
int32 VisibilityWeightmapChannel
Definition LandscapeRender.h:818
FMatrix WorldToLocal
Definition LandscapeRender.h:884
friend FLandscapeRenderSystem
Definition LandscapeRender.h:750
FVector4f WeightmapScaleBias
Definition LandscapeRender.h:814
FLandscapeVertexFactory * VertexFactory
Definition LandscapeRender.h:832
FCollisionResponseContainer CollisionResponse
Definition LandscapeRender.h:873
int32 SimpleCollisionMipLevel
Definition LandscapeRender.h:871
TArray< FLandscapeBatchElementParams > StaticBatchParamArray
Definition LandscapeRender.h:805
bool bNaniteActive
Definition LandscapeRender.h:807
TArray< UTexture2D * > WeightmapTextures
Definition LandscapeRender.h:815
FName DebugName
Definition LandscapeRender.h:887
float WeightmapSubsectionOffset
Definition LandscapeRender.h:763
int32 ComponentSizeQuads
Definition LandscapeRender.h:789
int32 FirstLOD
Definition LandscapeRender.h:767
int32 NumRayTracingSections
Definition LandscapeRender.h:796
int32 NumSubsections
Definition LandscapeRender.h:783
FMatrix LocalToWorldNoScaling
Definition LandscapeRender.h:802
float StaticLightingResolution
Definition LandscapeRender.h:798
int32 CollisionMipLevel
Definition LandscapeRender.h:870
int32 ComponentSizeVerts
Definition LandscapeRender.h:794
float VirtualShadowMapInvalidationHeightErrorThreshold
Definition LandscapeRender.h:862
uint8 VirtualTexturePerPixelHeight
Definition LandscapeRender.h:762
static LANDSCAPE_API TMap< uint32, FLandscapeSharedBuffers * > SharedBuffersMap
Definition LandscapeRender.h:755
const FMeshBatch & GetGrassMeshBatch() const
Definition LandscapeRender.h:920
FLandscapeRenderSystem::LODSettingsComponent LODSettings
Definition LandscapeRender.h:777
int8 MaxLOD
Definition LandscapeRender.h:759
float HeightmapSubsectionOffsetU
Definition LandscapeRender.h:827
int32 FirstVirtualTextureLOD
Definition LandscapeRender.h:770
int8 NumWeightmapLayerAllocations
Definition LandscapeRender.h:760
bool bUsesLandscapeCulling
Definition LandscapeRender.h:808
int32 LightMapResolution
Definition LandscapeRender.h:878
TArray< double > WorldSpaceMipToMipMaxDeltas
Definition LandscapeRender.h:856
FMeshBatch GrassMeshBatch
Definition LandscapeRender.h:811
float InvLODBlendRange
Definition LandscapeRender.h:775
int32 LastLOD
Definition LandscapeRender.h:769
virtual int32 GetLightMapResolution() const override
Definition LandscapeRender.h:930
virtual uint32 GetMemoryFootprint() const override
Definition LandscapeRender.h:906
UTexture2D * VisibilityWeightmapTexture
Definition LandscapeRender.h:817
FLandscapeVertexFactory * FixedGridVertexFactory
Definition LandscapeRender.h:833
TArray< FMaterialRenderProxy * > AvailableMaterials
Definition LandscapeRender.h:836
uint8 StaticLightingLOD
Definition LandscapeRender.h:761
UTexture2D * HeightmapTexture
Definition LandscapeRender.h:825
FLandscapeSharedBuffers * SharedBuffers
Definition LandscapeRender.h:831
TArray< FLandscapeBatchElementParams > GrassBatchParams
Definition LandscapeRender.h:812
TArray< FMaterialRelevance > MaterialRelevances
Definition LandscapeRender.h:848
FVector4f HeightmapScaleBias
Definition LandscapeRender.h:826
Definition LandscapeRender.h:957
const UTexture2D * RedTexture
Definition LandscapeRender.h:960
const FLinearColor G
Definition LandscapeRender.h:964
const FMaterialRenderProxy *const Parent
Definition LandscapeRender.h:959
virtual bool GetParameterValue(EMaterialParameterType Type, const FHashedMaterialParameterInfo &ParameterInfo, FMaterialParameterValue &OutValue, const FMaterialRenderContext &Context) const
Definition LandscapeRender.h:991
virtual const FMaterial * GetMaterialNoFallback(ERHIFeatureLevel::Type InFeatureLevel) const override
Definition LandscapeRender.h:981
FLandscapeDebugMaterialRenderProxy(const FMaterialRenderProxy *InParent, const UTexture2D *TexR, const UTexture2D *TexG, const UTexture2D *TexB, const FLinearColor &InR, const FLinearColor &InG, const FLinearColor &InB)
Definition LandscapeRender.h:968
virtual const FMaterialRenderProxy * GetFallback(ERHIFeatureLevel::Type InFeatureLevel) const override
Definition LandscapeRender.h:986
const UTexture2D * GreenTexture
Definition LandscapeRender.h:961
const FLinearColor B
Definition LandscapeRender.h:965
const FLinearColor R
Definition LandscapeRender.h:963
const UTexture2D * BlueTexture
Definition LandscapeRender.h:962
Definition LandscapeRender.h:174
TArray< FLandscapeBatchElementParams, SceneRenderingAllocator > ElementParams
Definition LandscapeRender.h:176
Definition LandscapeRender.h:300
FLandscapeFixedGridVertexFactory(ERHIFeatureLevel::Type InFeatureLevel)
Definition LandscapeRender.h:304
static LANDSCAPE_API void ModifyCompilationEnvironment(const FVertexFactoryShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
Definition LandscapeRender.cpp:3772
Definition LandscapeRender.h:597
FLandscapeLODOverridesCustomRenderPassUserData(const TMap< uint32, int32 > &InLandscapeLODOverrides)
Definition LandscapeRender.h:601
IMPLEMENT_CUSTOM_RENDER_PASS_USER_DATA(FLandscapeLODOverridesCustomRenderPassUserData)
const TMap< uint32, int32 > & GetLandscapeLODOverrides() const
Definition LandscapeRender.h:606
Definition LandscapeRender.h:1135
virtual const FMaterialRenderProxy * GetFallback(ERHIFeatureLevel::Type InFeatureLevel) const override
Definition LandscapeRender.h:1155
virtual const FMaterial * GetMaterialNoFallback(ERHIFeatureLevel::Type InFeatureLevel) const override
Definition LandscapeRender.h:1151
virtual bool GetParameterValue(EMaterialParameterType Type, const FHashedMaterialParameterInfo &ParameterInfo, FMaterialParameterValue &OutValue, const FMaterialRenderContext &Context) const
Definition LandscapeRender.h:1160
FLandscapeLayerUsageRenderProxy(const FMaterialRenderProxy *InParent, int32 InComponentSizeVerts, const TArray< FLinearColor > &InLayerColors, float InRotation)
Definition LandscapeRender.h:1142
Definition LandscapeRender.h:1085
virtual const FMaterial * GetMaterialNoFallback(ERHIFeatureLevel::Type InFeatureLevel) const override
Definition LandscapeRender.h:1100
FLandscapeMaskMaterialRenderProxy(const FMaterialRenderProxy *InParent, const UTexture2D *InTexture, const bool InbInverted)
Definition LandscapeRender.h:1092
const UTexture2D * SelectTexture
Definition LandscapeRender.h:1088
virtual bool GetParameterValue(EMaterialParameterType Type, const FHashedMaterialParameterInfo &ParameterInfo, FMaterialParameterValue &OutValue, const FMaterialRenderContext &Context) const
Definition LandscapeRender.h:1109
const bool bInverted
Definition LandscapeRender.h:1089
virtual const FMaterialRenderProxy * GetFallback(ERHIFeatureLevel::Type InFeatureLevel) const override
Definition LandscapeRender.h:1104
const FMaterialRenderProxy *const Parent
Definition LandscapeRender.h:1087
Definition LandscapeRender.h:680
Definition LandscapeRender.h:616
int32 GetNumViewsWithShowCollision() const
Definition LandscapeRender.h:630
static TArray< FLandscapeRenderSystem * > GetLandscapeRenderSystems(const class FSceneInterface *InScene)
Definition LandscapeRender.h:419
virtual void GetSectionBoundsAndLocalToWorld(FBoxSphereBounds &LocalBounds, FMatrix &LocalToWorld) const =0
virtual float ComputeLODForView(const FSceneView &InView) const =0
virtual int32 GetComponentResolution() const
Definition LandscapeRender.h:436
virtual double ComputeSectionResolution() const
Definition LandscapeRender.h:430
virtual ~FLandscapeSectionInfo()=default
virtual void GetSectionCenterAndVectors(FVector &OutSectionCenterWorldSpace, FVector &OutSectionXVectorWorldSpace, FVector &OutSectionYVectorWorldSpace) const =0
virtual int32 GetSectionPriority() const
Definition LandscapeRender.h:426
virtual void OnRenderCoordsChanged(FRHICommandListBase &RHICmdList)=0
virtual const FPrimitiveSceneInfo * GetPrimitiveSceneInfo() const =0
virtual bool ShouldInvalidateShadows(const FSceneView &InView, float InLODValue, float InLastShadowInvalidationLODValue) const
Definition LandscapeRender.h:441
virtual float ComputeLODBias() const =0
Definition LandscapeRender.h:1037
const FMaterialRenderProxy *const Parent
Definition LandscapeRender.h:1039
virtual const FMaterialRenderProxy * GetFallback(ERHIFeatureLevel::Type InFeatureLevel) const override
Definition LandscapeRender.h:1054
FLandscapeSelectMaterialRenderProxy(const FMaterialRenderProxy *InParent, const UTexture2D *InTexture)
Definition LandscapeRender.h:1043
const UTexture2D * SelectTexture
Definition LandscapeRender.h:1040
virtual const FMaterial * GetMaterialNoFallback(ERHIFeatureLevel::Type InFeatureLevel) const override
Definition LandscapeRender.h:1050
virtual bool GetParameterValue(EMaterialParameterType Type, const FHashedMaterialParameterInfo &ParameterInfo, FMaterialParameterValue &OutValue, const FMaterialRenderContext &Context) const
Definition LandscapeRender.h:1059
Definition LandscapeRender.h:359
int32 NumIndexBuffers
Definition LandscapeRender.h:371
FIndexBuffer ** IndexBuffers
Definition LandscapeRender.h:387
FLandscapeVertexFactory * FixedGridVertexFactory
Definition LandscapeRender.h:377
FLandscapeVertexFactory * VertexFactory
Definition LandscapeRender.h:376
FRenderResource * TileMesh
Definition LandscapeRender.h:382
int32 NumVertices
Definition LandscapeRender.h:369
int32 SubsectionSizeVerts
Definition LandscapeRender.h:372
FVertexBuffer * TileDataBuffer
Definition LandscapeRender.h:384
void CreateIndexBuffers(FRHICommandListBase &RHICmdList, const FName &OwnerName)
Definition LandscapeRender.cpp:3277
FLandscapeIndexRanges * IndexRanges
Definition LandscapeRender.h:390
void CreateGrassIndexBuffer(FRHICommandListBase &RHICmdList, const FName &InOwnerName)
Definition LandscapeRender.cpp:3401
TArray< int32, TInlineAllocator< 8 > > GrassIndexMipOffsets
Definition LandscapeRender.h:394
int32 NumSubsections
Definition LandscapeRender.h:373
FLandscapeVertexFactory * TileVertexFactory
Definition LandscapeRender.h:383
int32 SharedBuffersKey
Definition LandscapeRender.h:370
bool bUse32BitIndices
Definition LandscapeRender.h:392
int32 NumRayTracingSections
Definition LandscapeRender.h:374
TArray< TUniformBuffer< FLandscapeFixedGridUniformShaderParameters > > LandscapeFixedGridUniformShaderParameters
Definition LandscapeRender.h:380
FIndexBuffer * GrassIndexBuffer
Definition LandscapeRender.h:393
FLandscapeVertexBuffer * VertexBuffer
Definition LandscapeRender.h:378
Definition LandscapeRender.h:325
virtual ~FLandscapeVertexBuffer()
Definition LandscapeRender.h:344
FLandscapeVertexBuffer(FRHICommandListBase &RHICmdList, ERHIFeatureLevel::Type InFeatureLevel, int32 InNumVertices, int32 InSubsectionSizeVerts, int32 InNumSubsections, const FName &InOwnerName)
Definition LandscapeRender.h:333
virtual void InitRHI(FRHICommandListBase &RHICmdList) override
Definition LandscapeRender.cpp:3229
Definition LandscapeRender.h:206
void GetElementShaderBindings(const class FSceneInterface *Scene, const FSceneView *InView, const class FMeshMaterialShader *Shader, const EVertexInputStreamType InputStreamType, ERHIFeatureLevel::Type FeatureLevel, const FVertexFactory *VertexFactory, const FMeshBatchElement &BatchElement, class FMeshDrawSingleShaderBindings &ShaderBindings, FVertexInputStreamArray &VertexStreams) const
Definition LandscapeRender.cpp:3655
Definition LandscapeRender.h:180
void Bind(const FShaderParameterMap &ParameterMap)
Definition LandscapeRender.h:187
void GetElementShaderBindings(const class FSceneInterface *Scene, const FSceneView *InView, const class FMeshMaterialShader *Shader, const EVertexInputStreamType InputStreamType, ERHIFeatureLevel::Type FeatureLevel, const FVertexFactory *VertexFactory, const FMeshBatchElement &BatchElement, class FMeshDrawSingleShaderBindings &ShaderBindings, FVertexInputStreamArray &VertexStreams) const
Definition LandscapeRender.cpp:3568
Definition LandscapeRender.h:227
virtual LANDSCAPE_API void InitRHI(FRHICommandListBase &RHICmdList) override
Definition LandscapeRender.cpp:3680
virtual ~FLandscapeVertexFactory()
Definition LandscapeRender.h:234
static LANDSCAPE_API bool ShouldCompilePermutation(const FVertexFactoryShaderPermutationParameters &Parameters)
Definition LandscapeRender.cpp:3699
FDataType Data
Definition LandscapeRender.h:281
static LANDSCAPE_API void GetPSOPrecacheVertexFetchElements(EVertexInputStreamType VertexInputStreamType, FVertexDeclarationElementList &Elements)
Definition LandscapeRender.cpp:3720
static LANDSCAPE_API void ModifyCompilationEnvironment(const FVertexFactoryShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
Definition LandscapeRender.cpp:3706
void SetData(const FDataType &InData)
Definition LandscapeRender.h:274
virtual void ReleaseResource() override final
Definition LandscapeRender.h:269
Definition SceneManagement.h:820
Definition SceneManagement.h:333
Definition LightSceneProxy.h:43
Definition MaterialRenderProxy.h:102
virtual const FMaterialRenderProxy * GetFallback(ERHIFeatureLevel::Type InFeatureLevel) const =0
Definition MaterialShared.h:2058
Definition MeshDrawShaderBindings.h:104
Definition MeshElementCollector.h:26
Definition MapBuildDataRegistry.h:56
FLightMapRef LightMap
Definition MapBuildDataRegistry.h:58
const FLightmapResourceCluster * ResourceCluster
Definition MapBuildDataRegistry.h:62
FShadowMapRef ShadowMap
Definition MapBuildDataRegistry.h:59
TArray< FGuid > IrrelevantLights
Definition MapBuildDataRegistry.h:60
Definition MeshMaterialShader.h:68
Definition NameTypes.h:617
Definition SceneManagement.h:1452
Definition PrimitiveSceneInfo.h:266
Definition PrimitiveSceneProxy.h:296
Definition RenderGraphBuilder.h:49
Definition RHICommandList.h:455
static FRHICommandListImmediate & Get()
Definition RHICommandList.h:5522
Definition RHIResources.h:1232
Definition RefCounting.h:252
Definition RenderResource.h:37
virtual RENDERCORE_API void ReleaseResource()
Definition RenderResource.cpp:206
void SetOwnerName(FName InOwnerName)
Definition RenderResource.h:120
RENDERCORE_API void UpdateRHI(FRHICommandListBase &RHICmdList)
Definition RenderResource.cpp:225
virtual RENDERCORE_API void InitResource(FRHICommandListBase &RHICmdList)
Definition RenderResource.cpp:178
Definition SceneInterface.h:106
Definition SceneViewExtension.h:274
Definition SceneView.h:2212
Definition SceneView.h:1425
Definition ShaderCore.h:323
Definition StaticMeshSceneProxy.h:34
Definition SceneManagement.h:1293
Definition RenderResource.h:474
Definition VertexFactory.h:172
Definition VertexFactory.h:661
Definition CustomRenderPass.h:33
Definition Array.h:670
UE_REWRITE SizeType Num() const
Definition Array.h:1144
Definition List.h:349
Definition UnrealString.h.inl:34
Definition DynamicRHIResourceArray.h:31
Definition ShaderParameterMacros.h:136
Definition UniformBuffer.h:29
Definition UniquePtr.h:107
Definition SceneRendererInterface.h:24
Definition LandscapeEditResourcesSubsystem.h:244
Definition MaterialInterface.h:296
Definition Texture2D.h:26
Definition World.h:918
@ LOD
Definition AnimTypes.h:107
Type
Definition PawnAction_Move.h:11
Definition SceneComponent.h:24
Type
Definition RHIFeatureLevel.h:20
@ SM5
Definition RHIFeatureLevel.h:42
Definition Landscape.h:55
bool NeedsFixedGridVertexFactory(EShaderPlatform InShaderPlatform)
Definition LandscapeRender.cpp:348
bool ShouldBuildGrassMapRenderingResources()
Definition LandscapeRender.cpp:365
Definition SceneView.h:41
Definition EngineTypes.h:1339
Definition Guid.h:109
Definition LandscapeRender.h:162
FUniformBufferRHIRef LandscapeSectionLODUniformParameters
Definition LandscapeRender.h:168
const TUniformBuffer< FLandscapeUniformShaderParameters > * LandscapeUniformShaderParametersResource
Definition LandscapeRender.h:166
int32 CurrentLOD
Definition LandscapeRender.h:170
const FLandscapeComponentSceneProxy * SceneProxy
Definition LandscapeRender.h:169
const TArray< TUniformBuffer< FLandscapeFixedGridUniformShaderParameters > > * FixedGridUniformShaderParameters
Definition LandscapeRender.h:167
Definition LandscapeRender.h:660
bool bShowPatches
Definition LandscapeRender.h:663
bool bDisableStatic
Definition LandscapeRender.h:664
Definition LandscapeComponent.h:57
Definition LandscapeRender.h:471
float LOD1ScreenSizeSquared
Definition LandscapeRender.h:473
int8 DrawCollisionPawnLOD
Definition LandscapeRender.h:479
float LODOnePlusDistributionScalarSquared
Definition LandscapeRender.h:474
int8 ForcedLOD
Definition LandscapeRender.h:478
int8 LastLODIndex
Definition LandscapeRender.h:477
float VirtualShadowMapInvalidationLimitLOD
Definition LandscapeRender.h:476
int8 DrawCollisionVisibilityLOD
Definition LandscapeRender.h:480
float LastLODScreenSizeSquared
Definition LandscapeRender.h:475
float LOD0ScreenSizeSquared
Definition LandscapeRender.h:472
Definition LandscapeRender.h:467
int32 GetSectionLinearIndex(FIntPoint InRenderCoord) const
Definition LandscapeRender.h:549
TMap< uint32, TResourceArray< float > > PerViewStateCachedSectionLODValues
Definition LandscapeRender.h:508
int8 ForcedLODOverride
Definition LandscapeRender.h:520
TArray< FLandscapeSectionInfo * > SectionInfos
Definition LandscapeRender.h:493
FLandscapeSectionInfo * GetSectionInfo(FIntPoint InRenderCoord)
Definition LandscapeRender.h:569
FUniformBufferRHIRef SectionLODUniformBuffer
Definition LandscapeRender.h:502
FBufferRHIRef SectionLODBiasBuffer
Definition LandscapeRender.h:499
TMap< UE::Renderer::Private::IShadowInvalidatingInstances *, TArray< const FPrimitiveSceneInfo * > > ShadowInvalidationRequests
Definition LandscapeRender.h:517
void SetSectionInfo(FIntPoint InRenderCoord, FLandscapeSectionInfo *InSectionInfo)
Definition LandscapeRender.h:561
uint32 FViewKey
Definition LandscapeRender.h:468
TMap< uint32, SectionKeyToLODValueMap > PerViewStateLastShadowInvalidationSectionLODValues
Definition LandscapeRender.h:514
FShaderResourceViewRHIRef SectionLODBiasSRV
Definition LandscapeRender.h:500
int32 RegisteredCount
Definition LandscapeRender.h:497
int32 SectionsRemovedSinceLastCompact
Definition LandscapeRender.h:529
static TBitArray LandscapeIndexAllocator
Definition LandscapeRender.h:485
FIntPoint Size
Definition LandscapeRender.h:490
FIntPoint Min
Definition LandscapeRender.h:489
bool IsValidCoord(FIntPoint InRenderCoord) const
Definition LandscapeRender.h:543
int32 ReferenceCount
Definition LandscapeRender.h:495
TMap< const FSceneView *, TResourceArray< float > > PerViewCachedSectionLODValues
Definition LandscapeRender.h:507
int32 LandscapeIndex
Definition LandscapeRender.h:487
TResourceArray< float > SectionLODBiases
Definition LandscapeRender.h:492
Definition LandscapeRender.h:362
int32 MaxIndexFull
Definition LandscapeRender.h:366
int32 MinIndex[LANDSCAPE_MAX_SUBSECTION_NUM][LANDSCAPE_MAX_SUBSECTION_NUM]
Definition LandscapeRender.h:363
int32 MinIndexFull
Definition LandscapeRender.h:365
int32 MaxIndex[LANDSCAPE_MAX_SUBSECTION_NUM][LANDSCAPE_MAX_SUBSECTION_NUM]
Definition LandscapeRender.h:364
Definition LandscapeRender.h:241
FVertexStreamComponent PositionComponent
Definition LandscapeRender.h:243
Definition LandscapeRender.h:314
uint8 SubX
Definition LandscapeRender.h:317
uint8 VertexY
Definition LandscapeRender.h:316
uint8 VertexX
Definition LandscapeRender.h:315
uint8 SubY
Definition LandscapeRender.h:318
Definition Color.h:48
Definition MaterialParameters.h:341
Definition MaterialShared.h:349
Definition MaterialParameters.h:96
Definition MeshBatch.h:232
Definition MeshBatch.h:371
Definition PrimitiveViewRelevance.h:14
Definition ShaderCore.h:544
Definition MeshMaterialShader.h:44
Definition VertexStreamComponent.h:22
Definition ObjectPtr.h:488
Definition PimplPtr.h:50
Definition BoxSphereBounds.h:25
Definition IntPoint.h:25
static CORE_API const TVector< double > ZeroVector
Definition Vector.h:79