Commit Graph

116 Commits

Author SHA1 Message Date
Krzysztof Narkowicz
453577c165 Improved mesh distance field distance to surface computation when using non uniform scale. It now computes a perfect distance to the object's bounding box. This is also now a common function used for the global SDF compose and for mesh SDF culling (previous mesh SDF culling function was buggy and was failing for non uniform scaled and rotated objects).
#fyi Daniel.Wright, Patrick.Kelly

[CL 14629023 by Krzysztof Narkowicz in ue5-main branch]
2020-11-02 12:27:17 -04:00
Krzysztof Narkowicz
14d02c6809 MeshSDF - implemented a tight bounding box with one voxel margin for bilinear gradient reconstruction. This allowed the MESH_SDF_APPROX_MARGIN hack to be removed and secured all gradient reconstruction operations from reading outside of valid bounds. Also saved ~50% of SDF atlas space, and speed up some mesh SDF operations:
UpdateGlobalDistanceField: ~7% faster
TraceMeshSDFs: ~5% faster

#rb Daniel.Wright, Patrick.Kelly

[CL 14618591 by Krzysztof Narkowicz in ue5-main branch]
2020-10-29 23:43:01 -04:00
Krzysztof Narkowicz
81a4d0652b SDF - use min non-uniform axis to maintain conservative SDF distance. Distances are now underestimated, instead of overestimated. This guarantees that rays will always hit the surface.
#rb Patrick.Kelly

[CL 14593077 by Krzysztof Narkowicz in ue5-main branch]
2020-10-27 17:32:39 -04:00
zach bethel
f3fb7ddab6 Moved RDG builder to top of Deferred Shading Render function. Ported hit proxy rendering to RDG.
#rb christopher.waters
#jira none

[CL 14589785 by zach bethel in ue5-main branch]
2020-10-27 13:40:36 -04:00
Krzysztof Narkowicz
6a3e844487 Mesh distance field generation fixes:
* Fixed section filtering bug causing to generate SDF from random triangles when a single section was filtered out
* Removed plane hack, which was squashing some meshes and causing generation rays to randomly return backface / frontface hits

Tested in FortGPUTestBed and Fornite, but didn't notice any issues introduced by plane hack removal. If something breaks, then anyway we should fix it in the tracing code by improving non uniform SDF scale support there.

#rb Daniel.Wright

[CL 14571736 by Krzysztof Narkowicz in ue5-main branch]
2020-10-25 23:29:54 -04:00
Krzysztof Narkowicz
3a849204a4 Replaced multiple Lumen voxelization algorithms with single. New approach is based on caching visibility and consists out of two phases:
1. Cache trace hit points per voxel into a visibility buffer {meshId;HitT}
  * All camera and object updates are cached and converted into a list of dirty bricks
  * Build list of {brickId; meshId} for dirty regions
  * Clear vis buffer for dirty regions
  * Trace mesh SDF rays per list element, and scatter results with atomic into the vis buffer
2. Shade cached visibility buffer every frame
  * Clear voxel lighting climap
  * Compact voxel lighting vis buffer per brick
  * Shade compacted bricks

Reverb, NV 1080, Clipmap 0 in cave (largest object density in Reverb):
Previous:
   * 1.06ms
New one:
   * Update cache for a 4 voxel scroll on diagonal - 0.18ms
   *  Reshade: 0.14ms

#rb Daniel.Wright

[CL 14514004 by Krzysztof Narkowicz in ue5-main branch]
2020-10-19 10:34:37 -04:00
zach bethel
1be4df8f48 Removed deprecated resource transition API from the engine.
#rb kenzo.terelst, christopher.waters, mihnea.balta
#fyi will.damon, brian.white, rolando.caloca
#jira none

[CL 14495239 by zach bethel in ue5-main branch]
2020-10-14 14:20:26 -04:00
Krzysztof Narkowicz
73bedcf690 Fixed Lumen and Distance Field barrier API deprecation warnings
Fixed barrier error in PrimitiveToDFObjectIndexBuffer

#rb Daniel.Wright

[CL 14429464 by Krzysztof Narkowicz in ue5-main branch]
2020-10-06 10:38:41 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
Daniel Wright
97cf839625 Merging //Tasks/UE4/Private-Reverb-Development-Lumen/... to //UE5/Main/...
Contains all work on Lumen since shipping Reverb in March:
 * New Opaque Final Gather with higher quality in clean architecture and better performance
 * Improved global tracing which reduces leaking
 * New basic Reflections pipeline which respects material Roughness
 * New HZB traces that are more accurate at tracing against the depth buffer
 * Hardware Ray Tracing paths for Lumen shadowing and Final Gather
#rb none

[CL 14274844 by Daniel Wright in ue5-main branch]
2020-09-08 17:44:06 -04:00
Daniel Wright
e80c824432 Fix for Lumen in dx12
Copied cl 13694808 - Fix dx11 and dx12 inconsistency issue by renaming uploading resources.
Note: The same resource is only allowed to be locked/unlocked once per frame in dx12.
#rb Krzysztof.Narkowicz tiantian.xie

[CL 14088852 by Daniel Wright in ue5-main branch]
2020-08-11 23:51:09 -04:00
Michal Valient
3662d677a1 Fixed duplicate symbol triggering in StressTestUnity build mode
#fyi graham.wihlidal
#rb none

[CL 13835471 by Michal Valient in ue5-main branch]
2020-07-07 05:54:36 -04:00
Michal Valient
95d19f95b1 [REVERB] Merging //UE4/Private-Reverb-Development@13832732
#rb graham.wihlidal, rune.stubbe, brian.karis, andrew.lauritzen, jeff.farris

[CL 13834854 by Michal Valient in ue5-main branch]
2020-07-06 18:58:26 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00
Josh Adams
aa9705149b Copying Private-LoadTimes-4.24 stream to Main. Biggest changes are in Materials/Shader memory freezing.
#rb none

[CL 11282608 by Josh Adams in Main branch]
2020-02-06 13:13:41 -05:00
jian ru
14da645f0f Fix a crash when you enable RTHF shadow, disable, and then change scalability settings.
#ROBOMERGE-SOURCE: CL 11210645 via CL 11210675 via CL 11210687
#ROBOMERGE-BOT: (v643-11205221)

[CL 11210690 by jian ru in Main branch]
2020-02-03 17:19:56 -05:00
jian ru
97a524b0cd RTHF shadow - added support that allows light cast inside terrains through holes. Due to its cost, it is only enabled in the highest quality level. Currently, boundaries are jaggy for shadows cast through holes. Users need to hide the aritifact with DF shadow by placing static meshes around holes.
Fixed a crash that can happen on exit.
Further reduced self shadow artifact when using RTHF shadow.


#ROBOMERGE-SOURCE: CL 11077247 via CL 11077248 via CL 11077250
#ROBOMERGE-BOT: (v637-11041722)

[CL 11077251 by jian ru in Main branch]
2020-01-21 16:48:23 -05:00
jian ru
0edbf83fca RTHF shadow fixes:
- More flexible UV space allocation strategy for the heightfield atlas
- Fixed a bug where heightfield objects can be falsely culled
- Fixed a bug where heightfield object data is not updated when the atlas realloc


#ROBOMERGE-SOURCE: CL 11058973 via CL 11059839 via CL 11059892
#ROBOMERGE-BOT: (v637-11041722)

[CL 11059983 by jian ru in Main branch]
2020-01-17 19:01:20 -05:00
jian ru
c0944f4c73 Fix compile error
#ROBOMERGE-SOURCE: CL 10996594 via CL 10996595 via CL 10996600
#ROBOMERGE-BOT: (v633-10983880)

[CL 10996601 by jian ru in Main branch]
2020-01-15 15:32:46 -05:00
jian ru
983aa0af59 Extend distance field shadowing to also handle heightfields. This is another approach to shadow terrains. Compared to far shadow cascades, it showed lower RT and GPU overhead during internal testing.
#rb Krzysztof.Narkowicz
[FYI] Ben.Woodhouse


#ROBOMERGE-SOURCE: CL 10996123 via CL 10996131 via CL 10996136
#ROBOMERGE-BOT: (v633-10983880)

[CL 10996139 by jian ru in Main branch]
2020-01-15 14:47:38 -05:00
ryan durand
0f0464a30e Updating copyright for Engine Runtime.
#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]
2019-12-26 14:45:42 -05:00
Rolando Caloca
f83ae4807a Copying //UE4/Dev-Rendering@9317594 to Dev-RenderPlat-Staging
#rb none
#rnx

[CL 9317904 by Rolando Caloca in Dev-RenderPlat-Staging branch]
2019-10-01 13:03:04 -04:00
steve robb
14cab21e0c Deprecating ARRAY_COUNT and changing it to UE_ARRAY_COUNT.
Replicated from CL# 7924370.

#rb none


#ROBOMERGE-OWNER: steve.robb
#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 9279060 via CL 9279063
#ROBOMERGE-BOT: (v443-9013191)

[CL 9279836 by steve robb in Main branch]
2019-09-28 08:19:35 -04:00
mickael gilabert
f5ee8a1e77 Keep DistanceFieldData.ObjectBuffers persistent instead of recreating a new one when needed in UpdateGlobalDistanceFieldObjectRemoves
[REVIEW] [at]daniel.wright
#rnx


#ROBOMERGE-SOURCE: CL 6940274 via CL 6943907
#ROBOMERGE-BOT: (v366-6836689)

[CL 6946689 by mickael gilabert in Main branch]
2019-06-11 22:55:14 -04:00
Rolando Caloca
aa0d2303d6 Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main) @ 6944469
#rb none
#rnx

[CL 6944849 by Rolando Caloca in Main branch]
2019-06-11 18:27:07 -04:00