* 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]
* 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]
- By default mesh preview doesn't update in real time so temporal ghosting doesn't clear.
- Don't use temporal history when View.Family->bRealtimeUpdate == false.
- This matches what other techniques such as TAA and Motion Blur do.
#jira UE-113515
#rb Krzysztof.Narkowicz
#preflight 620d5b5b8a1ea160098312ca
#lockdown Juan.Canada
#ROBOMERGE-AUTHOR: tiago.costa
#ROBOMERGE-SOURCE: CL 19068115 in //UE5/Release-5.0/... via CL 19087974
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)
[CL 19127325 by tiago costa in ue5-main branch]
- Convert FDFAOUpsampleParameters to SHADER_PARAMETER_STRUCT.
- Added DistanceField::SetupAOUpsampleParameters helper function to perform the necessary logic.
- Convert FGeometryAwareUpsampleParameters to SHADER_PARAMETER_STRUCT.
- Added SetupGeometryAwareUpsampleParameters helper function to perform the necessary logic.
- Updated TFilterHistoryPS to use SHADER_PERMUTATION_BOOL.
- Removed all legacy shader parameters from FUpdateHistoryDepthRejectionPS, FFilterHistoryPS, FGeometryAwareUpsamplePS, FDistanceFieldAOUpsamplePS.
#preflight 61b27e60d735d7945298a45f
#rb daniel.wright
#ROBOMERGE-AUTHOR: tiago.costa
#ROBOMERGE-SOURCE: CL 18426257 in //UE5/Release-5.0/... via CL 18426282
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)
[CL 18426292 by tiago costa in ue5-release-engine-test branch]
- Convert FAOParameters to SHADER_PARAMETER_STRUCT.
- Added DistanceField::SetupAOShaderParameters helper function to perform the necessary logic.
- Removed all legacy shader parameters from FComputeDistanceFieldNormalPS, FComputeDistanceFieldNormalCS, FBuildTileConesCS, FObjectCullVS, FObjectCullPS
- Use FComputeShaderUtils::AddPass for the compute shaders listed above.
#preflight 61b0e21fb12ed60581b08372
#rb daniel.wright, sebastien.hillaire
#ROBOMERGE-AUTHOR: tiago.costa
#ROBOMERGE-SOURCE: CL 18417142 in //UE5/Release-5.0/... via CL 18417143
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)
[CL 18417145 by tiago costa in ue5-release-engine-test branch]
- 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]
* Added r.DistanceFields.SupportEvenIfHardwareRayTracingSupported to allow to skip DF scene creation and DF streaming if HWRT is supported. Should be really a run-time switch, but it's something for later. By default set to 1 and everything works as before
* Added ShouldCompileDistanceFieldShaders to share shader compilation conditions between all DF shaders
#rb Patrick.Kelly
[FYI] Patrick.Kelly, Daniel.Wright, Tiago.Costa
#ROBOMERGE-SOURCE: CL 16825135 via CL 16825147
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)
[CL 16825153 by krzysztof narkowicz in ue5-release-engine-test branch]
Fallback to temporal sample index 0 when there is no view state.
#jira UE-118418
#rb juan.canada
#ROBOMERGE-SOURCE: CL 16705663 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)
[CL 16705669 by tiago costa in ue5-release-engine-test branch]
#rnx
#rb none
#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)
[CL 10870549 by ryan durand in Main branch]