Commit Graph

329 Commits

Author SHA1 Message Date
ola olsson
d57b5986e3 Propagate ActorLabel to FLightSceneProxy such that names shown in logging/profiling/diagnostics match those shown in editor
- Removed dead code that once set up additional draw event scopes
- Deprecate FLightSceneProxy::GetComponentName and direct users to GetComponentFName to make it more clear what it does
- Change ComponentName to store the component name (not the owner name)
- Change uses of FName to use FString (for reporting invalid/unbaked lights etc)
- Make ACTOR_HAS_LABELS respect WITH_PROFILEGPU to enable profiling in Test & Shipping

#rb daniel.wright,JeanFrancois.Dube
#preflight 61b0b4f0b12ed60581aadaf9

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

[CL 18405129 by ola olsson in ue5-release-engine-test branch]
2021-12-08 09:04:29 -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
charles derousiers
0410a6cc7a Add option to fix invalid shadow culling of hair strands when non-visible in the primary view.
Disable by default for now as this can  add non-negligeable voxelization cost due to inaccurate shadow view culling.

#rb none
#jira none

#ROBOMERGE-AUTHOR: charles.derousiers
#ROBOMERGE-SOURCE: CL 18379157 in //UE5/Release-5.0/... via CL 18379162
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18379165 by charles derousiers in ue5-release-engine-test branch]
2021-12-05 14:55:44 -05:00
jon nabozny
cdc65f654f Reland: Fixes motion blur lengths when using time dilation
#rb josie.yang
#lockdown michal.valient
#preflight 614a44526c96990001c47143

#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 17606608 via CL 17962735 via CL 18364937 via CL 18364960
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18365023 by jon nabozny in ue5-release-engine-test branch]
2021-12-02 23:53:56 -05:00
jon nabozny
9693ad4915 Undo //UE5/Private-Frosty/Engine/... changelist 17586431
#lockdown michal.valient
#preflight revert for build breakage

#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 17587410 via CL 17948832 via CL 18364580 via CL 18364616
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18364712 by jon nabozny in ue5-release-engine-test branch]
2021-12-02 23:34:52 -05:00
jon nabozny
c418c40de0 Fixes motion blur lengths when using time dilation
#rb josie.yang
#lockdown michal.valient
#preflight 614a1e3259380f0001888d92

#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 17586431 via CL 17948712 via CL 18364381 via CL 18364522
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18364604 by jon nabozny in ue5-release-engine-test branch]
2021-12-02 23:30:35 -05:00
jon nabozny
f89b654be6 Changes to SceneVisibility
1.  Nanite meshes are not longer marked as always visible, and will go through the standard rendering culling / pipeline.
2.  Add coarse frustum culling using the already existing scene octree.
3.  Remove Distance visibility bit array, and converted only usage to using the visibiliity map.  (Spoke with Kenzo about this, the original was put in due to differences between distance a vis flags, but this has been fixed)
4.  Optimized Frustum culling methods across the board.

[at]Graham.Wihlidal [at]krzysztof.narkowicz [at]andrew.firth
#preflight 6137e0d1d9c85a00015375cb

#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: brandon.dawson
#ROBOMERGE-SOURCE: CL 17459502 via CL 17911378 via CL 18360795 via CL 18361127
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18361363 by jon nabozny in ue5-release-engine-test branch]
2021-12-02 18:21:56 -05:00
wei liu
a6f69013d2 Disable CSM caching if virtual shadowmap is enabled.
#jira none


#rb Dmitriy.Dyomin
-fyi Ola.Olsson
#p4v-preflight-copy 18257889

#ROBOMERGE-AUTHOR: wei.liu
#ROBOMERGE-SOURCE: CL 18292318 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v895-18170469)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 18292328 by wei liu in ue5-release-engine-test branch]
2021-11-25 00:14:42 -05:00
ola olsson
9d099e1d50 Properly filter shadow casting draws into VSM & non-VSM shadow maps (avoids caching empty SMs if all geometry supports VSM)
- fixes both naniite and non-nanite cases.

#rb andrew.lauritzen
#preflight 619e467b974d7d5726ab06d9

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

[CL 18283599 by ola olsson in ue5-release-engine-test branch]
2021-11-24 09:56:31 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
aurel cordonnier
fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -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
aurel cordonnier
69fe095547 Merge from Release-Engine-Staging @ 17636544 to Release-Engine-Test
This represents UE4/Main @17638339 and Dev-PerfTest @17636504

[CL 17638842 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-27 19:54:25 -04:00
andrew davidson
57beb335f2 Merging //UE5/Dev-LargeWorldCoordinates [at] 17581892 to //UE5/Main
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 17595295 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17595306 by andrew davidson in ue5-release-engine-test branch]
2021-09-22 10:01:48 -04:00
andrew lauritzen
ead3650569 Virtual shadow maps: early out on pixels backfacing the light in both projection and page allocation
Page allocation part is a fairly minor benefit in most scenes but can occasionally make a big difference.
Projection early-out is a pretty uniform benefit all the time, especially with SMRT.

#preflight 612d1b836a14cc000118f03a
#rb ola.olsson

#ROBOMERGE-SOURCE: CL 17388425 via CL 17389280
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17389330 by andrew lauritzen in ue5-release-engine-test branch]
2021-09-01 13:13:01 -04:00
wei liu
a3368b88c0 Revert the changes from CL#17258939, since it causes regression on mobile.
#jira none

#rb Dmitriy.Dyomin

#ROBOMERGE-SOURCE: CL 17287938 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17287958 by wei liu in ue5-release-engine-test branch]
2021-08-24 11:43:51 -04:00
wei liu
fc8562209f Update mobile movable point light uniformbuffer if LightFadeFactor changed.
#jira UE-119021

#rb Dmitriy.Dyomin
#p4v-preflight-copy 17113013

#ROBOMERGE-SOURCE: CL 17258939 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17258948 by wei liu in ue5-release-engine-test branch]
2021-08-21 09:35:06 -04:00
christopher waters
fe15edb8ab Fixing divide by zero by not checking the array size first.
#jira UE-121177, UE-121512
#rb zach.bethel, mihnea.balta
#preflight 611d13422c1f1c0001047bbf

#ROBOMERGE-SOURCE: CL 17222681 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17222690 by christopher waters in ue5-release-engine-test branch]
2021-08-18 17:19:13 -04:00
andrew lauritzen
4c09e04e87 Add a cvar to force disabling conventional shadow maps when virtual shadow maps are enabled.
The intention is that lights will eventually take this path automatically when no geometry that can't be rendered into a VSM is present (or no such types exist anymore in the engine).
Fix a few cases where assumptions are made about VSMs only existing if a conventional shadow map exists and so on.
Allow Lumen to consider the VSM result "complete" if valid and no shadow map is present.

#rb Krzysztof.Narkowicz
[FYI] Ola.Olsson
#preflight 611d64805e73720001df629c

#ROBOMERGE-SOURCE: CL 17221692 via CL 17221701
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17221712 by andrew lauritzen in ue5-release-engine-test branch]
2021-08-18 16:28:23 -04:00
ola olsson
164a81bd65 Add occlusion culling support to GPU-Scene Instance Culling system (disabled by default, cvar: r.InstanceCulling.OcclusionCull)
#rb Ola.Olsson
#author josie.yang
#preflight 611a4fcc5e73720001408497,611a5b008ff5540001cf0995

#ROBOMERGE-OWNER: ola.olsson
#ROBOMERGE-AUTHOR: ola.olsson
#ROBOMERGE-SOURCE: CL 17175042 via CL 17175430
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17175439 by ola olsson in ue5-release-engine-test branch]
2021-08-16 09:33:03 -04:00
dmitriy dyomin
b0828d6beb Mobile specific implementation for auto-instancing. (disabled by default atm)
Run a compute job that packs most commonly used instance data (LocalToWorld matrix and some other bits - 80 bytes) into per-instance vertex buffer. Vertex shader does not have access to GPUScene and instead loads instance data from a per-instance vertex buffer. If it needs more primitive/instance data than available then it will load it from Primitive UB, binding unique uniform buffer and breaking auto-instancing. Pixel shader has a full access to a GPUScene
There are 3 ways how FSceneDataIntermediates gets populated
 1. PrimitiveId + GPUScene (Desktop)
 2. Per-Instance data + Primitive UB (Mobile)
 3. Primitive UB (auto-instancing disabled)
Details for GPUScene specific vertex inputs and access to FSceneDataIntermediates are hidden behind a macro:
VF_GPUSCENE_DECLARE_INPUT_BLOCK
VF_GPUSCENE_GET_INTERMEDIATES
FSceneDataIntermediates is now stored in FVertexFactoryIntermediates, FMaterialVertexParameters. Added a few GetPrimitiveData() overloads that allows you to access PrimitiveData depending on current context. Removed most of the cases where GetPrimitiveData() gets used with PrimitiveId.
#rb Ola.Ollson

#ROBOMERGE-SOURCE: CL 17093848 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)

[CL 17093856 by dmitriy dyomin in ue5-release-engine-test branch]
2021-08-07 07:20:52 -04:00
christopher waters
87d758486e Moving gathering of shadow primitives to tasks that start before rendering prepass.
#rb Krzysztof.Narkowicz, Zach.Bethel

#ROBOMERGE-SOURCE: CL 17060876 via CL 17061461 via CL 17061467 via CL 17062908
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v850-17047176)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17062917 by christopher waters in ue5-release-engine-test branch]
2021-08-04 21:06:07 -04:00
serge bernier
5b435aa821 Fix CSM not resolving on switch (mobile renderer)
#rb Mickael.Gilabert, florin, dmitriy
#jira UE-119844

#ROBOMERGE-SOURCE: CL 16964918 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16964921 by serge bernier in ue5-release-engine-test branch]
2021-07-26 22:17:36 -04:00
christopher waters
c59eec22ea Minor cleanup of shadow passes focused on removing unnecessary command list and feature level arguments.
#jira none
#rb zach.bethel
#preflight 60f6f3a3a6959a00014e7388

#ROBOMERGE-SOURCE: CL 16898650 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16898660 by christopher waters in ue5-release-engine-test branch]
2021-07-20 13:31:10 -04:00
andrew lauritzen
37ebf8ceb4 Implement simple subsurface shading model for virtual shadow maps and related fixes and improvements:
- Add VirtualShadowMapId to forward light data, removing the per-view remapping table. Should fixe a few multi-view/split-screen bugs.
- Minor cleanup of PCF subsurface path; remove dead/broken code.
- Fix up blending of light attenuation into screen shadow mask; disable CSM fading when VSMs are enabled.
- Fix OnePassProjection flag when VSMs are disabled

#rb none
[FYI] ola.olsson, brian.karis

#ROBOMERGE-SOURCE: CL 16852407 via CL 16852415
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16852422 by andrew lauritzen in ue5-release-engine-test branch]
2021-07-14 13:45:31 -04:00