Commit Graph

14 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
jamie hayes
21ede7bd1e Fix for flickering of Nanite in level instance editor visualization post-process.
Also fixes an ensure that would hit upon entering this visualization mode.

#rb graham.wihlidal
#jira UE-146824, UE-146993
#preflight 623b8e1e10251d53d58a1846
#lockdown cristina.riveron

#ROBOMERGE-AUTHOR: jamie.hayes
#ROBOMERGE-SOURCE: CL 19486970 in //UE5/Release-5.0/... via CL 19487640
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v936-19480137)

[CL 19488955 by jamie hayes in ue5-main branch]
2022-03-23 19:30:55 -04:00
mihnea balta
647a21a6d5 Fix crash when editing level instances.
The VisualizeLevelInstance pass needs the view uniform buffer, but didn't set it.

#jira UE-126680
#rnx
#rb graham.wihlidal

[CL 17534432 by mihnea balta in ue5-main branch]
2021-09-16 02:04:05 -04:00
zach bethel
f311bbc7a1 RDG Parallel Execution (disabled by default)
- Refactored RDG to support free-threaded execution of passes.
 - Refactored renderer to use specific RHI command list variants in pass lambda. Immediate command list passes are forced to stay on the render thread, while other variants can be parallelized.

#rb christopher.waters

[CL 16838717 by zach bethel in ue5-main branch]
2021-07-13 12:38:27 -04:00
Guillaume Abadie
07bc47754f Implements FScreenTransform with operator overload to construct custom viewport transformations easily
#rb zach.bethel

[CL 16114603 by Guillaume Abadie in ue5-main branch]
2021-04-26 11:28:05 -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
graham wihlidal
862e861803 Added instance culling manager and context (disabled, and without shader files), and tons of hooks all over the renderer in preparation for upcoming GPU culling work.
#author ola.olsson
#rb graham.wihlidal
#fyi brian.karis, rune.stubbe

[CL 15082481 by graham wihlidal in ue5-main branch]
2021-01-14 05:23:34 -04:00
zach bethel
c6cb1e82be Deprecated and gutted FSceneRenderTargets. Moved all textures over to FSceneTextures. Refactored the renderer to use RDG textures from FSceneTextures instead.
#rb arne.schober, luke.thatcher, christopher.waters, kenzo.terelst

[CL 15040082 by zach bethel in ue5-main branch]
2021-01-11 14:49:16 -04:00
zach bethel
924417b66f Moved more Nanite resources over to RDG.
#fyi graham.wihlidal
#jira none

[CL 14917602 by zach bethel in ue5-main branch]
2020-12-14 15:13:06 -04:00
zach bethel
056a26cddd Refactored uniform buffers to use static bindings as opposed to FPersistentUniformBuffers across the deferred renderer. This removes the view uniform buffer and reflection capture uniform buffers from mesh draw commands and reduces the use of RHIUpdateUniformBuffers.
- View / InstancedView uniform buffers are now bound through RDG directly from the FViewInfo, or created on-demand for cases like jitter-free custom depth.
 - Removed most of the custom persistent view uniform buffers. Left one in Lumen to be done in a later CL.
 - ReflectionCapture uniform buffer is now bound at the RDG pass level.

#rb christopher.waters

[CL 14873982 by zach bethel in ue5-main branch]
2020-12-07 17:43:21 -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
zach bethel
05d33be488 Removal of the deprecated rendering composition graph from the engine.
#rb christopher.waters
#fyi charles.derousiers, steve.smith
#jira none

[CL 14523947 by zach bethel in ue5-main branch]
2020-10-20 11:36:46 -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
roey borsteinas
f41d79e4f5 Visualize Level Instance editing
Applies a post processing effect to all actors which do not belong to the currently editing LevelInstance. Can be toggled with the Viewport show options under visualization.

#rb patrick.enfedaque graham.wihlidal jeremy.moore
#jira none

#ROBOMERGE-OWNER: roey.borsteinas
#ROBOMERGE-AUTHOR: roey.borsteinas
#ROBOMERGE-SOURCE: CL 14322972 in //UE5/Release-5.0-M2/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-M2 -> Main) (v738-14305781)

[CL 14323217 by roey borsteinas in ue5-main branch]
2020-09-15 17:20:22 -04:00