Commit Graph

49 Commits

Author SHA1 Message Date
jason hoerner
b19bb6be2f UE5_MAIN: Multi-view-family scene renderer refactor, part 1. Major structural change to allow scene renderer to accept multiple view families, with otherwise negligible changes in internal behavior.
* Added "BeginRenderingViewFamilies" render interface call that accepts multiple view families.  Original "BeginRenderingViewFamily" falls through to this.
* FSceneRenderer modified to include an array of view families, plus an active view family and the Views for that family.
* Swap ViewFamily to ActiveViewFamily.
* Swap Views array from TArray<FViewInfo> to TArrayView<FViewInfo>, including where the Views array is passed to functions.
* FSceneRenderer iterates over the view families, rendering each one at a time, as separate render graph executions.
* Some frame setup and cleanup logic outside the render graph runs once.
* Moved stateful FSceneRenderer members to FViewFamilyInfo, to preserve existing one-at-a-time view family rendering behavior.
* Display Cluster (Virtual Production) uses new API.

Next step will push everything into one render graph, which requires handling per-family external resources and cleaning up singletons (like FSceneTextures and FSceneTexturesConfig).  Once that's done, we'll be in a position to further interleave rendering, properly handle once per frame work, and solve artifacts in various systems.

#jira none
#rnx
#rb zach.bethel
#preflight 625df821b21bb49791d377c9

[CL 19813996 by jason hoerner in ue5-main branch]
2022-04-19 14:45:26 -04:00
andrew davidson
3542cab338 FMatrix explicit cast fixes - Renderer
#rb ben.ingram, zak.middleton
#preflight 61f285e71e5d78c38307cda4

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

[CL 18752338 by andrew davidson in ue5-main branch]
2022-01-27 07:20:20 -05:00
ben ingram
7ae8e132e7 Allow FBoxSphereBounds to use different types for position/extent
FPrimitiveSceneInfoCompact uses float extent for bounds
#jira UE-137200
#rb andrew.davidson
#preflight 61e899e28022cea656998dc0

#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 18669012 in //UE5/Release-5.0/... via CL 18669053 via CL 18669074
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v901-18665521)

[CL 18669106 by ben ingram in ue5-main branch]
2022-01-19 18:58:21 -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
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
jian ru
8b944b8761 Fix a non-unity compile error
#ROBOMERGE-AUTHOR: jian.ru
#ROBOMERGE-SOURCE: CL 17672370 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v875-17642767)

[CL 17672436 by jian ru in ue5-release-engine-test branch]
2021-09-29 22:56:57 -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
rolando caloca
f6cd88c157 UE5 - Remove platform
#rb Steve.Smith
[FYI] Jules.Blok, Ryan.Durand, Ben.Marsh

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

[CL 17295945 by rolando caloca in ue5-release-engine-test branch]
2021-08-24 19:28:38 -04:00
Wei Liu
a0f4c7a293 Support CSM Caching.
#jira none

#rb Ola.Olsson, Dmitriy.Dyomin, Jack.Porter, Mi.Wang

[CL 16204572 by Wei Liu in ue5-main branch]
2021-05-05 04:18:08 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00
graham wihlidal
61244769d1 Decoupled more of the GPU scene instance culling work
==
* Added instance offset and count to primitive data, along with GetPrimitiveUniformShaderParameters() diffs
* Remaining FInstanceCullingManager& hooks through functions
* Various todo comments to address later
* Calls to (disabled for now) BuildRenderCommands()
* Mutability of FViewInfo in some spots
* Additional instance culling draw params in a few places
* EVertexInputStreamType cleanup
* UseVirtualShadowMaps() feature capability helper function

#authors ola.olsson, graham.wihlidal
#rb graham.wihlidal
#fyi brian.karis, rune.stubbe

[CL 15092149 by graham wihlidal in ue5-main branch]
2021-01-14 15:46:32 -04:00
Rune Stubbe
00e07341c2 Added support for two-pass HZB culling with Nanite multi-view
Two pass occlusion for Non-VSM shadows
Changes shadowmap atlas rendering to render into the border, so we have real data for wide shadowmap filtering kernels. Also improves atlas HZB performance.

#rb ola.olsson
#fyi graham.wihlidal, brian.karis, andrew.lauritzen

[CL 14762582 by Rune Stubbe in ue5-main branch]
2020-11-17 06:16:49 -04:00
Marc Audy
4c1bb11c29 Merge UE5/Release-Engine-Staging to UE5/Main @ 14548662
This represents UE4/Main @ 14525125 + cherrypicked fixes
#skipundocheck

[CL 14551026 by Marc Audy in ue5-main branch]
2020-10-22 19:19:16 -04:00
zach bethel
53bdcb2ff4 Removed deprecated LPV feature from the engine.
#rb krzysztof.narkowicz, andrew.lauritzen, daniel.wright
#jira none

[CL 14516783 by zach bethel in ue5-main branch]
2020-10-19 15:06:44 -04:00
andrew lauritzen
ad13eadb87 Complete shadow maps: copy/resample non-nanite geometry instead of re-rendering it
- Refactor shadow depth rendering high level to clean up passes a bit
- Add back in SnapResolution to allow the complete shadow maps to snap consistently with the shadow that is their copy source (otherwise the projections differ)
- NOTE: Shadow bias for directional lights is technically dependent on resolution, and it is baked into the high resolution map. Thus the copy path has a minor difference in biasing here but it's not major concern for the uses of the complete shadow map.

#rb ola.olsson

#ROBOMERGE-SOURCE: CL 14321491 in //UE5/Release-5.0-M2/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-M2 -> Main) (v738-14305781)

[CL 14321504 by andrew lauritzen in ue5-main branch]
2020-09-15 14:24:12 -04:00
andrew lauritzen
3f31b010a0 Add a lower-resolution "complete" shadow map that contains merged Nanite+non-Nanite geometry when virtual shadow maps are enabled
- Use this shadow map for Lumen and volumetrics so that all geometry is present
- Resolution can be controlled with r.Shadow.CompleteShadowMapResolution (default 256). 0 disables, which will result in missing Nanite geometry in these secondary effects (as before this change)
- NOTE: Currently this shadow map is rendered with another pass over the geometry, but this will be replaced by a copy/resample/composite in a future change

Other changes:
- Some fixes to shadow map caching
- Some initial refactors to sorted projected shadow info lists; more to come to reduce the amount of code that iterates and filters AllProjectedShadows around the engine and centralize it in shadow setup.
- Removed unused parameters from a a few functions

#rb ola.olsson
#fyi krzysztof.narkowicz, daniel.wright, sebastien.hillaire

[CL 14224191 by andrew lauritzen in ue5-main branch]
2020-08-31 19:38:04 -04:00
Michal Valient
95d19f95b1 [REVERB] Merging //UE4/Private-Reverb-Development@13832732
#rb graham.wihlidal, rune.stubbe, brian.karis, andrew.lauritzen, jeff.farris

[CL 13834854 by Michal Valient in ue5-main branch]
2020-07-06 18:58:26 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00
arne schober
c875be4fd4 FNEM - Better naming
#RB none

#ROBOMERGE-OWNER: arne.schober
#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 12789290 via CL 12789324 via CL 12789325
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v681-12776863)

[CL 12789326 by arne schober in Main branch]
2020-04-15 01:18:48 -04:00
arne schober
78549560ed FNEM - More cache-friendly and faster Octree implementation.
Also changing the interface for better encapsulation by cutting the origial itterator concept and focusing on small subset of configurable itteration strategies instead.
#RB Andrew.Scheidecker, Yoan.StAmant

#ROBOMERGE-OWNER: arne.schober
#ROBOMERGE-AUTHOR: arne.schober
#ROBOMERGE-SOURCE: CL 12785392 via CL 12785681 via CL 12785682
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v681-12776863)

[CL 12786795 by arne schober in Main branch]
2020-04-14 16:59:52 -04:00
mickael gilabert
9fb3f2df04 FPrimitiveViewRelevance inherits from FMaterialRelevance. On top of communizing code, copying a FMaterialRelevance instance to FPrimitiveViewRelevance one is now just a 64 bits assignment
#rb daniel.wright
#rnx


#ROBOMERGE-OWNER: mickael.gilabert
#ROBOMERGE-AUTHOR: mickael.gilabert
#ROBOMERGE-SOURCE: CL 11166465 via CL 11166503 via CL 11166528
#ROBOMERGE-BOT: (v640-11091645)

[CL 11168503 by mickael gilabert in Main branch]
2020-01-29 16:57:40 -05:00
ryan durand
0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00
Rolando Caloca
aa0d2303d6 Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main) @ 6944469
#rb none
#rnx

[CL 6944849 by Rolando Caloca in Main branch]
2019-06-11 18:27:07 -04:00
Michael Lentine
f9b3324b32 Copying //UE4/Dev-Physics to Dev-Main (//UE4/Dev-Main) @ 6903150
#rb none
#rnx

[CL 6903163 by Michael Lentine in Main branch]
2019-06-08 17:15:34 -04:00
kevin ortegren
c92b1c86d9 Adds support for multiple shading models per material. Each material now has a bit field of which shading models it is using. Shading models for a material are selected through a new Shading Model material expression, which can be connected to the new Shading Model material output pin. This is opt-in by selecting "From Material Expression" in the Shading Model drop down on the material. With no changes, everything should behave like before, and the old workflow is still there. Optimized shader code should be as performant as before if not using more than one shading model.
[FYI] Chris.Bunner, Krzysztof.Narkowicz, Marcus.Wassmer, Yuriy.Odonnell, Matt.Kuhlenschmidt
#rb Krzysztof.Narkowicz

#ROBOMERGE-OWNER: kevin.ortegren
#ROBOMERGE-AUTHOR: kevin.ortegren
#ROBOMERGE-SOURCE: CL 6308573 via CL 6309266

[CL 6315508 by kevin ortegren in Main branch]
2019-05-06 06:04:18 -04:00