Commit Graph

94 Commits

Author SHA1 Message Date
Jimmy Andrews
42244fd882 fix crash in Geometry Collection Proxy when we try to use GetPrimitiveSceneInfo() to get the general hitproxy color for the collection, but it returns null
#preflight 62968c1e9d75300f41bfe60a

[CL 20444420 by Jimmy Andrews in ue5-main branch]
2022-05-31 19:24:34 -04:00
Jimmy Andrews
c72601ba18 fix geometry collection hit proxies when bone selection is not enabled
#jira UE-153186

#rb cedric.caillaud
#preflight 628bf826016e5daa1cd3b008

[CL 20343691 by Jimmy Andrews in ue5-main branch]
2022-05-23 22:53:11 -04:00
evgenii babinets
b98b25b1ba Enabling ISPC on more supporting platforms, but defaulting all per-system toggles to off besides cloth, since most of those show a regression so we'll start conservative and enable only for cloth for now.
This saves about ~40% of the cloth simulation cost.

#rb jeff.newquist

#ROBOMERGE-OWNER: evgenii.babinets
#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 20294167 via CL 20294181 via CL 20295375 via CL 20295420
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20305169 by evgenii babinets in ue5-main branch]
2022-05-20 18:55:54 -04:00
Jeremy Moore
ff967b1163 Remove PRIMITIVE_SCENE_DATA_FLAG_DRAWS_VELOCITY and only use PRIMITIVE_SCENE_DATA_FLAG_OUTPUT_VELOCITY.
Tidy up use of FPrimitiveSceneProxy velocity getters.
Now DrawsVelocity() is only for velocity relevance.
And HasDynamicTransform() is for determining if we need to store previous transform state.
VSM caching was using PRIMITIVE_SCENE_DATA_FLAG_DRAWS_VELOCITY so replaced that with PRIMITIVE_SCENE_DATA_FLAG_SHOULD_CACHE_SHADOW which should use the old behavior and can be tweaked in future using ShouldCacheShadow().

A common pattern for determining whether to output velocity now is to check if a previous transform exists, and to OR in AlwaysHasVelocity().
I found some proxy types that don't check for previous transform.
Also I found that the debug physics aggregate types *never* check for previous transform.
These are pre-existing potential bugs for fixing in another pass.

Also I found some proxies that don't currently fill out velocity relevance.
These are pre-existing potential bugs for fixing in another pass.

#preflight 62863f789016c6dd897f1cd2
#fyi andrew.lauritzen

[CL 20279797 by Jeremy Moore in ue5-main branch]
2022-05-19 10:08:15 -04:00
Tiantian Xie
aa420c06ae Fix geometry collection regression
#jira none
#rb Chris.Kulla
#preflight 626097e2886befa9a5d1897d

[CL 19841838 by Tiantian Xie in ue5-main branch]
2022-04-20 19:47:30 -04:00
graham wihlidal
de68814fa8 Fixed Nanite material slot table crash when mesh section count is larger than max encountered material index
#rb rune.stubbe
#jira UE-145322
#preflight 6233a5f5e12e0da4a532f57c

#ROBOMERGE-OWNER: graham.wihlidal
#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 19427916 in //UE5/Release-5.0/... via CL 19429441
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v930-19419903)

[CL 19432577 by graham wihlidal in ue5-main branch]
2022-03-18 02:34:24 -04:00
graham wihlidal
5f046c9d99 Fixed Nanite geometry collection scene proxy crash due to missing raster bin material (GCs still don't support bins, but they now remap raster bin to the default material bin correctly)
#rb trivial
#jira UE-143318, UE-143997, UE-144374
#preflight skip
#robomerge FNNC

[CL 19225378 by graham wihlidal in ue5-main branch]
2022-03-02 14:03:59 -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
graham wihlidal
cf25af65a7 Replace Raster/ShadingMaterial WeakObjectkPtr with FMaterialRenderProxy: accessing WeakObjectPtr on render thread led to a race condition.
#rb Graham.Wihlidal
#preflight 620ed139e8554a6f64ef8115
#jira UE-141348

#ushell-cherrypick of 19048514 by swarm

[CL 19061926 by graham wihlidal in ue5-main branch]
2022-02-19 00:16:02 -05:00
tiago costa
eab0c90757 Fix nanite meshes not respecting "Cast Shadow" toggle when using raytraced shadows.
- Set MeshBatch.CastRayTracedShadow based on FPrimitiveSceneProxy::CastsDynamicShadow()
Modified FRayTracingInstance::BuildInstanceMaskAndFlags(...) to override Mask since it defaults to 0xFF.
Remove unused helper functions AddOpaqueRaytracingInstance.

#jira UE-141023
#rb yuriy.odonnell
#preflight 61fd0dc52839dd07cb9892dd
#lockdown juan.canada

#ROBOMERGE-AUTHOR: tiago.costa
#ROBOMERGE-SOURCE: CL 18861822 in //UE5/Release-5.0/... via CL 18862120 via CL 18862157
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18862194 by tiago costa in ue5-main branch]
2022-02-04 08:29:10 -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
graham wihlidal
d9585873d6 Fixed Nanite geometry collection hit proxies
#rb trivial
[FYI] brian.karis, rune.stubbe
#jira UE-140593
#preflight 61f9b7632251c6fb596cb4fc

#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 18817009 in //UE5/Release-5.0/... via CL 18817026 via CL 18822844
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18824668 by graham wihlidal in ue5-main branch]
2022-02-02 07:56:25 -05:00
chris kulla
932734af70 Fix incorrect geometric normals on path traced geometry with WPO materials
The post-process which applies WPO usually leaves mesh vertices in world space. However the vertex factory might still contains a local to world transform which is required to rotate the shading normals correctly. We thus end up with a mismatch when the world position is computed for ray tracing. Currently only the path tracer was manifesting an artifact due to this, but the inconsistency could have shown up in other ways (for example if a material had a dependency on world space position).

The fix is to simply keep the mesh in "local" space by instructing the RayTracingDynamicMesh compute shader to put the vertex back into local space after applying WPO.

All the geometry types were reviewed for this potential issue and the RayTracingDynamicMesh has been updated to mandate a preprocessor signal on how to handle this.

#jira UE-139634
#rb Yuriy.ODonnell, Juan.Canada
#preflight 61f871aa114ec25fe0bfe9b3

#ROBOMERGE-AUTHOR: chris.kulla
#ROBOMERGE-SOURCE: CL 18801676 in //UE5/Release-5.0/... via CL 18802144 via CL 18821528
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18821609 by chris kulla in ue5-main branch]
2022-02-02 01:44:52 -05:00
Andrew Davidson
4a3e582384 LWC: Remove UE_LARGE_WORLD_COORDINATES_DISABLED toggle
#rb stephen.holmes
[FYI] zak.middleton
#preflight 61f7d18b114ec25fe09648d6

#ROBOMERGE-OWNER: Andrew.Davidson
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18788533 in //UE5/Release-5.0/... via CL 18788583 via CL 18788850
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)
#ROBOMERGE-CONFLICT from-shelf
#preflight 61f7eb7a114ec25fe0990f8c

[CL 18789644 by Andrew Davidson in ue5-main branch]
2022-01-31 10:10:51 -05:00
dmitriy dyomin
f0f6fa5d3e Fixed: Editor crashes when opening TM-PhysEntrance in QAGame with mobile preview enabled
#jira UE-140099
#rb carl.lloyd
#preflight 61f40192f628752a568a919a

#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 18771058 in //UE5/Release-5.0/... via CL 18771063 via CL 18771201
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18771210 by dmitriy dyomin in ue5-main branch]
2022-01-28 10:09:40 -05:00
graham wihlidal
1b4d3ee4f2 Refactored Nanite material audit checks into modular utilities, and added auditing support to Nanite Audit Tool.
#preflight 61f21e5ffc74f46b56511252
#jira UE-132980
#rb zach.bethel
[FYI] brian.karis

#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 18749986 in //UE5/Release-5.0/... via CL 18749992 via CL 18750099
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18750112 by graham wihlidal in ue5-main branch]
2022-01-26 23:48:41 -05:00
andrew davidson
08570f0250 LWC: Enable ISPC for LWC double types. Submitted on behalf of jeff.rous[at]intel.com
#rb andy.davidson
#jira UE-107988
#preflight 61eec2feaa3f15faa57a5702

#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18708912 in //UE5/Release-5.0/... via CL 18708982 via CL 18709226
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18709243 by andrew davidson in ue5-main branch]
2022-01-24 10:54:27 -05:00
Mattiwatti
781330ecc8 Adding GRHISupportsMapWriteNoOverwrite to check at runtime if RLM_WriteOnly_NoOverwrite is supported.
Motivated by changes from PR #7423

#jira UE-116122
#rb mihnea.balta
#preflight 61b92ee77618e01ffb2085f9

#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 18469448 in //UE5/Release-5.0/... via CL 18469481
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18469508 by Mattiwatti in ue5-release-engine-test branch]
2021-12-15 14:15:45 -05:00
ola olsson
09858c9218 Add filtering of shadow subjects at the proxy level for GPU-Scene supporting primitives (VSM / non-VSM)
- Enables turning off non VSM for more cases.
- Only send primitives with dynamic relevance down the dynamic subject path.
- Optimization: cache IsNaniteProxy flag on FLightPrimitiveInteraction.
- Fix the MaxNonFarCascadeDistance calculation to not include DF cascades.
- Skip SM allocation for uncached SMs without subject primitives.
- Add flag bSupportsGPUScene to FPrimitiveSceneProxy and helper to set up EnableGPUSceneSupportFlags (also turns on bVFRequiresPrimitiveUniformBuffer)
- Add error check to make sure bSupportsGPUScene is not set unless all VFs actually supports GPU-Scene

#rb andrew.lauritzen
#preflight 61af2fe02b3384289ae39e36

#ROBOMERGE-AUTHOR: ola.olsson
#ROBOMERGE-SOURCE: CL 18393307 in //UE5/Release-5.0/... via CL 18393317
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18393321 by ola olsson in ue5-release-engine-test branch]
2021-12-07 05:26:32 -05:00
jon nabozny
b27dcfb385 Support for multiple root pages per Nanite resource
Added UI for changing minimum residency
Decoupled imposter data allocation from root page allocation
Removed convoluted logic around a page's dependencies including itself for legacy reasons
Made streaming of imposter data optional (r.Nanite.Streaming.Imposters)
#rb andrew.lauritzen, ola.olsson
#preflight 6163f8f8eaa06c0001e409ee
#lockdown michal.valient

#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: rune.stubbe
#ROBOMERGE-SOURCE: CL 17770690 via CL 17986013 via CL 18368123 via CL 18368152
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18368223 by jon nabozny in ue5-release-engine-test branch]
2021-12-03 10:01:28 -05:00
jon nabozny
3e478185e0 Moved optional GPU memory over to dynamic payload allocator + various CPU/threading optimizations (avoid expensive contention grabbing per instance render data buffer unless absolutely necessary). Saves upwards of ~222MB GPU memory in Frosty, and ~840MB GPU memory if world partition is disabled (4x more instances loaded).
#rb ola.olsson
#preflight 614a1091286e3b00010e7380
[FYI] brian.karis, rune.stubbe, jason.nadro, krzysztof.narkowicz, andy.firth
#lockdown michal.valient

#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 17588680 via CL 17950709 via CL 18364633 via CL 18364726
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18364781 by jon nabozny in ue5-release-engine-test branch]
2021-12-02 23:38:54 -05:00
jon nabozny
1044ec5252 Moved per instance local bounds and Nanite hierarchy offset over to optional sidecar data, and updated all areas to source from the correct data + refactored GPU Scene to populate the new arrays correctly (the only current user of them). Also removed per instance flags in favor of dynamically deriving the important bits on GPU Scene upload. Reduces size of FPrimitiveInstance from 80 bytes down to 48 bytes (single 4x3 float FRenderTransform remains, could be 2x float4s with FCompressedTransform in the future).
#preflight 6138020f25e54000015502f6
#rb brian.karis, krzysztof.narkowicz
[FYI] daniel.wright, ola.olsson, rune.stubbe

#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 17488104 via CL 17933105 via CL 18363029 via CL 18363080
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18363108 by jon nabozny in ue5-release-engine-test branch]
2021-12-02 20:49:23 -05:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
dmitriy dyomin
eee06e854c Fixed Geometry collection rendering issues on mobile
#jira UE-126462

#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 17502442 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17502460 by dmitriy dyomin in ue5-release-engine-test branch]
2021-09-14 05:52:12 -04:00
graham wihlidal
596b78798c Removed per instance Nanite imposter flag and changed code to fetch it from the primitive flags instead. Also removed partially implemented per instance cast shadow flag in favor of the correct one on primitive flags.
#rb rune.stubbe
[FYI] brian.karis
#preflight 6130430317a8610001a7d102

#ROBOMERGE-OWNER: graham.wihlidal
#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 17397605 via CL 17397964
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17397969 by graham wihlidal in ue5-release-engine-test branch]
2021-09-02 00:54:16 -04:00