Commit Graph

108 Commits

Author SHA1 Message Date
fred kimberley
81b706b1b5 Fix build errors from removing implict conversion to FVector.
#rb Michael.Noland

#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 19260414 in //UE5/Release-Engine-Staging/...
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v924-19243027)

[CL 19264049 by fred kimberley in ue5-main branch]
2022-03-04 04:25:49 -05:00
tiago costa
403b305472 Distance Field LWC support #3
- 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]
2022-03-03 14:45:55 -05:00
tiago costa
ba33341ec7 Fix compiler error in Dev-Engine-Merge
- Add explicit cast to FMatrix44f

#rb none
#preflight none

#ROBOMERGE-AUTHOR: tiago.costa
#ROBOMERGE-SOURCE: CL 19172192 via CL 19172200 via CL 19172203 via CL 19172305
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19172362 by tiago costa in ue5-main branch]
2022-02-28 07:46:43 -05:00
tiago costa
e193b562e1 Fix height field shadowing
- 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]
2022-02-28 07:46:30 -05:00
tiago costa
b3333999eb Distance Field LWC support #1
- 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]
2022-02-25 09:55:54 -05:00
tiago costa
28c7b9f7e5 Store FDistanceFieldSceneData primitives LocalToWorld as FMatrix instead of FRenderTransform.
- 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]
2022-02-23 12:49:51 -05:00
daniel wright
f4d06b2349 Lowered r.DistanceFields.TwoSidedSurfaceBiasExpand to 1, it was causing severe foliage over-occlusion
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]
2022-02-03 16:07:31 -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
krzysztof narkowicz
0da8f71523 Refactored Distance Field culling
* 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]
2022-01-31 10:23:36 -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
zak middleton
36c99f6887 #ue5 - LWC: FVector4f <-> FVector4d conversion is now explicit.
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]
2022-01-27 03:30:41 -05:00
krzysztof narkowicz
83a5c30226 New Lumen user settings
Project
 * Ray Lighting Mode - project wide control for ray lighting quality

Post Process Volume
 * Lumen Scene Lighting Quality - drives Radiosity gather quality
 * Lumen Scene Detail - drives Lumen culling aggressiveness
 * Lumen Scene View Distance - controls the distance from the camera that Lumen Scene will be maintained
 * Lumen Scene Lighting Update Speed - drives Radiosity gather convergence speed
 * Final Gather Lighting Update Speed - drives Final Gather temporal accumulation strength
 * Max Trace Distance - the distance that Lumen features will trace through the scene
 * Ray Lighting Mode - local control for ray lighting quality

Primitive Component
 * Emissive Light Source - provides a hint to Lumen that the mesh has an important lighting contribution and should not be culled

Replaced r.Lumen.MaxTraceDistance with r.Lumen.MaxTraceDistanceScale
Increased MAX_GLOBAL_DF_CLIPMAPS to 6

#rb Krzysztof.Narkowicz
#preflight 61ef58b8ca3de856bce72093

#ROBOMERGE-OWNER: krzysztof.narkowicz
#ROBOMERGE-AUTHOR: daniel.wright
#ROBOMERGE-SOURCE: CL 18743987 in //UE5/Release-5.0/... via CL 18744701 via CL 18745671
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18745941 by krzysztof narkowicz in ue5-main branch]
2022-01-26 17:07:27 -05:00
ola olsson
b24810ca95 Make DF shadowing skip Nanite meshes if VSM is enabled (Nanite renders into VSM unconditionally causing double shadowing).
- needed for VSM / DF integration

#rb tiago.costa
#preflight 61e51e59a2616066f675d8b0
[FYI] andrew.lauritzen

#ROBOMERGE-AUTHOR: ola.olsson
#ROBOMERGE-SOURCE: CL 18631263 in //UE5/Release-5.0/... via CL 18631650 via CL 18631674
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18636666 by ola olsson in ue5-main branch]
2022-01-17 23:58:42 -05:00
tiago costa
679e68ba83 Remove deprecated DFGI and Heightfield GI
#preflight 61b28664c01c89f906c39eb8
#rb daniel.wright

#ROBOMERGE-AUTHOR: tiago.costa
#ROBOMERGE-SOURCE: CL 18426710 in //UE5/Release-5.0/... via CL 18426730
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18426734 by tiago costa in ue5-release-engine-test branch]
2021-12-09 18:23:24 -05:00
jon nabozny
8715ae11ab Merge ray tracing primitive culling into standard primitive culling. This allows the culling to use the same memory access patterns as the normal primitive culling, and ensures that the distance culled primitives and the fading primitives, propegate into the ray tracing primitives.
Bonus: Saves about 1.1 MS in the current branch.

[at]juan.canada, [at]ryan.vance, [at]patrick.kelly
#preflight 614364b9b5a4fa0001630d89
#lockdown andrew.firth

#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: brandon.dawson
#ROBOMERGE-SOURCE: CL 17552671 via CL 17946035 via CL 18363833 via CL 18363966
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18364062 by jon nabozny in ue5-release-engine-test branch]
2021-12-02 23:09:57 -05:00
tiago costa
496f7fd9d4 Don't include objects with "Cast Shadow" disabled in Distance Field Shadows
- Added bCastShadow flag to FDFObjectBounds
- Filter objects in CullObjectsForShadowCS

#jira FORT-426852
#rb Daniel.Wright
#preflight 619e2a010141b3c6da5b0108

#ROBOMERGE-AUTHOR: tiago.costa
#ROBOMERGE-SOURCE: CL 18282453 in //UE5/Release-5.0/... via CL 18282463
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18282467 by tiago costa in ue5-release-engine-test branch]
2021-11-24 07:33:55 -05:00
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -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
tiago costa
7b5c6e6ea8 Improve Distance Field rendering performance
- Reduce ALU, VGPR - move operations to CPU, reorganize asset data buffer.
- Added CSV stats to track atlas and indirection table size.
- DF shadow perf on heavy scenes improved by around 12% (3.75ms vs 4.3ms).

#rb daniel.wright
#jira UE-120168
#preflight 6144599b4778fa00018e49a6

#ROBOMERGE-AUTHOR: tiago.costa
#ROBOMERGE-SOURCE: CL 17550410 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)
#ROBOMERGE[bot1]: EMT

[CL 17550414 by tiago costa in ue5-release-engine-test branch]
2021-09-17 06:33:42 -04:00
tiago costa
d9c4dec954 Fix distance field shadows when LWC is enabled.
- Incorrect reinterpret cast to float.

#rb daniel.wright
#preflight 61269445eef7f30001b92ddb

#ROBOMERGE-SOURCE: CL 17309679 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17309687 by tiago costa in ue5-release-engine-test branch]
2021-08-25 17:05:27 -04:00
tiago costa
31d59cd946 Fix stat name for PrepareDistanceFieldScene
#rb daniel.wright
#pf 610c535b26ea630001a87682

#ROBOMERGE-SOURCE: CL 17080985 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)

[CL 17080996 by tiago costa in ue5-release-engine-test branch]
2021-08-06 05:57:19 -04:00
tiago costa
3831a71619 Updated CapsuleShadowing to RDG.
- Resource states/transitions handled by RDG
- Shader bindings using SHADER_PARAMETER_STRUCT.
Converted data and intermediate buffers to StructuredBuffers.
Removed a lot of unecessary structs from DistanceFiedLightingShared.h

#rb krzysztof.narkowicz
#preflight 61004413ab06550001afad83

#ROBOMERGE-SOURCE: CL 16971682 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16971689 by tiago costa in ue5-release-engine-test branch]
2021-07-27 15:02:57 -04:00
zach bethel
a44fbef833 Incremental fix-up to add names to RDG passes and use the correct RHI command list.
#rb christopher.waters

#ROBOMERGE-SOURCE: CL 16923748 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16923764 by zach bethel in ue5-release-engine-test branch]
2021-07-22 11:00:18 -04:00
krzysztof narkowicz
2a8132abb9 DF PrimitiveModifiedBounds memory and performance optimizations. This helps a lot in large scenes which place lots of objects onto this list:
*Don't track modified bounds if they are outside of the interest range of Global Distance Field or Lumen
*Change FBox to FRenderBounds (4 bytes less per box)
*Try to keep PrimitiveModifiedBounds memory allocation based on the last frame's usage

#rb Daniel.Wright

#ROBOMERGE-SOURCE: CL 16697019 via CL 16697029
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16697032 by krzysztof narkowicz in ue5-release-engine-test branch]
2021-06-16 17:48:21 -04:00
graham wihlidal
f602dcf242 Big cleanup/refactor of InstanceData* (renamed to InstanceSceneData* to match many other places already calling it that, and to disambiguate upcoming changes that add another instance data buffer to GPU Scene for arbitrary data payloads). This change also removes the virtuals on FPrimitiveSceneProxy for the instance list along with lots of copy paste code for all the derived types, and instead makes it a built-in feature of the base proxy (since nearly everything supports GPU Scene instancing now).
#rb ola.olsson
[FYI] brian.karis
#preflight 60c4d5c586ce760001377f2a

#ROBOMERGE-OWNER: graham.wihlidal
#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 16660135 via CL 16660883
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v834-16658389)

[CL 16660909 by graham wihlidal in ue5-release-engine-test branch]
2021-06-14 13:43:26 -04:00