Commit Graph

152 Commits

Author SHA1 Message Date
jason hoerner
00a17f45d1 Scene Capture: Fix for additive / composite blending. Need to skip render target clear when compositing.
#jira UE-151360
#rb mihnea.balta
#preflight 6290b3a9b974ae8eb0391726
#lockdown mihnea.balta

#ROBOMERGE-OWNER: jason.hoerner
#ROBOMERGE-AUTHOR: jason.hoerner
#ROBOMERGE-SOURCE: CL 20391763 in //UE5/Release-5.0/... via CL 20393665
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20398598 by jason hoerner in ue5-main branch]
2022-05-27 16:47:05 -04:00
zach bethel
92d58d2338 Restored FTextureRenderTargetCubeResource to use a staging 2D texture as its render target. Replaced the render target clears with copies from the staging texture which mirrors the old implementation with CopyToResolveTarget. Also fixed another regression in CopyTexture that wasn't part of the unit test.
#rb mihnea.balta, jason.hoerner
#preflight 628f96ab74630984fd3f45d5
#jira UE-151491

[CL 20379819 by zach bethel in ue5-main branch]
2022-05-26 11:24:29 -04:00
zach bethel
3cc87760bd Removed cases of AddCopyToResolveTargetPass which either weren't necessary or weren't performing multisample resolves.
#preflight 628270aa046b81bf93c13e50

[CL 20226032 by zach bethel in ue5-main branch]
2022-05-16 12:09:51 -04:00
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
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
roey borsteinas
ec28b77e5d Explicitly enable 128 bit output on the SceneCapture pixel shader when the platform requires it.
#rb jonathan.bard

#ROBOMERGE-AUTHOR: roey.borsteinas
#ROBOMERGE-SOURCE: CL 19526801 via CL 19526828 via CL 19526845
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)

[CL 19532676 by roey borsteinas in ue5-main branch]
2022-03-28 16:25:48 -04:00
Arciel Rekman
111627d950 Flip HMD extensions to opt-in rather than opt-out
#rb Rob.Srinivasiah, Jonathan.Bard, Jules.Blok
#review @Robert.Srinivasiah
#jira none
#preflight 6238b58f9304d833f4e65e3b

[CL 19472593 by Arciel Rekman in ue5-main branch]
2022-03-22 17:27:12 -04:00
jonathan bard
96f58b74b5 Made sure that view extensions are gathered and that PreRenderView_RenderThread/PreRenderViewFamily_RenderThread and SetupView/SetupViewFamily are called on all of them for all code paths triggering a scene render.
* For thumbnail renderers, the prototype of RenderViewFamily (which is called by all the types of thumbnail renderers) has been changed to take a non-const FSceneView* parameter (so that SetupView can be called on it) and the various GetView functions have been renamed CreateView since it more accurately depicts what the functions do (plus they return the non-const view they've created)
* UGameViewportClient::Draw was calling SetupViewFamily but not SetupView
* Made sure FSceneRenderer::ViewExtensionPreRender_RenderThread is called right before RenderThreadBegin for all code paths
* Made sure view extensions are gathered for all code paths rendering a view family

Note: BeginRenderViewFamily (i.e. game-thread), PostRenderView_RenderThread and PostRenderViewFamily_RenderThread are still not called on the non-standard code paths

#jira UE-140273, UE-140489, UE-139067, UE-140425
#rb sebastien.lussier, rob.srinivasiah
#tests EngineTests (screenshots), editor
#preflight 61fd216ae17efe76d1b49a2d
#lockdown mihnea.balta

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 18884880 in //UE5/Release-5.0/... via CL 18884941 via CL 18885221
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18885607 by jonathan bard in ue5-main branch]
2022-02-07 10:11:19 -05:00
Charles deRousiers
86ece99784 Add rect light texture atlas support.
This changes allow to bind a larger amount of rect. light texture, and allows future support for rect light in forward & cluster passes.

#jira none
#rb sebastien.hillaire
#preflight 61fcebd0b5092d45ad110db4

[CL 18861192 by Charles deRousiers in ue5-main branch]
2022-02-04 04:18:10 -05:00
zach bethel
9996233f7a Removed unused legacy MSAA multi-texture support from IPooledRenderTarget.
- Deprecated legacy members from FPooledRenderTargetDesc.
 - Deprecated ETextureRenderTarget and removed from RDG.
 - TargetableTexture always equals ShaderResourceTexture.
 - Simplified render target pool FindFreeElement.
 - Create pooled buffers and textures with a known state.

#rb graham.wihlidal
#preflight 61f8488568795b2f45852274

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 18796880 in //UE5/Release-5.0/... via CL 18797840 via CL 18799070
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18799188 by zach bethel in ue5-main branch]
2022-01-31 17:22:31 -05:00
Marc Audy
c43360f47c Eliminate whitespace only differences between Release-Engine-Staging and Release-Engine-Test
#[fyi] Aurel.Cordonnier

#ushell-cherrypick of 18448630 by Marc.Audy
#preflight none

[CL 18483677 by Marc Audy in ue5-main branch]
2021-12-17 03:41:59 -05:00
Jules Blok
4e9b294e6f Refactor APIs that use EStereoscopicPass so they take a pass type flag and view index instead
This CL ensures we don't attempt to use this enum as both a view index and a pass type flag
It also adds EStereoscopicEye to give some pre-defined meaning to the view indices

#rb Jeff.Fisher
#rb peter.tarasenko
#rb steve.smith
#preflight 619ee54b801b361978d3fd11

#ROBOMERGE-OWNER: Jules.Blok
#ROBOMERGE-AUTHOR: jules.blok
#ROBOMERGE-SOURCE: CL 18291679 in //UE5/Release-5.0/... via CL 18291688
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
#ROBOMERGE-CONFLICT from-shelf

[CL 18291805 by Jules Blok in ue5-release-engine-test branch]
2021-11-24 21:57: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
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04: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
alejandro arango
991a41f693 SceneCaptureRendering: Initialized CopyCaptureToTargetSetViewportFn to avoid a crash.
This function gets initialized when there are scene capture components, but it could be called when there aren't any when rendering and CaptureNeedsSceneColor is true, which happens when the CaptureSource is SCS_SceneColorHDR.

#jira UE-126082
#rb rod.bogart
#preflight 613a80d180b8e7000177b895

#ROBOMERGE-AUTHOR: alejandro.arango
#ROBOMERGE-SOURCE: CL 17477802 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17477821 by alejandro arango in ue5-release-engine-test branch]
2021-09-09 18:54:15 -04:00
florin pascu
36de4878df Workaround for Editor deadlock in material editor while in Mobile Preview
#jira UE-123665
#rb Dmitriy.Dyomin
#preflight 6136ee109c40ec0001de27f5

#ROBOMERGE-AUTHOR: florin.pascu
#ROBOMERGE-SOURCE: CL 17441770 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17441782 by florin pascu in ue5-release-engine-test branch]
2021-09-07 02:53:03 -04:00
christopher waters
6c4b4a91a4 Adding a required StencilRef argument to SetGraphicsPipelineState.
#jira none
#rb zach.bethel, mihnea.balta, florin.pascu
#preflight 61312f4a79ce170001d4a79e

#ROBOMERGE-SOURCE: CL 17422777 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)
#ROBOMERGE[bot1]: emt

[CL 17422941 by christopher waters in ue5-release-engine-test branch]
2021-09-03 12:04:52 -04:00
aurel cordonnier
dc4bf61540 Merge from Release-Engine-Staging @ 17030559 to Release-Engine-Test
This represents UE4/Main @ 17030256 and Dev-PerfTest @ 17030553

[CL 17031509 by aurel cordonnier in ue5-release-engine-test branch]
2021-08-03 11:56:47 -04:00
florin pascu
4ffb3668ed Disable Parallel RDG for Mobile Platforms from the RenderGraph
#jira none
#rb Brian.White, Zach.Bethel
#preflight 6102e0852b00280001815605

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

[CL 16999011 by florin pascu in ue5-release-engine-test branch]
2021-07-29 14:29:00 -04:00
brian white
d4484a04c5 Disable parallel RDG execution for mobile renderer.
#ushell-cherrypick of 16988229 by zach.bethel
#rb Zach.Bethel, Brian.White
#jira UE-119712
#swarm https://p4-swarm.epicgames.net/reviews/16988240/v1/
#pf 6101d11dff10730001d2ede8

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

[CL 16990258 by brian white in ue5-release-engine-test branch]
2021-07-28 19:49:18 -04:00
zach bethel
89fc4cf833 Parallel RDG execution improvements.
- Added ERDGBuilderFlags::AllowParallelExecute to tag specific builders to attempt parallel execution. This avoids cases where small graphs fork tasks and end up causing contention. Only the main scene render graphs are tagged.
 - Moved RHI transition creation to an async task.
 - Moved parallel execute setup and dispatch to an async task.
 - Fixed RDG draining asserts using a short-term workaround by tagging relevant scene textures as non-transient.
 - Deprecated RDG AddPass utilities without names and fixed up last remnants.
 - Enabled parallel RDG execution by default.

[FYI] christopher.waters

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

[CL 16925957 by zach bethel in ue5-release-engine-test branch]
2021-07-22 12:43:00 -04:00
florin pascu
8b0c31429c Remove Opacity Pass MobileSceneCapture
Remove MobileSceneCapture, move everything to the shared SceneCaptureRendering file
Remove MobileSceneCapture.usf
#jira UE-118450
#rb Dmitriy.Dyomin, Jack.Porter
#preflight 60f56cd41d824300016bdb7a

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

[CL 16882856 by florin pascu in ue5-release-engine-test branch]
2021-07-19 09:12:09 -04:00
guillaume abadie
b5a4dfc800 Kills FPostProcessSettings::ScreenPercentage
#rb none

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

[CL 16848909 by guillaume abadie in ue5-release-engine-test branch]
2021-07-14 08:25:29 -04:00
zach bethel
5ec769f91e 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

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

[CL 16838724 by zach bethel in ue5-release-engine-test branch]
2021-07-13 12:38:37 -04:00