Commit Graph

218 Commits

Author SHA1 Message Date
jonathan bard
08586534f9 Made ULandscapeInfo members properly set outside of editor and for PIE worlds
#tests UEENGQA-71560
#jira UE-149384
#preflight 62a3a1c1945c4467b54e93a0
#rb aurel.cordonnier
#lockdown

#ROBOMERGE-OWNER: jonathan.bard
#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 20675719 in //UE5/Release-5.0/... via CL 20680564
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20681013 by jonathan bard in ue5-main branch]
2022-06-16 01:02:57 -04:00
sebastien lussier
afc6e8acb4 Check if FSlateApplicationBase is initialized before accessing it
#rb patrick.enfedaque

#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 20574660 via CL 20574862 via CL 20575046
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v954-20466795)

[CL 20577169 by sebastien lussier in ue5-main branch]
2022-06-09 11:04:54 -04:00
jonathan bard
7fab0a0a4d Landscape fixes :
* Fixed ASan issue with dirty data (weightmap/heightmap texture resolving debugging code) by removing usage of lambda in favor of direct call to the dirty function
* Fixed redundant ifdefs and invalid comments
* Removed overallocation of material instances array (was previously done to account for hardware tessellation which doesn't exist anymore)
* Renamed FLandscapeEditLayerReadbackResult to FLandscapeEditLayerComponentReadbackResult to better match what it actually is and changed the output type of readback results from ResolveLayersTexture from a map to an array, because a map was overkill and it allows to batch-handle readbacks in UpdateForChangedWeightmaps / UpdateForChangedHeightmaps

#rb luc.eygasier
#jira UE-155857
#preflight 629f721485333f26644f8c2b

[CL 20553846 by jonathan bard in ue5-main branch]
2022-06-08 05:53:34 -04:00
jonathan bard
8499e1d3fe Landscape fix : replaced usage of TSet<TWeakPtr<...>> by TArray<TWeakPtr<...>> because the former will have invalid results until re-hashing after pointers expire.
#rb luc.eygasier
#preflight 6296587b9d75300f41b84cad

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 20451078 via CL 20451104 via CL 20451120
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v952-20449836)

[CL 20460446 by jonathan bard in ue5-main branch]
2022-06-01 18:04:44 -04:00
zach bethel
c176b233da Renamed CopyTextureWithTransitions to TransitionAndCopyTexture.
#preflight 6287ddfe8828ea88c8701eea

[CL 20303093 by zach bethel in ue5-main branch]
2022-05-20 17:14:41 -04:00
jonathan bard
64f30d41a2 Added support for non-square heightmaps in landscape edit layers local merge
#rb luc.eygasier
#jira UE-145722
#preflight 6284fb021f474f0660ecbf70

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 20281291 via CL 20282922 via CL 20283132
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20285715 by jonathan bard in ue5-main branch]
2022-05-19 15:37:35 -04:00
jonathan bard
b6620fed9b Changed landscape edit layers streaming textures tracking to weak object pointers in order to avoid preventing worlds being dynamically unloaded (e.g. world composition) to hold references to internal landscape textures
#rb luc.eygasier
#jira UE-150092
#preflight 6283c1fb114e08fa2f20c011

[CL 20244624 by jonathan bard in ue5-main branch]
2022-05-17 11:56:30 -04:00
jonathan bard
62f566009a Fixed random crash ocurring in HLOD builder commandlet, where we're hashing landscape texture source data while potentially asynchronously building textures. UTexture2D::GetSizeX() / UTexture2D::GetSizeY() should be prevented in those cases, since unlike in the landscape editor, nothing ensures that FinishCachePlatformData() is called on those textures and the returned sizes end up being wrong / thread-unsafe.
Also fixed a couple of places where we were not using the FTextureSource's data (even though those calls should be fine since they happen in a place where texture compilation is done)

#rb paul.chipchase
#jira UE-150653
#preflight 62829ff6216d06861f3b7ca9

[CL 20239776 by jonathan bard in ue5-main branch]
2022-05-17 05:21:54 -04:00
zach bethel
2156756315 Replaced use of CopyToResolveTarget with CopyTexture.
#preflight 627a90ff7e5f24d1edd73422
#rb luke.thatcher, jason.hoerner

[CL 20127337 by zach bethel in ue5-main branch]
2022-05-10 14:47:34 -04:00
jonathan bard
e479ed3735 Fixed bHasLayersContent not being set properly for the main ALandscape actor in distributed landscape setups (One ALandscape, multiple ALandscapeStreamingProxy actors).
This meant that the test in ALandscapeProxy::PostRegisterAllComponents() to know whether data migration (from non-edit layers to edit layers) should occur, which relies on the cached value bHasLayersContent (which was always false in that case, since there's no landscape component in the ALandscape) and the result of virtual function HasLayersContent() (overridden in ALandscape::HasLayersContent to return true if there's at least one registered landscape edit layer) was always forcing data migration to occur, which would do nothing (no landscape component, hence, no data to migrate) but was still marking the level as dirty

#rb patrick.enfedaque
#preflight 627a67a610766ef8c1f3d590

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 20123696 via CL 20123706 via CL 20123718
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20125767 by jonathan bard in ue5-main branch]
2022-05-10 13:53:26 -04:00
zach bethel
10131e1285 Refactored RDG in preparation for UnifiedBuffer conversions.
- Refactord 'Finalized Access' feature into a more flexible 'External' vs. 'Internal' access mode per resource toggle.
      - Resources can transition between modes multiple times within the graph.
      - Supports async compute pipeline.
      - Supports queueing of requests to avoid back-to-back helper passes.
      - This feature is needed to support conversion of GPU scene buffers.

 - Deprecated the ReadOnly and ForceTracking resource flags and added a 'SkipTracking' flag instead.
      - Previous semantics were confusing and error prone.
      - New model requires a manual flag to tell RDG never to transition a resource.
      - This flag is used for read-only dummy resources as an optimization.

 - Renamed some of the auxiliary 'FinalizedResource' utilities since the name no longer matches the semantics.

#preflight 6266cc6d0634d0904ce4ba46

[CL 19904734 by zach bethel in ue5-main branch]
2022-04-25 13:00:12 -04:00
jonathan bard
72505dc8ac * Added common function for whether landscape edit layers are supported on a given platform
* Added landscape runtime utils for this (the function is needed for global shaders, which have to live in a runtime module)

#jira UE-147655
#preflight 625dc7c4804460ab0fdb9fdf
#rb semion.piskarev

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 19806837 via CL 19806839 via CL 19806842
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v939-19570697)

[CL 19811850 by jonathan bard in ue5-main branch]
2022-04-19 13:19:03 -04:00
michael balzer
a942806ea1 Landscape: Change LogLandscape default verbosity from Warning to Log
#preflight 623e4e9f6d39f6b5a0622c12
#rb jonathan.bard

[CL 19542148 by michael balzer in ue5-main branch]
2022-03-29 10:50:47 -04:00
michael balzer
d2959cc79a Landscape: Resolve static analysis warning in LandscapeEditLayers.cpp
#jira UE-146921
#preflight 623bce4ec73745c600c5432b
#rb jonathan.bard

[CL 19496705 by michael balzer in ue5-main branch]
2022-03-24 11:50:59 -04:00
jonathan bard
a3842f01e1 Added support for subsections in landscape edit layers local merge
#rb luc.eygasier
#preflight 6228ad81695c94f981cf0ce3

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 19319842 via CL 19320693 via CL 19323505 via CL 19323665
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19348040 by jonathan bard in ue5-main branch]
2022-03-10 21:51:08 -05:00
luc eygasier
643ed6eea9 Undo //UE5/Main/Engine/Source/... changelist 19235312
Fixes uninitialized member in FLandscapePerLODMaterialOverride

#rb Jonathan.Bard
#jira UE-144566
#preflight 6220c3397e0217a606ee7545

Original CL Desc
* Removed incomplete per-platform per-LOD level material overrides for landscape. The code isn't meant to support that since material instances are built at edit-time. We would need to somewhat hack it at cook time in order to regenerate (and recompile) the list of material instances per-platform, which is not a recommended thing to to in the engine. Instead, we choose to simply make the per-LOD level material overrides constant across platforms since the recommended way is to customize the material for platforms using material expressions such as Quality Level switc, Shading Path Switc or Feature Level Switc.
* Deprecated/merged FLandscapeComponentMaterialOverride and FLandscapeProxyMaterialOverride into FLandscapePerLODMaterialOverride since they were identical
* Fixed UpdateLayersMaterialInstances which, unlike UpdateMaterialInstances, didn't take into account per-component material overrides

[CL 19242882 by luc eygasier in ue5-main branch]
2022-03-03 08:55:00 -05:00
eric mcdaniel
78d6c0d3f5 [Backout] - CL19230219
#rb none
#jira UE-144566
#preflight 62200fba943787f1d21ae8ae

#fyi luc.eygasier, Jonathan.Bard
Original CL Desc
-----------------------------------------------------------------
* Removed incomplete per-platform per-LOD level material overrides for landscape. The code isn't meant to support that since material instances are built at edit-time. We would need to somewhat hack it at cook time in order to regenerate (and recompile) the list of material instances per-platform, which is not a recommended thing to to in the engine. Instead, we choose to simply make the per-LOD level material overrides constant across platforms since the recommended way is to customize the material for platforms using material expressions such as Quality Level switc, Shading Path Switc or Feature Level Switc.
* Deprecated/merged FLandscapeComponentMaterialOverride and FLandscapeProxyMaterialOverride into FLandscapePerLODMaterialOverride since they were identical
* Fixed UpdateLayersMaterialInstances which, unlike UpdateMaterialInstances, didn't take into account per-component material overrides

From shelve 17931928 on behalf on Jonathan.Bard

#rb Jonathan.Bard
#jira UE-132031
#preflight 621cd5cd49723678579d9ec1

#ROBOMERGE-OWNER: luc.eygasier
#ROBOMERGE-AUTHOR: luc.eygasier
#ROBOMERGE-SOURCE: CL 19221589 via CL 19223810 via CL 19223838 via CL 19226205
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19235312 by eric mcdaniel in ue5-main branch]
2022-03-02 20:08:32 -05:00
luc eygasier
e78d41114a * Removed incomplete per-platform per-LOD level material overrides for landscape. The code isn't meant to support that since material instances are built at edit-time. We would need to somewhat hack it at cook time in order to regenerate (and recompile) the list of material instances per-platform, which is not a recommended thing to to in the engine. Instead, we choose to simply make the per-LOD level material overrides constant across platforms since the recommended way is to customize the material for platforms using material expressions such as Quality Level switc, Shading Path Switc or Feature Level Switc.
* Deprecated/merged FLandscapeComponentMaterialOverride and FLandscapeProxyMaterialOverride into FLandscapePerLODMaterialOverride since they were identical
* Fixed UpdateLayersMaterialInstances which, unlike UpdateMaterialInstances, didn't take into account per-component material overrides

From shelve 17931928 on behalf on Jonathan.Bard

#rb Jonathan.Bard
#jira UE-132031
#preflight 621cd5cd49723678579d9ec1

#ROBOMERGE-OWNER: luc.eygasier
#ROBOMERGE-AUTHOR: luc.eygasier
#ROBOMERGE-SOURCE: CL 19221589 via CL 19223810 via CL 19223838 via CL 19226205
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19230219 by luc eygasier in ue5-main branch]
2022-03-02 16:51:01 -05:00
Ben Ingram
b6f8dbd89b Use HLSLTree to generate cached data when using new HLSL translator
This allows cached data to be based on expressions that are active/connected
#rb none
#jira none
#preflight 621fce7831454c90cc079dd2

[CL 19227403 by Ben Ingram in ue5-main branch]
2022-03-02 15:20:48 -05:00
jonathan bard
dc0273093d Landscape edit layers local merge fixes :
* Fixed assert when updating heightmaps of different sizes
* Fixed crash when deleting components : the deleted components were still referenced in the shared weightmap texture usages

Misc:
* Properly delete edit layers heightmaps and weightmaps when deleting landscape components

#rb luc.eygasier
#jira UE-140551
#preflight 62164eea37178b0175ac9cf9

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 19094154 via CL 19100022 via CL 19100646 via CL 19109891
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19147208 by jonathan bard in ue5-main branch]
2022-02-25 10:09:16 -05:00
Jason Nadro
dcd55e3f15 Fix Game Thread and Render Thread access issues when performing shader compilation using FMaterial.
- SubmitCompileJobs was assumed to be render thread only.  Make this explicit in the function name and add a render thread check.
- Add SubmitCompileJobs_GameThread to perform shader compilation submitted from the Game Thread safe.
- Keep a ref to a GameThreadPendingCompilerEnvironment because the one on the GameThreadShaderMap goes away after we clone.
- Add render thread check to GetRuntimeVirtualTextureOutputAttibuteMask_RenderThread
- Move simple enum types from ShaderCompiler.h to ShaderCompilerCore.h so we can access EShaderCompileJobPriority in MaterialShared.h
- Fixup incorrect usage SubmitCompileJobs that was submitted from the Game Thread using the Render Thread maps.

#rb Ben.Ingram
#jira none
#preflight 6216879fdb60b6b592f1d97f

[CL 19098715 by Jason Nadro in ue5-main branch]
2022-02-23 14:59:45 -05:00
sebastien lussier
245f347384 #jira UE-132273
WorldPartition - Added Lanscape HLODs

Created a custom HLOD builder for ULandscapeComponent
* Landscape LOD used to generate the HLOD is autocomputed from the expected draw distance, same for the baked texture size

* Expose ALandscapeProxy::GetLODScreenSizeArray()
* Actually reverting changes done in CL 18794652 (moving proxy mesh creation back to ALandscapeProxy)
* ComputeLayerHash() now takes a bool to choose if we want to compute the hash for edition or runtime data
#preflight 620a60a1583261b0a6539c22
#rb Patrick.Enfedaque

#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 18980225 in //UE5/Release-5.0/... via CL 18980661 via CL 18981014
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18981050 by sebastien lussier in ue5-main branch]
2022-02-14 12:02:22 -05:00
christopher waters
343ba94423 Deprecating RHI*CommandList::SetComputeShader and switching uses to the PSO cache's SetComputePipelineState. This is to get compute shaders in our PSO cache lists as well as move towards ComputePipelineState as the default binding method.
#jira none
#rb arciel.rekman, mihnea.balta, jeannoe.morissette
#preflight 6202a549e85c7a08bbee815f

[CL 18905326 by christopher waters in ue5-main branch]
2022-02-08 13:19:37 -05:00
fred kimberley
7fbfaf57c8 Require explicit constructors/casts when converting between FVector, FVector3d, and FVector3f.
#jira UE-122078
#rb Andrew.Davidson, Colin.McGinley
#preflight standard build

#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 18817999 in //UE5/Release-5.0/... via CL 18818012 via CL 18822871
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18824721 by fred kimberley in ue5-main branch]
2022-02-02 07:59:31 -05:00
andrew davidson
8e95b10069 Fix FVector2D variant casts - Runtime
Submitted on behalf of fred.kimberley
#rb andy.davidson
#preflight 61f8729a5a026d2d19bb9ca6
#preflight 61f87a025a026d2d19be76ed

#ROBOMERGE-OWNER: andrew.davidson
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18802361 in //UE5/Release-5.0/... via CL 18802891 via CL 18821557
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18821641 by andrew davidson in ue5-main branch]
2022-02-02 01:47:07 -05:00