Commit Graph

136 Commits

Author SHA1 Message Date
Sebastien Hillaire
afd09276d6 Fix for compilation strata compilation error.
#rb none
#preflight none

[CL 20221989 by Sebastien Hillaire in ue5-main branch]
2022-05-16 07:19:37 -04:00
Sebastien Hillaire
8e389aec73 Strata - SSS data rework and optimisation for classification and SSS. Gain quite a bit of performance back on low end deferred platforms.
Now header is only uint and extra data is only read if needed.

#rb none
#preflight https://horde.devtools.epicgames.com/job/62821984046b81bf9393b136
#fyi charles.derousiers

[CL 20221584 by Sebastien Hillaire in ue5-main branch]
2022-05-16 05:54:34 -04:00
Sebastien Hillaire
202f3c9fe7 Updated strata waveop code to only use RHI info and be vendor independent. (works post 20161673 which fixes waveop on a RHI)
#rb none
#preflight none
#fyi charles.derousiers

[CL 20161694 by Sebastien Hillaire in ue5-main branch]
2022-05-12 03:48:09 -04:00
Sebastien Hillaire
480e27f84d Fix for translucent shadow stencil being broken with Strata due to stencil not being in a correct start from the start.
#rb none
#preflight https://horde.devtools.epicgames.com/job/62794911822bdc69f01e4b9f
#fyi charles.derousiers

[CL 20105783 by Sebastien Hillaire in ue5-main branch]
2022-05-09 13:33:36 -04:00
Sebastien Hillaire
5587a7eee0 Strata - draw/dispatch complex wave first in order to have longer wave dispatch first, potentially increasing gpu work overlap and reducing long empy work tail.
All of them for good measure.
#rb none
#preflight https://horde.devtools.epicgames.com/job/62756d43c8382bead6b2191c
#fyi charles.derousiers

[CL 20082092 by Sebastien Hillaire in ue5-main branch]
2022-05-06 15:08:26 -04:00
Charles deRousiers
49b40e1e96 Add optional async support for Strata classification pass (enabled by default).
Save 0.08ms on simple case on last gen platform.

#rb none
#jira none
#preflight 62741a15021adeb35cb29fd7
#fyi sebastien.hillaire

[CL 20062542 by Charles deRousiers in ue5-main branch]
2022-05-05 15:00:34 -04:00
Charles deRousiers
a45e6f40c0 Remove BSDF offsets/tile overflow computation when Lumen or Strata Vis are disabled.
#rb none
#jira none
#preflight 6273d5eb6a646b1d153dd1b6
#fyi sebastien.hillaire

[CL 20057151 by Charles deRousiers in ue5-main branch]
2022-05-05 09:53:22 -04:00
charles derousiers
73ec63af04 Rename TileXXX_Overflow into OverfloewTileXXX.
#rb none
#preflight 626ffeb38063424f88ab0875

#ROBOMERGE-AUTHOR: charles.derousiers
#ROBOMERGE-SOURCE: CL 20010862 via CL 20010876 via CL 20010886
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20012253 by charles derousiers in ue5-main branch]
2022-05-02 14:06:39 -04:00
charles derousiers
eaf4693ada Fix deprecated GetSceneTextureExtent()
#rb none
#preflight skip

#ROBOMERGE-AUTHOR: charles.derousiers
#ROBOMERGE-SOURCE: CL 20008537 via CL 20008538 via CL 20008543
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20010003 by charles derousiers in ue5-main branch]
2022-05-02 12:12:36 -04:00
charles derousiers
a842d96c49 Add Lumen support for multi-layer Strata material.
This CL changes LumenScreenProbeGather and LumenReflection to support 'overflow' tiles which allows to lit multiple layers per pixels. The screen is now divided into the 'primary' space (i.e., the regular view rect), and an 'overflow' space (offset at the bottom of the view texture, and whose size is configurable with a CVars). During the classification/integration/... passes, an extra indirect pass is done for computing the overflow tiles. This 'flatten' layout also allows to bookeep history data from frame to frame.

There are a number of follow up to this CL when Strata is enabled:
* Multi-view code is in place but not working correctly yet when Strata is enabled
* Reflection bilateral filter place is not fully stable yet
* UAV overlap for resource written by the regular & overflow pass are not put in place yet
* 'Overflow' tile can have border filtering artifact that needs to be addressed.

Performance and occupancy regression have done on PS5 on CitySample.

#rb daniel.wright, sebastien.hillaire
#preflight 624ed58c9660409d77a83309

#ROBOMERGE-AUTHOR: charles.derousiers
#ROBOMERGE-SOURCE: CL 20008236 via CL 20008250 via CL 20008258
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20009992 by charles derousiers in ue5-main branch]
2022-05-02 12:12:18 -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
Sebastien Hillaire
c3aeb6eab7 Strata - Advanced debug progress.
- This debug mode is mode 3.
 - StrataTree can be written/read and used in later pass to print/draw on screen.

#rb none
#preflight 625864a37a394d0082adb970

[CL 19760364 by Sebastien Hillaire in ue5-main branch]
2022-04-14 14:28:02 -04:00
Sebastien Hillaire
674c1641ab Strata - advanced vis debug
- partial checkin to continue on another stream.
- Write to the end of the strata texture array is working.

#rb none
#preflight none
#fyi charles.derousiers

[CL 19752138 by Sebastien Hillaire in ue5-main branch]
2022-04-14 03:13:39 -04:00
Sebastien Hillaire
46d2599431 Strata - added debug to peel off layer by layer from the top.
#rb none
#preflight none (https://horde.devtools.epicgames.com/job/6257096677269238e16dcc60)
#fyi charles.derousiers

[CL 19742554 by Sebastien Hillaire in ue5-main branch]
2022-04-13 13:49:36 -04:00
Sebastien Hillaire
c29eade804 Strata - move visualisation code into its own file
#rb none
#preflight https://horde.devtools.epicgames.com/job/6256d16b1543022eed3ed6d9
#fyi charles.derousiers

[CL 19739154 by Sebastien Hillaire in ue5-main branch]
2022-04-13 09:51:33 -04:00
Charles deRousiers
90d824cd06 Change strata visualization to use ShaderPrint.
Add r.Strata.DebugMode CVar to toggle view mode. 1: default material vis. 2: BSDF count.

#rb none
#jira none
#preflight 6255bc1c153828d273362062
#fyi sebastien.hillaire

[CL 19725526 by Charles deRousiers in ue5-main branch]
2022-04-12 14:06:17 -04:00
Sebastien Hillaire
c288545f40 Strata - fixed nanite pass not registering extra render targets.
#rb none
#preflight https://horde.devtools.epicgames.com/job/624763b4b33098a72de49db9
#fyi charles.derousiers

[CL 19605239 by Sebastien Hillaire in ue5-main branch]
2022-04-04 03:13:11 -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
Charles deRousiers
61cf50b66f Change Strata binding buffer function args to take view instead of the explicit scene data.
#rb none
#jira none
#preflight 6246ee2a292f228e0914eed2
#fyi sebastien.hillaire

[CL 19586823 by Charles deRousiers in ue5-main branch]
2022-04-01 08:35:55 -04:00
Charles deRousiers
9d440f6a81 Remove STRATA_DATA_TILE_XXX to avoid confusion with STRATA_TILE.
#rb none
#jira none
#preflight 6245dbf39f404234145fc039

[CL 19574692 by Charles deRousiers in ue5-main branch]
2022-03-31 13:05:44 -04:00
Charles deRousiers
e1a4461f77 Add Strata tile buffer overflow to Strata uniform buffer.
#rb none
#jira none
#preflight 6245d55dc667881bf4f91544
#fyi sebastien.hillaire

[CL 19574416 by Charles deRousiers in ue5-main branch]
2022-03-31 12:43:49 -04:00
christopher waters
cb6ce0960c Easier FRHITextureCreateDesc construction and FRHITextureDesc static CreateXXX deprecation
- Deprecated all the Create functions in FRHITextureDesc
- Added Create functions to FRDGTextureDesc which now derives from FRHITextureDesc instead of just being an alias
- FRHITextureCreateDesc can now be constructed functionally via SetXXX functions that return a reference to the FRHITextureCreateDesc
- Fixed a couple bad uses of FRHITexture*Desc types that should have been using FRDGTextureDesc

#jira none
#rb zach.bethel, luke.thatcher, mihnea.balta
#preflight 623df2e16d39f6b5a057299e

[CL 19516773 by christopher waters in ue5-main branch]
2022-03-25 14:18:22 -04:00
Charles deRousiers
38a92f774d Add indirect dispatch for Strata overflow tiles
#rb none
#jira none
#preflight 6238526788538cd45ec4ff7a
#fyi sebastien.hillaire

[CL 19450189 by Charles deRousiers in ue5-main branch]
2022-03-21 06:29:05 -04:00
Charles deRousiers
b993ce8650 Add BSDF tile and BSDF offset computation.
For pixel with complex/multi-BSDF computes BSDF material byte/index offsets and 'overflowing' tile.

This wil be used by Lumen for handling/parallelizing lighting computation.

#rb none
#jira none
#preflight 6234c38848746817f13c87bb
#fyi sebastien.hillaire

[CL 19438082 by Charles deRousiers in ue5-main branch]
2022-03-18 13:43:33 -04:00