Commit Graph

170 Commits

Author SHA1 Message Date
Arciel Rekman
3dd36a1d5f Share translucency light volume textures between both views of a stereo pair (UE-148569).
#rb Rob.Srinivasiah
#jira UE-148569
#preflight 627143035e6ce673f442a3dc
#review @Robert.Srinivasiah

[CL 20026126 by Arciel Rekman in ue5-main branch]
2022-05-03 11:15:00 -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
Charles deRousiers
a02d41c4ee Renamed PROJECT_STRATA into STRATA_ENABLED.
This avoids to define STRATA_ENABLED as 'env. define' for all global shaders needing a Strata specific path.

#rb none
#jira none
#fyi sebastien.hillaire
#preflight 62151b25797dbbeb472ae2eb

[CL 19074999 by Charles deRousiers in ue5-main branch]
2022-02-22 12:35:58 -05:00
Charles deRousiers
b683d19cc7 Add light function support for Strata.
#rb none
#jira none
#fyi sebastien.hillaire
#preflight 61fd3a090a43b689e176cf75

[CL 18862853 by Charles deRousiers in ue5-main branch]
2022-02-04 09:41:27 -05:00
fred kimberley
7fbfaf57c8 Require explicit constructors/casts when converting between FVector, FVector3d, and FVector3f.
#jira UE-122078
#rb Andrew.Davidson, Colin.McGinley
#preflight standard build

#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 18817999 in //UE5/Release-5.0/... via CL 18818012 via CL 18822871
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18824721 by fred kimberley in ue5-main branch]
2022-02-02 07:59:31 -05:00
ben ingram
b9dc4df2d5 Update translucent light cascade computation to use doubles
Fix translucent light functions
#jira UE-140298
#rb none
#preflight none

#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 18777026 in //UE5/Release-5.0/... via CL 18778379 via CL 18778874
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18778881 by ben ingram in ue5-main branch]
2022-01-28 16:42:15 -05:00
ben ingram
106460c245 TranslatedWorldSpace for translucent lighting volume
#preflight 61f2e76575432e9e8e5b083e
#jira UE-140298
#rb none

#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 18757121 in //UE5/Release-5.0/... via CL 18759609 via CL 18760254
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18760859 by ben ingram in ue5-main branch]
2022-01-27 15:48:17 -05:00
andrew davidson
3542cab338 FMatrix explicit cast fixes - Renderer
#rb ben.ingram, zak.middleton
#preflight 61f285e71e5d78c38307cda4

#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18752245 in //UE5/Release-5.0/... via CL 18752267 via CL 18752335
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18752338 by andrew davidson in ue5-main branch]
2022-01-27 07:20:20 -05:00
sebastien hillaire
ab2cbe44e7 Refactored GetVolumeShadowingShaderParameters to use the cascaded setting available on the light shadow info.
Tested with Lumen on cloud, astmosphere, translucent lighting volume and volumetric fog.

#preflight https://horde.devtools.epicgames.com/job/61dd4b42892dee612b3de9e0
#rb none
[FYI] daniel.wright

#ROBOMERGE-AUTHOR: sebastien.hillaire
#ROBOMERGE-SOURCE: CL 18569935 in //UE5/Release-5.0/... via CL 18569937
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18569938 by sebastien hillaire in ue5-release-engine-test branch]
2022-01-11 04:46:17 -05:00
sebastien hillaire
2517a32e17 Clean up code that was duplicated three times for light volume shadowing.
This tech debt resolve was finally possible after I converted all VolumetricFog and Translucent volume lighting to be 100% RDG and not use LAYOUT_FIELDS.

Fog, Translucent and Sky tested succesfully + green autotests.

#preflight https://horde.devtools.epicgames.com/job/61d56c161f62d3ad4d55f233
#rb none
[FYI] daniel.wright

#ROBOMERGE-AUTHOR: sebastien.hillaire
#ROBOMERGE-SOURCE: CL 18517087 in //UE5/Release-5.0/... via CL 18517100
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18517101 by sebastien hillaire in ue5-release-engine-test branch]
2022-01-05 05:08:09 -05:00
sebastien hillaire
8f32342bf4 Made more code common with default LightCloudTransmittance structure.
Code clean up.

#rb charles.derousiers
#preflight https://horde.devtools.epicgames.com/job/61a7585a6c7d8a7295fcd5cc

#ROBOMERGE-AUTHOR: sebastien.hillaire
#ROBOMERGE-SOURCE: CL 18500792 in //UE5/Release-5.0/... via CL 18500812
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18500821 by sebastien hillaire in ue5-release-engine-test branch]
2022-01-03 09:45:24 -05:00
sebastien hillaire
abcca46579 Refactoring FTranslucentLightingInjectPS to RDG.
#rb charles.derousiers
#preflight https://horde.devtools.epicgames.com/job/61d2d2329010df1954ef33e1
Green screenshot test: TranslucencyLightingMode

#ROBOMERGE-AUTHOR: sebastien.hillaire
#ROBOMERGE-SOURCE: CL 18500472 in //UE5/Release-5.0/... via CL 18500474
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18500476 by sebastien hillaire in ue5-release-engine-test branch]
2022-01-03 06:44:16 -05:00
charles derousiers
4af0547a14 Remove inverse square falloff permutation.
#rb none
#jira none
#preflight 61b35f7f13028c27d2976a4a

#ROBOMERGE-AUTHOR: charles.derousiers
#ROBOMERGE-SOURCE: CL 18430444 in //UE5/Release-5.0/... via CL 18435300
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18435529 by charles derousiers in ue5-release-engine-test branch]
2021-12-10 17:46:30 -05: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
aurel cordonnier
69fe095547 Merge from Release-Engine-Staging @ 17636544 to Release-Engine-Test
This represents UE4/Main @17638339 and Dev-PerfTest @17636504

[CL 17638842 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-27 19:54:25 -04: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
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
Andrew Davidson
3ddc3a4da3 Merge up from //UE5/Dev-LargeWorldCoordinates
#rb none

[CL 16211417 by Andrew Davidson in ue5-main branch]
2021-05-05 15:07:25 -04:00
Jason Nadro
85de604769 Converting FMeshPassProcessors to use ODSC.
- FTranslucencyDepthPassMeshProcessor

#rb Sebastien.Hillaire
#review-16145826
#jira UE-113686

[CL 16147265 by Jason Nadro in ue5-main branch]
2021-04-28 14:57:57 -04:00
Sebastien Hillaire
1a76315ed0 Fixed missing cloud shadow and crash with tweaking the directional light.
#jira https://jira.it.epicgames.com/browse/UE-111555
#rb none

[CL 15822590 by Sebastien Hillaire in ue5-main branch]
2021-03-25 09:46:28 -04:00
richard wallis
88f3c1b12c Change fallback texture Black Dummy to Volumetric Black Dummy (Texture3D) to match shader texture input.
#jira UE-108567
[at]will.damon, [at]zach.bethel
#rb will.damon,  zach.bethel

#ROBOMERGE-SOURCE: CL 15757976 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v783-15756269)

[CL 15772458 by richard wallis in ue5-main branch]
2021-03-22 22:24:33 -04:00
andrew lauritzen
9b0a6fab9d Remove complete shadow maps and replace with direct VSM sampling
- Move VSM parameters into a single uniform buffer; required for base pass rendering.
  - SRVs are initialized to dummy data until they are computed during the frame and subsequently updated before any VSM sampling.
  - Make names and usage more consistent with other UB bindings in mesh passes
- Direct injection of VSM into translucent volume and fog
- Support VSM sampling in forward lighting shaders
  - Enabled and bound currently for translucent forward and single pass water meshes
- Support VSM sampling in sky atmosphere and cloud rendering
  - NOTE: Sky atmosphere LUT pass currently executes before BasePass and ShadowDepths so it will not sample proper data and throw a warning. Moving passes around to address this will come in a future commit.

#rb Brian.Karis, Ola.Olsson, Sebastien.Hillaire, Zachary.Bethel

#ROBOMERGE-OWNER: andrew.lauritzen
#ROBOMERGE-AUTHOR: andrew.lauritzen
#ROBOMERGE-SOURCE: CL 15649858 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v779-15635321)
#ROBOMERGE-CONFLICT from-shelf

[CL 15650486 by andrew lauritzen in ue5-main branch]
2021-03-08 23:14:54 -04:00
Marc Audy
8f73cd7fa9 Merge UE5/Release-Engine-Staging @ 15630841 to UE5/Main
This represents UE4/Main @ 15601601

[CL 15631170 by Marc Audy in ue5-main branch]
2021-03-05 19:27:14 -04:00