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]
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]
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]
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]
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]
- 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]
- 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]
- 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]