Commit Graph

6494 Commits

Author SHA1 Message Date
Sebastien Hillaire
1634120580 Added helper function to volumetric cloud to help with color correction.
#rb none
#preflight none
#fyi eric.renaudhoude

[CL 23222164 by Sebastien Hillaire in ue5-main branch]
2022-11-21 11:38:22 -05:00
Charles deRousiers
99d1609bdb * Add opacity support for Strata SceneTexture evaluation
* Shared SceneTexture evaluation between Strata & legacy paths.

#rb none
#jira UE-170579
#preflight shader
#fyi sebastien.hillaire

[CL 23220356 by Charles deRousiers in ue5-main branch]
2022-11-21 09:34:49 -05:00
Charles deRousiers
39a2245fb5 Move IsLightVisible function into LightData.ush to remove duplicate/share code.
#rb none
#jira none
#preflight shader

[CL 23218392 by Charles deRousiers in ue5-main branch]
2022-11-21 03:11:30 -05:00
Charles deRousiers
a35061a7cf Add initial mobile support for Strata.
This CL adds
* Forward shading support (deferred support will be added later on)
* Slab/Eye/Hair/SLW support
* Directional/Local/Env/Planar lighting

There are a couple of followup to the initial CL:
* Fix incorrect env. specular contribution which is too low to what is supposed to be
* Add SH lighting support
* Merge StrataForwardLighting and StrataMobileFowardLighting if possible as there are a lot of overlap

#rb sebastien.hillaire, wei.liu, dmitriy.dyomin
#jira none
#preflight 6377b4ff3377450900751434

[CL 23218346 by Charles deRousiers in ue5-main branch]
2022-11-21 02:30:07 -05:00
Tiantian Xie
e78e3adee3 Fix bad directional light when it is parallel to (1,0,0) with a non-zero source radius.
#rb patrick.kelly
#preflight 6377a73c815e4b9b754f7839

[CL 23195463 by Tiantian Xie in ue5-main branch]
2022-11-18 11:10:19 -05:00
Sebastien Hillaire
c993aa4544 Strata - Fixed debug probes to handle strata MRT count.
#rb none
#preflight none

[CL 23194266 by Sebastien Hillaire in ue5-main branch]
2022-11-18 10:05:07 -05:00
Sebastien Hillaire
fd3d0d4b4b Strata - fixed some wanring related to HQ normals.
#rb none
#preflight none

[CL 23194167 by Sebastien Hillaire in ue5-main branch]
2022-11-18 09:56:34 -05:00
Sebastien Hillaire
7c7fac1f87 Rework of StrataUnpackTopLayerData to avoid having STRATA_TOP_LAYER_TYPE everywhere.
#rb none
#preflight none
#fyi charles.derousiers

[CL 23193773 by Sebastien Hillaire in ue5-main branch]
2022-11-18 09:02:51 -05:00
don boogert
af26b158de Landscape : Fix height pack function.
#rb jonathan.bird
[REVIEW] 63768e1ec85523092aad49a7

[CL 23184849 by don boogert in ue5-main branch]
2022-11-17 17:11:51 -05:00
tiantian xie
25e1b551b7 Revert PostprocessSubsurface (screen space) flag disabling the visual effect of subsurface shading model.
#rb james.doverspike
#preflight 63764e881c114bec054f754e
#preflight 63764e881c114bec054f754e

[CL 23178890 by tiantian xie in ue5-main branch]
2022-11-17 12:49:21 -05:00
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
Sebastien Hillaire
52d68351a1 VCloud - remove pixel position bias not needed when sampling blue noise since the texture will repeat naturally anyway.
#rb none
#preflight none

[CL 23174335 by Sebastien Hillaire in ue5-main branch]
2022-11-17 07:12:27 -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
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
andrew lauritzen
272f622188 Fix potential artifacts when SMRT crosses a clipmap boundary and the new sample depth is outside the Z range of the original clipmap.
Most common repro is when sampling against the clear value with a shadow being cast on a non-shadow-casting receiver.

[REVIEW] [at]jamie.hayes
[FYI] ola.olsson
#preflight 6373f44f9e3bea8079606d73

#localization none
#tests Editor PIE, EngineTests, preflight cooks
#preferred_allowlister ben.woodhouse

[CL 23149088 by andrew lauritzen in ue5-main branch]
2022-11-15 20:14:14 -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
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
tiago costa
24405a714a Improve EyeAdaptationInverse node to support any float numeric parameter type.
- New version of EyeAdaptationInverseLookup hlsl function that returns inverse eye adaptation scale.
- Setup multiplication with LightValue parameter in HLSLMaterialTranslator.

#jira UE-126092
#rb Sebastien.Hillaire
#preflight 637384520c74adb48b7b1511

[CL 23134902 by tiago costa in ue5-main branch]
2022-11-15 08:45:05 -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
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
dmitriy dyomin
d7bba4622e Fixed: Use last frame eye adaptation constant instead of sampling EyeAdaptation buffer directly in materials to avoid issue in a MALI GL drivers (r9p0)
#rb wei.liu

[CL 23102279 by dmitriy dyomin in ue5-main branch]
2022-11-11 14:12:54 -05:00