Commit Graph

93 Commits

Author SHA1 Message Date
Charles deRousiers
61cf50b66f Change Strata binding buffer function args to take view instead of the explicit scene data.
#rb none
#jira none
#preflight 6246ee2a292f228e0914eed2
#fyi sebastien.hillaire

[CL 19586823 by Charles deRousiers in ue5-main branch]
2022-04-01 08:35:55 -04:00
Charles deRousiers
888af2ee5f *First* pass for adding Lumen support for Strata.
This CL makes ScreenProbe Diffuse/Reflection 'work' with Strata by relying on Strata's TopLayerData in most places. Only the final integration considers the full set of lobes.
This CL does 'not' address LumenCard material evaluation, nor HW raytracing support. Both has be done in a separate CL.

* Add (weak/simple) material in the realm of Lumen.
* Add support for Strata final DiffuseIndirectComposite
* Add simple place holder for Strata sampling based on TopLayerData

There are several follows:
 * Sample generation (importance sampling, multi-lobes selection, ...) (done in a separate CL)
 * Card material evaluations (done in a separate CL)
 * HW Raytracing support

Test - Regression (visual and performance) has been done on CitySample
* Performance has been measured on console and are unchanged.
* Occupancy on console remain unchanged for ScreenProbeGather/Reflection/Composition

#rb daniel.wright, sebastien.hillaire
#jira none
#preflight 62279c57695c94f981ae2c24

[CL 19306632 by Charles deRousiers in ue5-main branch]
2022-03-08 13:29:54 -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
ben ingram
d1124c2e41 Move a bunch of lighting calculations to translated world space, fixes various problems at LWC scale
#preflight 61f1760afd5285142b43178a
#rb Daniel.Wright, tiago.costa, Andrew.Lauritzen, charles.derousiers
#jira UE-139831

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

[CL 18740039 by ben ingram in ue5-main branch]
2022-01-26 13:56:31 -05:00
jason hoerner
cf85e09cc8 Fix for RDG validation assert when enabling Screen Space GI. Need to pull the texture reference for temporal effect handling from the UAV, since that's flagged as accessible, rather than the texture itself.
#jira UE-138145 UE-139667
#rnx
#rb jason.nadro mihnea.balta
#preflight 61edff8cb609ee76a17dca7c

#ROBOMERGE-AUTHOR: jason.hoerner
#ROBOMERGE-SOURCE: CL 18709633 in //UE5/Release-5.0/... via CL 18709658 via CL 18709788
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18709824 by jason hoerner in ue5-main branch]
2022-01-24 11:35:55 -05:00
jason hoerner
5600dd7c35 UE5_RELEASE: MGPU, numerous fixes to get EngineTest AFR, and Virtual Production City map to run with multiple GPUs. Ultimately there were 3 crash sources (RayTracing, Nanite, Distance Field streaming), each of which required a couple fixes, plus infrastructure to support those fixes...
There remain significant visual artifacts in the Virtual Production City map.  Lumen has serious issues with multiple views in both single and multi-GPU modes -- I think Lumen data needs to be split per view family to solve this.  There is some corrupt geometry in the second view, which may be Nanite or instance rendering related (or something else entirely).  To narrow down these issues, I think I'm going to need to extend the DumpGPU feature to be able to do more effective MGPU graphical debugging, since none of PIX, RenderDoc, or NSight work.  But at least it doesn't crash now...

Full list of changes:
* CVAR (DC.MultiGPUMode) to override multi-GPU mode for Display Cluster, debug feature copied over from 4.27.
* Barrier and synchronization fixes for RHITransferTextures copied over 4.27.  Future work will make RDG handle multi-GPU transitions more seamlessly...
* CVAR (DC.ForceCrossGPUCopy) to force expensive full synchronization and copy of resources cross GPU at the end of each view family render (for debugging).  RHITransferTextures upgraded to support copying things besides 2D textures, including other texture resources and buffers.
* AFR temporal fixes from a previous CL (which I moved from my single GPU to multi GPU PC), now improved to avoid some validation asserts in Debug builds (pass inputs not declared, GetParent()->GetRHI() not working because parent not declared to pass).
* Ray tracing (hang):  acceleration buffers are branched per GPU, as GPU virtual addresses for resources internally referenced by these buffers may vary per GPU.  Needed to add infrastructure to support buffers that duplicate memory per GPU, rather than using driver aliasing of the underlying resource.
* Ray tracing (hang):  some buffer bindings weren't using a proper GPU index.
* Nanite (hang):  Force initial clear of Nanite.MainAndPostNodesAndClusterBatchesBuffer to run on all GPUs.  Solves GPU hang in shadow rendering the first frame (due to shadow rendering running across all GPUs), and later random hangs in view rendering.
* Distance field streaming (assert):  GPU readback staging buffers need to be branched per GPU, as the underlying class is single device.  GPU readback buffers and textures properly take into account the GPU they were last written on when locking and unlocking.  Includes handling an edge case where a write can be queued when a lock is active, due to the deferred way commands are played back in the render graph.
* Distance field streaming (assert):  UAV clear wasn't taking into account GPU index.
* GPU scene update needs to run across all GPUs.
* Fix for "DumpGPU" command to avoid assert with MGPU -- arbitrarily pick a GPU (last index) when the GPU mask contains multiple bits.  Hope to improve this in the future, but it works.

#rnx
#rb mihnea.balta juan.canada tiago.costa kenzo.terelst
#jira none
#preflight 61ba7edbdc58e54b3318fdf5

#ROBOMERGE-AUTHOR: jason.hoerner
#ROBOMERGE-SOURCE: CL 18472819 in //UE5/Release-5.0/... via CL 18473380
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18473412 by jason hoerner in ue5-release-engine-test branch]
2021-12-15 23:12:04 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -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
jeannoe morissette
17b84d83db Fix all cases of single scalar in shader parameter arrays to respect 16 byte alignment for Vulkan.
Add static_assert to prevent the creation of new ones moving forward.
Used SHADER_PARAMETER_SCALAR_ARRAY/GET_SCALAR_ARRAY_ELEMENT for single parameters, or packed them with surrounding parameters when possible.

#rb Guillaume.Abadie,Daniel.Wright,Charles.deRousiers
#preflight 61577bf15631d900011d59a1

#ROBOMERGE-AUTHOR: jeannoe.morissette
#ROBOMERGE-SOURCE: CL 17707027 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17707037 by jeannoe morissette in ue5-release-engine-test branch]
2021-10-04 09:14:58 -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
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
andrew lauritzen
9b9eda9628 Remove unused virtual shadow map denoiser path
No more need for writing out the "signal" texture info, so reduce that to single F32 for shadow factor
No need to return HitDistance as far up the stack in the shaders
Remove VSM defines and permutations from screen space denoiser

#rb guillaume.abadie
#lock nick.whiting

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

[CL 16117874 by andrew lauritzen in ue5-main branch]
2021-04-26 15:47:32 -04:00
chris kulla
31b8f05a27 Remove QuasiRandom and Halton code in favor of the newer random sequence
The last remaining usage was inside denoising code. This code assumes the sampling pattern is similar to what was used during rendering which was no longer true since we switched to RandomSequence there a while ago.

#rb Patrick.Kelly, Guillaume.Abadie
#preflight 6078602906b89e0001968b19

[CL 16023123 by chris kulla in ue5-main branch]
2021-04-15 12:55:18 -04:00
andrew lauritzen
92b07781d7 Always use compute shader for VSM projection
- Adaptive ray counts for SMRT now work even with pass per light
- Removes a few divergences between the logic in the two paths

Remove debug projection stuff for now; will reimplement with a separate UAV write later

Remove temporal filtering for denoiser (it was broken and would need to be implemented slightly differently with the new path anyways)

Split cvar to allow separate denoiser toggle for directional (default on) and local (default off) lights

Enable SMRT for local lights and VSM caching by default

#rb brian.karis

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

[CL 15708180 by andrew lauritzen in ue5-main branch]
2021-03-15 22:06:28 -04:00
Marc Audy
9753392e2b Merge UE5/RES CL# 15462083 to UE5/Main
This represents UE4/Main @ 15414221

[CL 15463811 by Marc Audy in ue5-main branch]
2021-02-18 18:13:28 -04:00
graham wihlidal
200151a3bc Renamed r.Shadow.v.* cvars to r.Shadow.Virtual.* to be more obvious, and also renamed VSM.* resource prefixes to Shadow.Virtual.*
#rb brian.karis
[FYI] ola.olsson, andrew.lauritzen

#ROBOMERGE-SOURCE: CL 15450709 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15454805 by graham wihlidal in ue5-main branch]
2021-02-18 13:44:36 -04:00
Marc Audy
cac1fe0019 Merge UE5/Release-Engine-Staging @ CL# 15299266 to UE5/Main
This represents UE4/Main @ CL# 15277572

[CL 15299962 by Marc Audy in ue5-main branch]
2021-02-03 14:57:28 -04:00
Guillaume Abadie
7e6a81235b Adds prefixes on MotionBlur, DOF and Denoiser RDG resources
#rb none

[CL 15260821 by Guillaume Abadie in ue5-main branch]
2021-01-29 06:49:13 -04:00
Marc Audy
bc88b73a29 Merge Release-Engine-Staging to Main @ CL# 15151250
Represents UE4/Main @ 15133763

[CL 15158774 by Marc Audy in ue5-main branch]
2021-01-21 16:22:06 -04:00
Andrew Davidson
10bca5261b Double math ambiguity Engine fixes
#rb jeanfrancois.dube, trivial

[CL 14974758 by Andrew Davidson in ue5-main branch]
2021-01-04 07:59:22 -04:00
andrew lauritzen
fb0b1d790b Initial shadow map ray tracing support for directional lights
- Disabled by defaul to start. Enable with r.Shadow.v.SMRT.RayCountDirectional 1
- Denoiser will now use temporal reprojection when SMRT is enabled (disable with r.Shadow.v.Denoiser.Temporal 0)
- Variety of fixes and refactors to existing VSM and projection code
- Still a few edge cases that will be improved in future around screen space trace and similar, but working fairly robustly for reasonable light source size settings

#rb ola.olsson
#fyi brian.karis

[CL 14942586 by andrew lauritzen in ue5-main branch]
2020-12-16 17:57:13 -04:00
Marc Audy
50a3d7d368 Merge Release-Engine-Staging to Main @ CL# 14467590
This represents UE4/Main @ 14432125 + some cherrypick fixes

[CL 14468207 by Marc Audy in ue5-main branch]
2020-10-09 22:42:26 -04:00
Jon Cain
06e5bb36a9 Moved ScreenSpaceDiffuseIndirect check to DataDrivenPlatformInfo, to allow disabling depending on SM5 platform.
#rb Brian.White, Guillaume.Abadie
#jira UE-100446

[CL 14445433 by Jon Cain in ue5-main branch]
2020-10-08 09:43:48 -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
Marc Audy
7379fa99c5 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14229157
[CL 14233282 by Marc Audy in ue5-main branch]
2020-09-01 14:07:48 -04:00