Commit Graph

9046 Commits

Author SHA1 Message Date
eric renaudhoude
ed1ddf6eb1 Post-processing: Reconnect r.LUT.Size with the combined LUT/tonemapping texture size.
Increasing the LUT resolution can become necessary to mitigate precision artifacts with wide-gamut working color spaces.

#jira UE-170301
#rb benjamin.rouveyrol, guillaume.abadie
#preflight 63696783843e6ac794811b27

[CL 23175071 by eric renaudhoude in ue5-main branch]
2022-11-17 09:03:21 -05:00
Sebastien Hillaire
4c3d0a7a95 VCloud on translucent fading in region depth can now be controled via a cvar.
#rb none
#preflight https://horde.devtools.epicgames.com/job/637617a43248425305c21519

[CL 23174402 by Sebastien Hillaire in ue5-main branch]
2022-11-17 07:27:58 -05:00
jeremy moore
97aaf9c7b5 Add r.VT.RVT.StreamingMips CVar.
Should be useful for debugging whether SVT is giving same result as RVT.

#localization none
#tests local
[FYI] jordan.walker

[CL 23172510 by jeremy moore in ue5-main branch]
2022-11-17 00:29:11 -05:00
Sebastien Hillaire
b19df6202a Strata - fixed static variable shadowing.
#rb none
#preflight none

[CL 23158492 by Sebastien Hillaire in ue5-main branch]
2022-11-16 13:54:10 -05:00
Sebastien Hillaire
b2ed584bf4 Removed cloud noisy gathering. Cause issue at edge and in fact was deemed not useful by artists. Tracing sample count is what matters.
This will also make the upsampling half=>full res faster.

#rb none
#preflight https://horde.devtools.epicgames.com/job/6375108b232e3d12cb376b84
#fyi daniel.elliott

[CL 23156358 by Sebastien Hillaire in ue5-main branch]
2022-11-16 12:09:49 -05:00
Sebastien Hillaire
cd4aa07281 Strata - added high quality normal according to GBuffer format.
#rb none
#preflight https://horde.devtools.epicgames.com/job/6374f970b6636838280f3278
#fyi charles.derousiers

[CL 23155230 by Sebastien Hillaire in ue5-main branch]
2022-11-16 11:35:48 -05:00
tiago costa
4f279a3872 Fix incorrect exposure when using raytracing debug visualization.
#rb none
#preflight 6374f6b5324842530577ee7b

[CL 23153902 by tiago costa in ue5-main branch]
2022-11-16 10:07:42 -05:00
tiago costa
4d9daec76d Process scheduled BLAS builds even in frames that don't need raytracing scene.
- Nanite::FRayTracingManager expects builds to be processed in the same frame their scheduled since it also impacts GPUScene updates.

#rb aleksander.netzel
#preflight 6374c9770c74adb48be7ccd2
#jira IRON-328

[CL 23153900 by tiago costa in ue5-main branch]
2022-11-16 10:07:06 -05:00
Sebastien Hillaire
f34b2df7d5 Fixed Strata looking bad on some platforms requiring render target format specification (not account for Strata target count, motion blur not specifying the correct index)
#rb none
#preflight https://horde.devtools.epicgames.com/job/63749aff3248425305676b3b
#fyi charles.derousiers, jamie.hayes

[CL 23151575 by Sebastien Hillaire in ue5-main branch]
2022-11-16 03:26:45 -05:00
benjamin rouveyrol
64d9e0a981 Remove fast clear on some resources that do not need it
#rb sebastien.hillaire ben.woodhouse eric.mcdaniel
#preflight 6373c7c8953c19d4358d1966

[CL 23148029 by benjamin rouveyrol in ue5-main branch]
2022-11-15 19:44:41 -05:00
guillaume abadie
2b9830335a Implements TSR's ComputeMoireLuma from scene color beforedistortion translucency
#rb none
#preflight 6373d73bee4d25f90a428c10

[CL 23148009 by guillaume abadie in ue5-main branch]
2022-11-15 19:44:07 -05:00
ben woodhouse
82e0e5d6e4 Fix shadowsdepths blocking waiting for async compute work to finish due to GPUScene resources ping-ponging between access modes. Using the shared ExternalResourceQueue avoids this.
[CL 23147878 by ben woodhouse in ue5-main branch]
2022-11-15 19:41:23 -05:00
daniel wright
56d35020a1 Lumen Reflections now sample SceneColor on hit (both SWRT and HWRT), to cover over the regions where Screen Traces gave up where they went behind an object. Improves reflection quality under foreground objects. r.Lumen.Reflections.SampleSceneColorAtHit
Cost is .03ms on 2080TI at 1080p
Fixed Lumen Reflection Screen Traces outputting too far of a distance when fading out at the edges of the screen
Added r.AOGlobalDistanceFieldForceUpdateOnce to allow working around Mesh SDF streaming latency

[CL 23147835 by daniel wright in ue5-main branch]
2022-11-15 19:40:26 -05:00
krzysztof narkowicz
e68fad4a77 Fixed missing Lumen reflections on non foliage using subsurface mode.
Instead of a binary r.Lumen.Reflections.Foliage, use r.Lumen.MaxRoughnessToTraceForFoliage cutoff.This allows to skip reflections rays on foliage, but still trace those from very smooth ice surfaces.

[REVIEW] [at]daniel.wright
#rb Daniel.Wright
[FYI] Ben.Woodhouse

#localization none
#tests PC_editor_and_PS5_replay

[CL 23147830 by krzysztof narkowicz in ue5-main branch]
2022-11-15 19:40:11 -05:00
Arciel Rekman
12a704a68a Make sure reflection capture View knows it's a capture during the construction.
#rb Rob.Srinivasiah
#jira prerequisite for UE-168931
#preflight none

[CL 23140802 by Arciel Rekman in ue5-main branch]
2022-11-15 14:56:36 -05:00
Krzysztof Narkowicz
9329f99086 Lumen - added some debug text to overview mode in order to display the current tracing mode
#fyi Daniel.Wright
#preflight skip

[CL 23136497 by Krzysztof Narkowicz in ue5-main branch]
2022-11-15 11:04:50 -05:00
tiago costa
1e44dca468 Improved HeightField object management.
- this fixes a number of crashes and issue with heightfields missing from global distance field when heightfield shadows are enabled.

- Context:
  - Heightfields are used by two techniques using different approaches:
    - Global Distance Field (r.AOGlobalDistanceField.Heightfield) - heightfields are composed one by one into Global SDF so there's no need for bindless resources or atlas.
    - Height Field Shadows (r.HeightFieldShadowing) - since all heightfields data must be accessible in the same dispatch, heightfields descriptiors are stored in structured buffers (HeightFieldObjectBuffers) and textures are copied to an atlas (GHeightFieldTextureAtlas/GHFVisibilityTextureAtlas).
  - FDistanceFieldSceneData::HeightfieldPrimitives is an array of relevant heighfield primitives.
  - For each primitive, DistanceFieldInstanceIndices contains the index of the corresponding entry in HeightfieldPrimitives array.
    - The same DistanceFieldInstanceIndices is also used to manage distance fields (there's an assumption that a primitive can have a distance field or a height field, but not both).
  - The codepath to manage the HeightFieldObjectBuffers and GHeightFieldTextureAtlas/GHFVisibilityTextureAtlas is only enabled when ShouldPrepareHeightFieldScene() returns true.
  - There's limited space in the atlas so it's not guaranteed that every loaded heightfield fits in the atlas.

- Issues with existing approach:
  - When the codepath to manage HeightFieldObjectBuffers/Atlases is enabled, only the heighfields that fit in the atlas are added to FDistanceFieldSceneData::HeightfieldPrimitives.
    - this means that in some cases not every loaded heighfield will be composed into the global distance field (since only primitives in HeightfieldPrimitives are included).
    - there are also a few bugs with the code that can result in crashes.
  - Heighfields that fail the inital allocation are not added to HeightfieldPrimitives even after space becomes available in the atlas.
    - the atlas itself correctly retries to fit failed allocations when space becomes available, however the higher level managment code doesn't handle this.

- Changes:
  - all heightfield primitives are added to FDistanceFieldSceneData::HeightfieldPrimitives regardless of whether they fit in atlas or not.
    - this way all heightfields will be included in global distance field
  - added a new field, bInAtlas, to entries in HeightFieldObjectBuffers.
  - during Height Field Shadows culling pass, heightfields not present in atlas are skipped.
  - significantly refactored relevant codepaths to simplify logic.

#rb Krzysztof.Narkowicz, Jian.Ru
#preflight 6372c0ef953c19d4353ad211

[CL 23131399 by tiago costa in ue5-main branch]
2022-11-14 20:42:26 -05:00
henrik karlsson
5b96352978 Fixes for c++ headerunits/modules.
* Adding forward declarations
* Adding "inline" in front of const/constexpr variables in headers
* Adding includes
* A few moves of ctor/dtor to cpp file

#preflight 6372b3ac0c74adb48b49f313
#rb none

[CL 23130896 by henrik karlsson in ue5-main branch]
2022-11-14 19:59:41 -05:00
derek ehrman
8df448566f [Backout] - CL23092056 - causing hangs on PC performance mode startup
[FYI] derek.ehrman
Original CL Desc
-----------------------------------------------------------------
Fix assert on IsInActualRenderingThread() by using IsInParallelRenderingThread() instead and inverting condition

#rnx
#rb Zach.Bethel
#preflight 636d4af5a430c8fbeab23e14
#p4v-cherrypick 23091910
[FYI] James.Doverspike, Danny.Couture, Zach.Bethel

[CL 23119732 by derek ehrman in ue5-main branch]
2022-11-14 11:48:57 -05:00
aleksander netzel
5fb13876bb Add proper support for streamed geometries (geometries initialized as StreamingDestination) when dynamic ray tracing is enabled:
* Add FRayTracingGeometry::EGeometryStateFlags for tracking the state instead of several bools:
 - Add new state for tracking if the geometry was streamed in - its primary use is for dynamic ray tracing.
 - When ray tracing is toggled on at runtime we only recreate geometries that were marked as streamed in.
* Streamed geometries have to be created in a different way than regular geometries:
 - Creating geometry with StreamingDestination type will not allocate any memory for BLAS buffers.
 - Those can only be initialized by InitRHIForStreaming from temporary geometry with a StreamingSource type
 - Added FRayTracingGeometry::InitRHIForDynamicRayTracing() to handle both StreamingDestination and Rendering
  - For StreamingDestination it will do similar steps as normal mesh streaming does.
* Add missing RayTracingGeometry initialization when dynamic ray tracing was enabled but ray tracing was disabled.

#rb tiago.costa, yuriy.odonnell
#preflight 6372245ebf76990b71f5d021

[CL 23116977 by aleksander netzel in ue5-main branch]
2022-11-14 08:48:54 -05:00
tiago costa
43647b0e3a Prevent issues in FRayTracingInstanceDescriptor due to out-of-range values by masking bits.
- Otherwise they can end up overwriting InstanceMask/Flags.
- Also assert when setting up instance descriptors on CPU.

#rb yuriy.odonnell
#preflight skip

[CL 23116659 by tiago costa in ue5-main branch]
2022-11-14 08:05:42 -05:00
eric mcdaniel
808c3f698a Lumen: Fix for potential GPU hang in Lumen direct lighting when no lights are gathered
- issue
  - GPU hangs can be encountered when Lumen gathers no lights on a frame
  - InitializeLightTileIndirectArgs pass calculates group size off gathered light count
    - without gathered lights we get a group size of (0, 1, 1) which will not run any threads and hence will not populate the indirect args for the following passes
      - as we do not clear the indirect arg UAVs, this results in unitialized values for the indirect args of following passes

- fix
  - ensure a minimum group size of 1 for the InitializeLightTileIndirectArgs pass which will properly initialize the indirect args of the following passes

#rb Krzysztof.Narkowicz
#preflight 636f310032484253057be4c0

[CL 23113476 by eric mcdaniel in ue5-main branch]
2022-11-13 08:57:27 -05:00
christopher waters
efc59618fe Fixing NonUnity errors caused by CL 23104907 and CL 23104389
#preflight 636fcf81ee4d25f90a4a811d

[CL 23111199 by christopher waters in ue5-main branch]
2022-11-12 11:57:53 -05:00
ola olsson
21ad39d384 Support Nanite material visibility culling for VSM, r.Shadow.Virtual.Nanite.MaterialVisibility, default off.
#preflight 636e5ae58f4cb2e4dceda7e4

[CL 23107926 by ola olsson in ue5-main branch]
2022-11-11 18:59:13 -05:00
christopher waters
6bcc020b6c Removing deprecated code from Renderer and RenderCore.
#jira none
#rb zach.bethel
#preflight 636e8639232e3d12cbb610f9

[CL 23104907 by christopher waters in ue5-main branch]
2022-11-11 16:10:25 -05:00