Commit Graph

147 Commits

Author SHA1 Message Date
Wei Liu
f85fb2c6f3 Fix a cook failure on android.
#jira none

#rb Dmitriy.Dyomin
#preflight 627bbd7f9f7ad2a14b63ff00

[CL 20139131 by Wei Liu in ue5-main branch]
2022-05-11 10:08:44 -04:00
Wei Liu
355707489e Refactor of mobile custom depth/stencil to line up with pc on all mobile platform.
#jira none

#rb Dmitriy.Dyomin
#fyi Serge.Bernier
#preflight 627b87a65d003338d95018bf

[CL 20135905 by Wei Liu in ue5-main branch]
2022-05-11 06:10:52 -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
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
Charles deRousiers
2257ad3325 Fix/Add split screen & VR support for Strata (i.e., Tiling/Lighting/SSS/Distortion).
This CL split the resources shared between views (non-buffer/tiled data) and resources unique to view (e.g., tile data). This is to ease overall setup, but we might re-regroup them later.

#rb none
#jira none
#preflight 62488f4d927e60e3418751db
#fyi sebastien.hillaire

[CL 19601993 by Charles deRousiers in ue5-main branch]
2022-04-02 14:31:01 -04:00
zach bethel
0143cb41fa Deprecated defunct legacy transient resource API and removed vestiges.
#preflight 61e0a87c250b9537f7837e74
#rb christopher.waters

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 18607884 in //UE5/Release-5.0/... via CL 18607913 via CL 18607948
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18607982 by zach bethel in ue5-main branch]
2022-01-13 17:56:22 -05:00
jules blok
732e637f62 Fix renderer issues when rendering multiple ISR passes.
- New functions are added to get the Primary View or all Secondary Views and takes advantage of that to replace hardcoded indices.
- Added support for retrieving a monoscopic projection/pose from IStereoRendering when a single frustum is needed for culling purposes.

#rb Steve.Smith
#rb Jeff.Fisher
#rb Zach.Bethel
#preflight 61de16e96a076ddb53cf59b4

#ROBOMERGE-AUTHOR: jules.blok
#ROBOMERGE-SOURCE: CL 18579012 in //UE5/Release-5.0/... via CL 18579021 via CL 18579025
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18579042 by jules blok in ue5-main branch]
2022-01-11 19:03:42 -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
andrew davidson
57beb335f2 Merging //UE5/Dev-LargeWorldCoordinates [at] 17581892 to //UE5/Main
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 17595295 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17595306 by andrew davidson in ue5-release-engine-test branch]
2021-09-22 10:01:48 -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
guillaume abadie
d348de0e43 Fixes responsive AA stencil bit through distortion rendering
#rb none
#preflight trivial

#ROBOMERGE-SOURCE: CL 17081567 via CL 17088820
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)

[CL 17089069 by guillaume abadie in ue5-release-engine-test branch]
2021-08-06 17:55:16 -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
sebastien hillaire
22d9a8715f Clarification of the current simple mapping from roughness to mip level used to achieve rough refraction with strata.
The render target now sotr the variance for a more linear accumulation.

#rb none

#ROBOMERGE-SOURCE: CL 16761311 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16763795 by sebastien hillaire in ue5-release-engine-test branch]
2021-06-23 18:05:24 -04:00
sebastien hillaire
49666cc416 Starta rough refraction
- updated cvar name
- added high quality offset for smoother rough refraaction
- updated TryToClip logic...

#rb none

#ROBOMERGE-SOURCE: CL 16754710 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16754711 by sebastien hillaire in ue5-release-engine-test branch]
2021-06-23 05:09:29 -04:00
sebastien hillaire
8b27012278 Strata rough refraction
- use computeutils to dispatch rdg compute
- added rdg GPU events
- tryclip is now allowed when final roughness is low

#rb none

#ROBOMERGE-SOURCE: CL 16754594 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16754597 by sebastien hillaire in ue5-release-engine-test branch]
2021-06-23 04:23:31 -04:00
sebastien hillaire
bc66ba65f2 Made the roughness buffer be higher precision as this is needed for smoother rough refraction transitions.
#rb none

#ROBOMERGE-SOURCE: CL 16747453 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16747460 by sebastien hillaire in ue5-release-engine-test branch]
2021-06-22 15:28:58 -04:00
sebastien hillaire
f72e766710 Fixed compilation error on GLES platofrms
#rb none

#ROBOMERGE-SOURCE: CL 16740138 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16740203 by sebastien hillaire in ue5-release-engine-test branch]
2021-06-22 05:55:05 -04:00
sebastien hillaire
84ab220858 Added basic gaussian blur to the scene color buffer in order to approximate rough refraction.
Separated from bloom for now.
This should be resolution independent (will need more test down the line)
Maximum filter sample count is capped.

#rb none
[FYI] charles.derousiers

#ROBOMERGE-SOURCE: CL 16739838 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16739853 by sebastien hillaire in ue5-release-engine-test branch]
2021-06-22 03:56:05 -04:00
sebastien hillaire
6f2caca441 Strata more preparation for rough refraction
- Added roughness scatter buffer (not fed properly)
- Added basic scenbe color mip generation (next todo: blur it)
- Mip level is selected based on roughness when applying distortion

shooter game tested
#rb none

#ROBOMERGE-SOURCE: CL 16726566 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16726571 by sebastien hillaire in ue5-release-engine-test branch]
2021-06-21 07:04:44 -04:00
Jason Nadro
8d0ba9fe38 Converting FMeshPassProcessors to use ODSC.
- FDistortionMeshProcessor

#rb Arciel.Rekman
#review-16131009
#jira UE-113686

[CL 16157959 by Jason Nadro in ue5-main branch]
2021-04-29 11:54:52 -04:00
christopher waters
c45f1dfad5 Removing Tessellation:
- Removed Tessellation settings from Materials and Material Interfaces
- Removed Adjacency buffers from Static and Skeletal Meshes.

#jira UE-94564
#rb jeremy.moore, josie.yang, kevin.ortegren, yuriy.odonnell

#ROBOMERGE-OWNER: christopher.waters
#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 15501023 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
#ROBOMERGE-CONFLICT from-shelf

[CL 15502653 by christopher waters in ue5-main branch]
2021-02-23 14:03:21 -04:00
Marc Audy
bc88b73a29 Merge Release-Engine-Staging to Main @ CL# 15151250
Represents UE4/Main @ 15133763

[CL 15158774 by Marc Audy in ue5-main branch]
2021-01-21 16:22:06 -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