- Remove depedency on ViewUniformBuffer.
- Changed DistanceFieldSampler to use wrap addressing so that it matches the global sampler addressing mode.
#rb aleksander.netzel
#preflight 63063a1ac744dac967282411
[CL 21541307 by tiago costa in ue5-main branch]
Per-GPU Lumen scene data is automatically allocated if a View is running on a different GPU, and no per-view data is available, to handle cases where multi-GPU is in use outside of Display Cluster.
#jira UE-157691
#rnx
#rb Krzysztof.Narkowicz Daniel.Wright
#preflight 62d065d4a6141b6adffe82f3
[CL 21100710 by jason hoerner in ue5-main branch]
* Global SDF tracing uses a per-step noise comparison to implement semi-transparency (r.LumenScene.GlobalSDF.DitheredTransparencyStepThreshold), with a high min step size to regain performance
* Fixed Global SDF Coverage getting stomped when Movable objects were nearby, which was lowering its effective resolution. Empty space is now marked as not covered, which requires MinStepSizes to be kept smaller than or equal to ONE_SIDED_BAND_SIZE.
* Mesh SDF tracing now expands based on coverage and implements its own semi-transparency (r.Lumen.DiffuseIndirect.MeshSDF.DitheredTransparencyStepThreshold)
* Only Screen Probe and Radiance Cache traces enable dithered transparency to combat foliage over-occlusion. Visualize matches reflection behavior by default, so it has to have TraceInput.bDitheredTransparency = true to visualize what diffuse rays see.
#ROBOMERGE-AUTHOR: daniel.wright
#ROBOMERGE-SOURCE: CL 21019034 via CL 21019035 via CL 21019036
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)
[CL 21023956 by daniel wright in ue5-main branch]
The refactor to get rid of the FSceneTextures and FSceneTexturesConfig global singletons has also been preserved. The FViewFamilyInfo is used to hold those structures, so client facing API functions that lack a scene renderer reference can still pull the FSceneTextures[Config] from the view family pointer. All other scene renderer state has been moved from FViewFamilyInfo back into FSceneRenderer.
#jira none
#rnx
#rb ola.olsson krzysztof.narkowicz zach.bethel
#preflight 629f770e233ae0a8f8fb7f2e
[CL 20540730 by jason hoerner in ue5-main branch]
- It was accumulating new indices resulting in unecessary updates.
Store PendingHeightFieldAdd/UpdateOps in TSet instead of TArray so that Contains/Remove calls are O(1).
#rb Krzysztof.Narkowicz
#preflight 627d0c089f7ad2a14be26bd9
[CL 20163847 by tiago costa in ue5-main branch]
- Replaced FRW{Structured, ByteAddress}Buffer with TRefCountPtr<FRDGPooledBuffer>
- Replaced ResizeResourceIfNeeded with Resize{Structured, ByteAddress}BufferIfNeeded.
- Replaced FScatterUploadBuffer with FRDGScatterUploadBuffer.
- Removed awkward copy of page table buffers now that scatters are on the RDG timeline.
- Reduced number of uniform buffers created by consolidating within FLumenSceneFrameTemporaries.
- Fixed up const-correctness of FLumenSceneFrameTemporaries to sanity check that resources were not being mutated later in the frame.
- Reduced explicit view creations somewhat.
- Distance fields needs an FDistanceFieldSceneFrameTemporaries to cache RDG resources, but I held off on this due to the number of files it would touch.
#rb krzyzstof.narkowicz, daniel.wright
#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 19921040 via CL 19922067 via CL 19922607
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
[CL 19925590 by zach bethel in ue5-main branch]
- Shaders sampling mesh distance fields must define OFFSET_DATA_STRUCT according to r.DFShadowOffsetDataStructure.
- Also renamed cvar r.DFShadowOffsetDataStructure to r.DistanceFields.OffsetDataStructure since it applies to all techniques sampling mesh distance fields.
#preflight 626661771a71643e8b8b07df
#rb Krzysztof.Narkowicz
#jira none
[CL 19900311 by tiago costa 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]
* Distance Field streaming GPU mask scope clean up, to avoid startup crash. Added single high level FRHIGPUMask::All() scope in PrepareDistanceFieldScene, to avoid the need to set the mask in multiple lower level functions, and hopefully cover future modifications to the distance field scene code. View dependent subset of the code is then masked to the view. Validation asserts added in case code gets moved around in the future.
* Fixed bug when generating SRVs for structured buffers -- wasn't pointing the SRV to the correct GPU buffer. Caused GPU hangs and all sorts of corrupted rendering.
* Fixed bug that RHICopyToResolveTarget wasn't using the correct GPU index. Main symptom was DumpGPU being non-functional on the second GPU, but could cause other artifacts as well.
#jira none
#rnx
#rb christopher.waters chris.kulla
#preflight 624716e2b6084b9832597015
[CL 19591778 by jason hoerner in ue5-main branch]
- Upload heightfield bounds tile + relative world position
- Upload heightfield tile + relative world matrices
- Positions are still converted to float when loaded in shader.
#rb none
#preflight 622118eebf662715a8c73d52
#jira none
[CL 19250645 by tiago costa in ue5-main branch]
- Was incorrectly casting rows of FMatrix to FVector4f.
- Cast matrix to FMatrix44f first.
#rb aleksander.netzel
#preflight 621c9c54037be0078c913673
#ROBOMERGE-AUTHOR: tiago.costa
#ROBOMERGE-SOURCE: CL 19171873 via CL 19171875 via CL 19171877 via CL 19172301
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)
[CL 19172357 by tiago costa in ue5-main branch]
- Upload bounds tile + relative world position
- Upload object tile + relative world matrices
- Positions are still converted to float when loaded in shader.
#rb aleksander.netzel
#preflight 6218e94fa77f4c4a4ba5be27
#jira UE-143275
[CL 19146964 by tiago costa in ue5-main branch]
- Required to support LWC.
- Modified GetDistanceFieldInstanceData to output InstanceLocalToPrimitive transforms.
- Apply Proxy->LocalToWorld in ProcessPrimitiveUpdate(...)
#preflight 62166c450f71e491cc0691c7
#rb Krzysztof.Narkowicz
[CL 19094749 by tiago costa in ue5-main branch]
Pullback on Voxel traces for Screen Probes, fixes leaking when resuming a screen trace
#rb Krzysztof.Narkowicz
#jira UE-141204
#preflight 61fb4a6ec431b6aac04e163e
#lockdown Michal.Valient
#ROBOMERGE-AUTHOR: daniel.wright
#ROBOMERGE-SOURCE: CL 18850068 in //UE5/Release-5.0/... via CL 18850157 via CL 18850823
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18850862 by daniel wright in ue5-main branch]
#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]
* Removed culled DF object copies during culling. Instead now only indices to culled objects are stored
* Refactored DF heightfield object loads into FHeightfieldObjectBounds and FHeightfieldObjectData
This is a step towards optimizing DF culling and reusing this code for Lumen Landscape culling
Perf Reverb on 2080:
* CullMeshSDFObjectsToFrustum 0.04ms->0.03ms (removed DF object copies)
* Other passes didn't change
#preflight 61f5a7b7694910780bd91918
#rb Tiago.Costa
#ROBOMERGE-AUTHOR: krzysztof.narkowicz
#ROBOMERGE-SOURCE: CL 18789232 in //UE5/Release-5.0/... via CL 18789258 via CL 18789368
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)
[CL 18789821 by krzysztof narkowicz in ue5-main branch]
FLinearColor has also been modified to make any double->float conversions explicit. Previously all 3D TVector versions were allowed to be implicit and thus could convert TVector<double> => FLinearColor => TVector4<float>.
Fixed up all engine and game casts. Added "//LWC_TODO: precision loss" around any explicit casts that previously were silently explicit and we may need to revisit for precision loss analysis.
#jira UE-122085
#rb Ben.Ingram, Andrew.Davidson
#preflight 61f24af473238441cb7bb0f1
#ROBOMERGE-AUTHOR: zak.middleton
#ROBOMERGE-SOURCE: CL 18751249 in //UE5/Release-5.0/... via CL 18751253 via CL 18751319
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)
[CL 18751326 by zak middleton in ue5-main branch]