Commit Graph

41 Commits

Author SHA1 Message Date
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
Rolando Caloca
5154fdf98c Merging //UE4/Dev-Main@4871865 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none
#rnx

[CL 4872315 by Rolando Caloca in Dev-Rendering branch]
2019-02-01 18:09:46 -05:00
Krzysztof Narkowicz
10ee8def1f Fixed rendering corruption and crashes when r.DoInitViewsLightingAfterPrepass 1. This was caused by using FGlobalDynamic(Vertex/Index/Read)Buffer before it was committed (also commit was overlapping the parallel draw cmd list):
* IntiViews
* Dispatch prepass parallel cmd list (flickering, as global buffers weren't committed).
* InitShadows.
* Commit global buffers (race condition and potential crash).

This was fixed by:
* Renamed FNiagaraGlobalReadBuffer to FGlobalDynamicReadBuffer and moved it out from Niagara.
* Removed all global buffer singletons and placed them inside appropriate renderers as static members.
* They are also separated into two - one for InitViews and one for InitShadows, so we can dispatch prepass while writing to the shadow global buffers.
* All global buffers are now passed as a parameter and/or through mesh collector.

#jira UE-69167
#rb Rolando.Caloca
#rnx

[CL 4871865 by Krzysztof Narkowicz in Main branch]
2019-02-01 17:02:33 -05:00
Marcus Wassmer
68f340a63c Merging //UE4/Dev-Main@4825910 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none
KNOWN BROKEN DO NOT SYNC
#lockdown rolando.caloca

[CL 4827063 by Marcus Wassmer in Dev-Rendering branch]
2019-01-28 21:04:21 -05:00
Daniel Wright
387d960855 Renamed FStaticMesh -> FStaticMeshBatch to better describe what the class does (cached FMeshBatch) and reduce confusion with UStaticMesh
#rb none

[CL 4736238 by Daniel Wright in Dev-Rendering branch]
2019-01-16 15:48:19 -05:00
Marcus Wassmer
2c4a81a1d2 First round of compile and runtime fixes.
#rb none

[CL 4731008 by Marcus Wassmer in Dev-Rendering branch]
2019-01-15 22:09:59 -05:00
Marcus Wassmer
a8d6cc952b Merging //UE4/Dev-Main@4700769 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none

[CL 4729861 by Marcus Wassmer in Dev-Rendering branch]
2019-01-15 18:04:38 -05:00
Krzysztof Narkowicz
5b3e1e01b6 Moved dynamic mesh draw command generation to a parallel task (FMeshDrawCommandPassSetupTask).
*InitViews computes approximate max number of dynamic draws and use it to allocate mesh draw command resources (primitive id vertex buffer, mesh draw command arrays, number of parallel draw tasks etc).
*DynamicMeshDrawCommandStorage was moved to the FMeshDrawCommandPassSetupTaskContext, as it's now internally handled by the task.
*Mobile BasePass sort key computation and BasePass / BasePassCSM list merging based on CSM visibility was fully moved to the FMeshDrawCommandPassSetupTask.
#rb Daniel.Wright
#fyi Dmitriy.Dyomin, Allan.Bentham

[CL 4719711 by Krzysztof Narkowicz in Dev-Rendering branch]
2019-01-14 14:21:36 -05:00
Krzysztof Narkowicz
062c1ca978 Moved mesh draw command sorting and draw call merging to a separate task, which is chained to the actual draw task. This allows to move all this work from the rendering thread.
*FParallelMeshDrawCommandPass stored on View controls two parallel tasks and their data - sorting and merging task, and drawing task. It is initialized based on temporary visible mesh draw command lists inside InitViews. It is also the only way to submit mesh draw commands in parallel.
*Raytraycing mesh draw commands are now stored separately on the view.
*Local shadows now can be sorted in parallel too.
*Removed mobile SortMeshDrawCommands function override, which was required to merge NoCSM/CSM base pass lists. Instead mobile base pass is skipped inside InitViews and is sorted later - inside SortMobileBasePassAfterShadowInit.

#rb Daniel.Wright
#fyi Arne.Schober, Dmitriy.Dyomin, Allan.Bentham

[CL 4690851 by Krzysztof Narkowicz in Dev-Rendering branch]
2019-01-08 18:05:54 -05:00