Commit Graph

344 Commits

Author SHA1 Message Date
dmitriy dyomin
35dc9373cd Fixed: Water surfaces are not aligned between seams across the map on Android
Use Landscape LOD1 for water texture capture. Inline bottom 5 LOD for landscape mesh, similar to texture based landscape which always has 64x64 mip available

#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 20339695 via CL 20339785 via CL 20339815 via CL 20340013 via CL 20340045
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20341634 by dmitriy dyomin in ue5-main branch]
2022-05-23 19:36:03 -04:00
Jeremy Moore
56c1635428 Landscape fills in velocity in view relevance.
This allows it to write velocity when editor moving or when r.Velocity.ForceOutput is set.
#preflight 628668fc2b53e2be4cafd7b4

[CL 20282648 by Jeremy Moore in ue5-main branch]
2022-05-19 12:51:53 -04:00
jonathan bard
74339cb8d8 Fixed crash when trying to access the visibility landscape mask on mobile : when the mobile mesh path is enabled, there's no such texture.
This  means that GlobalDistanceField will not support landscape visibility.

#rb tiago.costa
#jira UE-151879
#preflight 627ea947ca3b90fc14f3c97a

[CL 20186403 by jonathan bard in ue5-main branch]
2022-05-13 15:01:48 -04:00
tiago costa
32d5949195 Fix heighmap visibility not available when building Global Distance Field in cooked builds
- determine which layer contains visibility mask using UMaterialExpressionLandscapeVisibilityMask::ParameterName.

#jira UE-117168
#rb jeremy.moore
#preflight 627cbcf4ef598237b26c63d8

[CL 20161876 by tiago costa in ue5-main branch]
2022-05-12 04:22:16 -04:00
Wei Liu
355707489e Refactor of mobile custom depth/stencil to line up with pc on all mobile platform.
#jira none

#rb Dmitriy.Dyomin
#fyi Serge.Bernier
#preflight 627b87a65d003338d95018bf

[CL 20135905 by Wei Liu in ue5-main branch]
2022-05-11 06:10:52 -04:00
Jason Nadro
fc3dcee397 Restore backed out CL, with fixes.
Also restores follow-up CLs 19973746, 19973782
FStaticParameterSet::MaterialLayers can't be deprecated, since a property with the same name is included via FStaticParameterSetRuntimeData
So instead, FMaterialLayersFunctionsRuntimeData is updated with SerializeFromMismatchedTag, to allow serializing a full FMaterialLayersFunction.
When this happens, the EditorOnly portion is stored in a separate heap allocation, and then transferred to FStaticParameterSet::EditorOnly::MaterialLayers
#preflight 626c3405e31dbb512cef1e98

[Backout] - CL19973745
#fyi bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL19964485
#fyi Ben.Ingram
Original CL Desc
-----------------------------------------------------------------
Add 'Optional' EditorOnly data for UMaterialInterface and UMaterialFunctionInterface
These are separate UObject hierarchies that store editor-only UPROPERTIES, but can be included with cooked content, which allows full editor support.
In principle, all editor-only properties could be moved over.  So far, this has been limited to UMaterialExpressions, and data related to material parameters.
FStaticParameterSet, FMaterialLayersParameters, and FMaterialCachedExpressionData have all been split into separate editor-only/non-editor-only classes,
which allows the editor-only portion to be stored on the optional editor-only UObject.
#preflight 626ab21dad56c0cbbea32dc4
#rb jason.nadro, francis.hurteau
#jira FORT-463329

[CL 20043286 by Jason Nadro in ue5-main branch]
2022-05-04 12:21:52 -04:00
bob tellez
34d8d5badd [Backout] - CL19964485
#fyi Ben.Ingram
Original CL Desc
-----------------------------------------------------------------
Add 'Optional' EditorOnly data for UMaterialInterface and UMaterialFunctionInterface
These are separate UObject hierarchies that store editor-only UPROPERTIES, but can be included with cooked content, which allows full editor support.
In principle, all editor-only properties could be moved over.  So far, this has been limited to UMaterialExpressions, and data related to material parameters.
FStaticParameterSet, FMaterialLayersParameters, and FMaterialCachedExpressionData have all been split into separate editor-only/non-editor-only classes,
which allows the editor-only portion to be stored on the optional editor-only UObject.
#preflight 626ab21dad56c0cbbea32dc4
#rb jason.nadro, francis.hurteau
#jira FORT-463329

[CL 19973745 by bob tellez in ue5-main branch]
2022-04-28 20:08:12 -04:00
Ben Ingram
448b0a9807 Add 'Optional' EditorOnly data for UMaterialInterface and UMaterialFunctionInterface
These are separate UObject hierarchies that store editor-only UPROPERTIES, but can be included with cooked content, which allows full editor support.
In principle, all editor-only properties could be moved over.  So far, this has been limited to UMaterialExpressions, and data related to material parameters.
FStaticParameterSet, FMaterialLayersParameters, and FMaterialCachedExpressionData have all been split into separate editor-only/non-editor-only classes,
which allows the editor-only portion to be stored on the optional editor-only UObject.
#preflight 626ab21dad56c0cbbea32dc4
#rb jason.nadro, francis.hurteau
#jira FORT-463329

[CL 19964485 by Ben Ingram in ue5-main branch]
2022-04-28 12:56:28 -04:00
jonathan bard
eef2ebfe60 Removed dead code
#rb trivial

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 19648420 via CL 19648663 via CL 19648805
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19651288 by jonathan bard in ue5-main branch]
2022-04-06 13:48:33 -04:00
michael balzer
d1e3171eb7 Landscape: Fix static analysis warning in DumpLODs code
#jira UE-147669
#preflight 624c904f3661c8f04a1800db

[CL 19631871 by michael balzer in ue5-main branch]
2022-04-05 17:23:00 -04:00
jonathan bard
34ebfefd2c Temporarily removed asserts about unreported weightmap textures in ULandscapeComponent::GetStreamingRenderAssetInfo
#rb luc.eygasier

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 19625117 via CL 19625126 via CL 19625144
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19626711 by jonathan bard in ue5-main branch]
2022-04-05 12:07:04 -04:00
jonathan bard
f3db191129 Fixed mem report texture usage computation for landscape components :
* HeightmapTexture / XYOffsetmapTexture, which are only used on the non-mobile path, were artificially increasing the ref counts on platforms where mobile and non-mobile paths are enabled (in mobile mode)
* Weightmap[0], which contains the normal map in mobile mode, was not accounted for by the material instance's GetUsedTextures call, since it uses inlined hlsl code to sample it, rather than a texture sample material expression

#rb luc.eygasier
#preflight 624b3cd93a5a4c1622fbce4d

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 19622232 via CL 19622252 via CL 19622255
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19622575 by jonathan bard in ue5-main branch]
2022-04-05 07:00:19 -04:00
michael balzer
c2d788f5cc Landscape: Fix Static Analysis warning for re-added DumpLODs functionality
#jira UE-147669
#preflight 624b5db3f4217035fabba704
#rb none

[CL 19615171 by michael balzer in ue5-main branch]
2022-04-04 17:18:34 -04:00
michael balzer
24461121a1 Landscape: Resurrect Landscape.DumpLODs console command functionality
#preflight 623e50fb610771b0f5b1a69e
#rb jonathan.bard

[CL 19559571 by michael balzer in ue5-main branch]
2022-03-30 13:14:58 -04:00
dmitriy dyomin
d5741f624b Added option to disable usage of a baked landscape mesh on mobile platforms (r.Mobile.LandscapeMesh)
#rb jack.porter

#ROBOMERGE-OWNER: dmitriy.dyomin
#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 19528072 via CL 19528235 via CL 19528695 via CL 19528703
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)

[CL 19532768 by dmitriy dyomin in ue5-main branch]
2022-03-28 16:28:57 -04:00
jonathan bard
a5e071e72b Removed async task for computing landscape component LOD biases to fix race condition: the task was started at the beginning of the render thread frame and synced when starting to render view family/views. But the task was operating on UTextures, which could have their internal FTextureResource pointer updated within that lapse of time, leading to a crash if GetNumMips() / GetNumResidentMips() was executed at the same time
Furthermore, there's no per-view async task anymore so there was no point in kicking off that async task in BeginRenderViewFamily_RenderThread (which was the right thing to do, since at this point, FTextureResource pointers couldn't be modified by render commands happening between BeginFrame_RenderThread and BeginRenderViewFamily_RenderThread) and waiting after in that same function since no other parallel work was to be executed anyway. The job was less than 0.1ms on console anyway so the necessity to have this running asynchronously was questionable in the first place.

#rb sebastien.lussier
#preflight 62332ddbf41c515c37258422

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 19420534 via CL 19429013 via CL 19429156
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v930-19419903)

[CL 19432567 by jonathan bard in ue5-main branch]
2022-03-18 02:33:01 -04:00
bob tellez
1616e74ed4 Partial merge of 18585161 to finish the backout of 18394343 in FNMain
[FYI] Sebastien.Lussier,Jeremy.Moore

#ROBOMERGE-AUTHOR: bob.tellez
#ROBOMERGE-SOURCE: CL 19387136 via CL 19389475 via CL 19398546 via CL 19398611
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19403768 by bob tellez in ue5-main branch]
2022-03-16 03:47:18 -04:00
chris kulla
f4c4970e96 Unify GPU Lightmass shader selection with Path tracing
The logic was nearly identical between both cases, refactoring allows us to share more code and remove virtual calls from FRayTracingMeshProcessor.

Also cleanup the way supported Vertex Factory types are detected by adding a new vertex factory flag.

#rb Juan.Canada
#preflight 6227967d31133a23da4a56bf

[CL 19305870 by chris kulla in ue5-main branch]
2022-03-08 13:03:14 -05:00
rob krajcarski
030deeb136 Fix for crash with landscapes when using -rhivalidation. Ensures that the RHIBuffer is held for the life of the frame because not all RHI backends will have the SRV maintain a hard reference to the source buffer
#jira UE-143221
#rb mihnea.balta
#preflight 621fcf56e15c51d8c50b9b9a
#lockdown michal.valient

#ROBOMERGE-AUTHOR: rob.krajcarski
#ROBOMERGE-SOURCE: CL 19228270 in //UE5/Release-5.0/... via CL 19229143
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19231609 by rob krajcarski in ue5-main branch]
2022-03-02 17:32:07 -05:00
tiago costa
78e7d11184 Fix incorrect heightfield data in Global Distance Field
Context:
- When texture is compiling, renderer uses a default texture instead.
- Compiling state is not reflected in bHasStreamingUpdatePending
- Distance to heightfield calculation involves a projection onto the heightfield normal which is incorrect when using default texture, resulting in distance to be 0 everywhere inside the heightfield xy bounds.

Change:
- check if HeightmapTexture->IsCompiling() in FLandscapeComponentSceneProxy::HeightfieldHasPendingStreaming().
- Only add primitive heightfield to UpdateRegionHeightfield if texture is not streaming or compiling.

#jira UE-142890
#preflight 620e18833609e193715f7e95
#rb Krzysztof.Narkowicz
#lockdown juan.canada

#ROBOMERGE-AUTHOR: tiago.costa
#ROBOMERGE-SOURCE: CL 19068236 in //UE5/Release-5.0/... via CL 19087982
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19130422 by tiago costa in ue5-main branch]
2022-02-24 18:42:28 -05:00
jonathan bard
1889612bd6 Fixed warning with debug shader not being excluded from landscape thumbnail renders
#rb trivial
#jira none
#preflight 6214c3127e789518f7df4350

[CL 19070614 by jonathan bard in ue5-main branch]
2022-02-22 06:15:34 -05:00
robert millar
5811293e2a Add TargetRules.bFNameOutlineNumber as an option to reduce the size of FName by 4 bytes by storing the number in the name table.
Adds a define UE_FNAME_OUTLINE_NUMBER.
Removes of FName, FMinimalName from memory image support. Adds of FMemoryImageName.
Removal of FMinimalName operator<<, all fields made private, size made variable.
All fields of FScriptName made private.
Added console commands for dumping numbered/unnumbered names and stats.

#rb johan.torp

#ROBOMERGE-OWNER: robert.millar
#ROBOMERGE-AUTHOR: robert.millar
#ROBOMERGE-SOURCE: CL 19058026 via CL 19058611 via CL 19058656 via CL 19061727 via CL 19061740 via CL 19064047
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v918-19018356)

[CL 19066701 by robert millar in ue5-main branch]
2022-02-21 02:35:48 -05:00
ola olsson
1e2e7de5aa Fix missing VSM invalidations (where the primitive transform is not updated, but e.g., a skinned mesh is animating)
- Add bHasDeformableMesh to FPrimitiSceneProxy to declare if the meshes are deformed, e.g., skeletal mesh, to be able to catch this case.
- also fix incorrect tracking of revealed primitives (causes invalidation errors with missing shadows when meshes are culled on the CPU).
- Add cvar switch to turn off the new behavior (for emergency use) r.Shadow.Virtual.Cache.DeformableMeshesInvalidate (defaults to 1)

#jira UE-133211
#rb andrew.lauritzen
#preflight 620389584c05b86e6d60185a
#lockdown juan.canada

#ROBOMERGE-AUTHOR: ola.olsson
#ROBOMERGE-SOURCE: CL 18915487 in //UE5/Release-5.0/... via CL 18920329 via CL 18922688
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v916-18915374)

[CL 18923422 by ola olsson in ue5-main branch]
2022-02-09 15:11:16 -05:00
tiago costa
52b54ca696 Remove unused data from HeightfieldDescriptions buffer.
Remove unused param from ComposeHeightfieldsIntoPagesCS.
Added const keyword to GetHeightfieldRepresentation(...)
Remove TexCreate_RenderTargetable flag from VisualizeDistanceField texture since it is only used as UAV.

#fyi daniel.wright
#preflight 6202bbbd121599bf437e90a7

[CL 18906762 by tiago costa in ue5-main branch]
2022-02-08 14:04:52 -05:00
robert manuszewski
97b5e82c0b Deprecating EInternalObjectFlags::PendingKill. Making sure iterators use the appropriate flags based on the current state of PendingKill being enabled or not.
#preflight 61f8f33d537702981c352c7a
#rb Steve.Robb

#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 18806353 in //UE5/Release-5.0/... via CL 18808526 via CL 18821789
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18822151 by robert manuszewski in ue5-main branch]
2022-02-02 02:21:12 -05:00