Commit Graph

22 Commits

Author SHA1 Message Date
jason hoerner
af48ea5a98 UE5_MAIN: Multi-view-family scene renderer refactor, part 2. Move FSceneTextures singleton out of RDG blackboard and FSceneTexturesConfig global variable singleton, into FViewFamilyInfo. This is necessary to allow multiple view families to render in a single render graph and a single scene renderer call.
* Existing calls to CreateSceneTextureShaderParameters and similar functions use "GetSceneTexturesChecked", which allows for the possibility that they are reached in a code path where scene textures haven't been initialized, and nullptr is returned instead of asserting.  The shader parameter setup functions then fill in dummy defaults for that case.  The goal was to precisely match the original behavior, which queried the RDG blackboard, and gracefully handled null if scene textures weren't there.  This definitely appears to occur in FNiagaraGpuComputeDispatch::ProcessPendingTicksFlush, which can be called with a dummy scene with no scene textures.  In the future, I may change this so dummy defaults are filled in for FSceneTextures at construction time, so the structure is never in an uninitialized state, but I would like to set up a test case for the Niagara code path before doing that, and the checks aren't harmful in the meantime.
* I marked as deprecated global functions which query values from FSceneTexturesConfig, but they'll still work with the caveat that if you use multi-view-family rendering, the results will be indeterminate (whatever view family rendered last).  There was only one case outside the scene renderer that accessed the globals (depth clear value), which I removed, noting that there is nowhere in the code where we modify the depth clear value from its global default.  I would like to permanently deprecate or remove these at some point.  Display Cluster is the only code that's currently using the multi-view-family code path, and as a new (still incomplete) feature, third party code can't be using it, and won't be affected.

#jira NONE
#rb chris.kulla zach.bethel mihnea.balta
#preflight 6261aca76119a1a496bd2644

[CL 19873983 by jason hoerner in ue5-main branch]
2022-04-22 17:33:02 -04:00
christopher waters
31658ac660 Renderer dependency cleanup focused on removing RenderGraph.h from SceneRenderTargetParameters.h
#jira none
#rb zach.bethel
#preflight 62573bf61543022eed4bc2aa

[CL 19746250 by christopher waters in ue5-main branch]
2022-04-13 17:33:48 -04:00
florin pascu
1d9eafb943 Fix Distortion Pass when SceneDepth Aux is not required.
#rb Carl.Lloyd, Dmitriy.Dyomin

#ROBOMERGE-AUTHOR: florin.pascu
#ROBOMERGE-SOURCE: CL 18147421 via CL 18147425 via CL 18147428 via CL 18155143 via CL 18155495 via CL 18161515 via CL 18161958
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v889-18060218)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18162237 by florin pascu in ue5-release-engine-test branch]
2021-11-11 19:32:49 -05:00
florin pascu
5c1e32c73c RG11B10 + SceneDepthAux 16/32F + Alpha Propagate
For Forward ES31
 Default SceneColor RG11B10 + R16F\32F Depth texture
 With PropagateAlpha on RGBA16F + R16F\32F
 PostProcess we sample SceneDepthAux for Depth
For Deferred ES31
 SceneDepthAux only for Metal
 PropagateAlpha not working yet
 PostProcess we sample SceneDepthTexture for Depth

cvar to change Depth texture from 16 to 32Fr.Mobile.SceneDepthAux
cvar for AlphaPropagate r.Mobile.PropagateAlpha
#jira UE-98033
#rb Dmitriy.Dyomin, Carl.Lloyd, Jack.Porter

#ROBOMERGE-SOURCE: CL 16644095 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v833-16641396)

[CL 16644108 by florin pascu in ue5-release-engine-test branch]
2021-06-11 13:47:20 -04:00
dmitriy dyomin
8e508176a9 Fixed: auto-instancing on mobile
#ROBOMERGE-OWNER: dmitriy.dyomin
#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 15757659 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v783-15756269)
#ROBOMERGE-CONFLICT from-shelf

[CL 15772431 by dmitriy dyomin in ue5-main branch]
2021-03-22 22:21:46 -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
Dmitriy Dyomin
0a8e0e3cf9 Fixed: A missing View UB in mobile distortion rendering
#jira none
#rb none

[CL 15048103 by Dmitriy Dyomin in ue5-main branch]
2021-01-12 07:09:25 -04:00
zach bethel
2ac0eca45e Removed unused scene render target singleton accesses.
#rb none
#rnx

[CL 14986799 by zach bethel in ue5-main branch]
2021-01-04 18:13:38 -04:00
zach bethel
e4f467569d Removed scene render target context snapshot system.
#rb arne.schober

[CL 14615156 by zach bethel in ue5-main branch]
2020-10-29 16:32:16 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
carl lloyd
fe57817d94 Added Android Desktop Forward Rendering (Experimental)
[at]jack.porter [at]dmitry.dyomin [at]juan.canada [at]rolando.caloco
#rb jack.porter, dmitry.dyomin, juan.canada, rolando.caloco
#jira none

#ROBOMERGE-SOURCE: CL 11824876 in //UE4/Release-4.25/... via CL 11824884
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)

[CL 11824898 by carl lloyd in Main branch]
2020-03-02 11:00:17 -05:00
Josh Adams
aa9705149b Copying Private-LoadTimes-4.24 stream to Main. Biggest changes are in Materials/Shader memory freezing.
#rb none

[CL 11282608 by Josh Adams in Main branch]
2020-02-06 13:13:41 -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
f83ae4807a Copying //UE4/Dev-Rendering@9317594 to Dev-RenderPlat-Staging
#rb none
#rnx

[CL 9317904 by Rolando Caloca in Dev-RenderPlat-Staging branch]
2019-10-01 13:03:04 -04: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
Daniel Wright
b364f8fc15 Removed legacy Drawing Policies and Static Mesh Draw Lists. These are now replaced by FMeshDrawCommand / FMeshPassProcessor everywhere in the renderer.
Implemented FMeshDrawCommand support for IndirectArgsBuffer, which is used by Niagara.
#rb none

[CL 4734925 by Daniel Wright in Dev-Rendering branch]
2019-01-16 14:28:24 -05:00
Dmitriy Dyomin
e8d79c8ca6 Removed old mobile mesh drawing pipeline
#jira UE-64259
#rb none
#fyi krzysztof.narkowicz

[CL 4723232 by Dmitriy Dyomin in Dev-Rendering branch]
2019-01-14 22:43:34 -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
Marcus Wassmer
cbfcbbb93b Merging //UE4/Dev-Main@4662404 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none
Should be just copyright updates

[CL 4680440 by Marcus Wassmer in Dev-Rendering branch]
2019-01-03 19:16:26 -05:00
Marcus Wassmer
b5d7db3689 Copying //UE4/Dev-Rendering-HLR@4650617 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none

[CL 4651635 by Marcus Wassmer in Dev-Rendering branch]
2018-12-11 22:25:04 -05:00
Matt Collins
1be8409708 Renderpass updates: Mobile rendering.
#jira UERNDR-292
#rb none

[CL 4567952 by Matt Collins in Dev-Rendering branch]
2018-11-14 21:08:59 -05:00
dmitriy dyomin
b8a23545a6 Fixed: Refraction causes rendering artifacts when MSAA is enabled on Mobile
Refraction now applied as post-process effect, correctly handling multiple overlapping distortions. This chnage has side effect that foreground translucency will be distorted as well
#jira UE-52313
[CODEREVIEW] jack.porter
#rb none

#ROBOMERGE-SOURCE: CL 4457648 in //UE4/Release-4.21/...
#ROBOMERGE-BOT: RELEASE (Release-4.21 -> Release-Staging-4.21)

[CL 4457649 by dmitriy dyomin in Staging-4.21 branch]
2018-10-11 23:52:27 -04:00