8105 Commits

Author SHA1 Message Date
Sebastien Hillaire
80d0af3da8 Substrate - fix for crash on mac when clearing MRTs with integer format.
#jira UE-228298
#rn Fixed Substrate crash on MAC when opening material editor.
#tests Tested PC editor, dx11, dx12 and ps4, with and without Substrate. And on MAC by Carl Lloyd.
#rb carl.lloyd, Kevin.Ortegren
#fyi charles.derousiers

[CL 38210001 by Sebastien Hillaire in 5.5 branch]
2024-11-19 09:57:34 -05:00
Victor Brodin
f1f2979646 Fix shader compilation failure when Mobile HDR and MMV is enabled in project
#jira UE-229333
#rb arciel.rekman, erica.stella

[CL 37670611 by Victor Brodin in 5.5 branch]
2024-10-31 17:50:48 -04:00
Dmitriy Dyomin
93664caac7 Fixed: Precision issues with bloom on Android OpenGL
#jira UE-227421
#rb Jack.Porter

[CL 37430259 by Dmitriy Dyomin in 5.5 branch]
2024-10-24 11:36:50 -04:00
tiago costa
e2e59f9ba7 [Volumetric Fog] Improvements to history rejection and enable HZB culling (r.VolumetricFog.ConservativeDepth) by default.
- Modify bilinear sample UV to avoid sampling froxels that were occluded in the previous frame.

Perf on console:
- Without MegaLights
    - Without HZB culling: 1.7ms
    - With HZB culling: 1.1ms
- With MegaLights
    - Without HZB culling: 0.9ms
    - With HZB culling: 0.5ms

#rb Krzysztof.Narkowicz, Sebastien.Hillaire
#jira UE-211955

[CL 37281471 by tiago costa in 5.5 branch]
2024-10-18 15:19:04 -04:00
Krzysztof Narkowicz
05d33847b8 Lumen Reflections - fixed denoiser artifacts due to a bug in IsLightingValidForDenoiser
#jira none
#rb none
#fyi Charles.deRousiers

[CL 37280180 by Krzysztof Narkowicz in 5.5 branch]
2024-10-18 15:03:30 -04:00
tiago costa
20629c7a34 [Volumetric Fog] Modified GenerateConservativeDepthBufferCS logic so HZB test results in Volumetric Fog match MegaLights Volume and Light Grid.
#rb Krzysztof.Narkowicz, Sebastien.Hillaire
#jira UE-211955

[CL 37272867 by tiago costa in 5.5 branch]
2024-10-18 13:02:09 -04:00
krzysztof narkowicz
1aff4a58c2 MegaLights - reduce noise on penumbras using a better confidence heuristic
Also removed the word experimental from the LightFunctionAtlas description, as we already use it in production.

#jira UE-211955
#rb none

[CL 37265062 by krzysztof narkowicz in 5.5 branch]
2024-10-18 10:40:30 -04:00
viktor chlumsky
e4bd0360aa Slate SDF fonts - Material support
#tests Tested in editor
#rnx <Release Notes exclude>
#rb Jon.Cain, yohann.dossantos

[CL 37264296 by viktor chlumsky in 5.5 branch]
2024-10-18 10:19:56 -04:00
jon cain
3557a28318 Fix for light object position not being resolved correctly in Light Functions. Also unblocks UI/PostProcess/Decals from using the Object Position node. Return float3(0.0) for incompatible pathways (e.g. PP and Light Atlases).
#jira UE-226753, UE-136362, UE-222648, FORT-797318, UE-221823
#rb massimo.tristano, Sebastien.Hillaire

[CL 37259688 by jon cain in 5.5 branch]
2024-10-18 06:41:20 -04:00
christopher fiala
347f5a6f3b Add Nanite Software VRS support for per-material "Allow Variable Rate Shading" checkbox (default on). Automatically disable VRS for materials that use Custom Primitive Data ,since this causes edge artifacts when used with Nanite Software VRS.
#jira UE-227335
#rb graham.wihlidal

#ushell-cherrypick of 36579730 by graham.wihlidal

[CL 37259022 by christopher fiala in 5.5 branch]
2024-10-18 06:16:19 -04:00
denys mentiei
732e4a22bf Fix for LightGridInjection compilation on Adreno 6xx.
When the following permutation is compiled:
// #define USE_LINKED_CULL_LIST 1
// #define REFINE_RECTLIGHT_BOUNDS 0
// #define USE_HZB_CULL 0
// #define USE_PARENT_LIGHT_GRID 0
// #define USE_THREAD_GROUP_PER_CELL 0
// #define USE_THREAD_GROUP_SIZE_32 0
// #define LIGHT_LINK_STRIDE 2
// #define THREADGROUP_SIZE 64
// #define THREADGROUP_SIZE_X 4
// #define THREADGROUP_SIZE_Y 4
// #define THREADGROUP_SIZE_Z 4

for Adreno 6xx, driver's reg-alloc exhausts all available UGPRs, while not supporting any spilling.

Hence, it fails with:
AdrenoVK-0: Info log: Assertion failed: false && "No UGPR spill support"

Workarounded to use a slightly less optimal InterlockedAdd on mobile.

#rb Dmitriy.Dyomin, tiago.costa
#rnx

[CL 37247597 by denys mentiei in 5.5 branch]
2024-10-17 22:09:45 -04:00
tiantian xie
55560364be Fix substrate SSS(MFP) color shift due to precision issue.
#jira UE-227992
#rb Sebastien.Hillaire
#p4v-cherrypick 37226853

[CL 37229398 by tiantian xie in 5.5 branch]
2024-10-17 12:31:50 -04:00
tiago costa
6a06d9e5a1 [Light Grid] Extend grid cells CullRect by margin depending on whether MegaLights / Volumetric Fog are enabled.
#rb Krzysztof.Narkowicz
#jira UE-211955

[CL 37219961 by tiago costa in 5.5 branch]
2024-10-17 06:27:37 -04:00
tiago costa
45fa76f961 [Light Grid] Fix incorrect condition in OutputCell(...)
#rb none

[CL 37182242 by tiago costa in 5.5 branch]
2024-10-16 11:52:09 -04:00
florian penzkofer
4d4e8b54ee Fix half precision mobile preview
#jira UE-227140
#rb Florin.Pascu

#ushell-cherrypick of 37128959 by florian.penzkofer

[CL 37169659 by florian penzkofer in 5.5 branch]
2024-10-16 06:33:29 -04:00
charles derousiers
fc8947b93b Fix NaN value on SubstrateTest tests on XSX with Substrate.
The NaN values are output by LumenScreenProbe backlighting and Lumen reflection due to border pixels pixel for pixels having more than one closure.

#rb krzysztof.narkowicz
#jira UE-227305

[CL 37166595 by charles derousiers in 5.5 branch]
2024-10-16 05:08:42 -04:00
tiago costa
d54697c74a [Light Grid] Refactored handling of limits in LightGrid.
- Log warnings when building grid exceeds the max number of entries/links.
- ensure instead of check that NumLocalLights and NumReflectionCaptures are less than the primitive limit imposed by FCellWriter.
- clamp NumCulledLightLinks when using bThreadGroupPerCell (unlikely since the first 256 in each cell are temporarily stored in LDS instead of linked list).

#rb Ola.Olsson
#jira UE-211955

[CL 37128929 by tiago costa in 5.5 branch]
2024-10-15 13:40:25 -04:00
krzysztof narkowicz
e8e124c7cc MegaLights - fixed history acceleration when neighborhood bounds have a zero extent
#jira UE-211955
#rb none

[CL 37128810 by krzysztof narkowicz in 5.5 branch]
2024-10-15 13:37:24 -04:00
tiago costa
e03cd38b1a [Light Grid] Support building light grid using one thread group per cell and using two levels (coarse + fine grids).
- Default settings:
    - Use two levels if number of local lights in view > 128 (r.LightCulling.TwoLevel and r.LightCulling.TwoLevel.Threshold).
    - One thread group per cell for coarse grid.
    - Single thread per cell for fine grid (r.LightCulling.WorkloadDistributionMode).

View with 1K local lights running on console: 0.25ms -> 0.1ms

(based on Ola.Olsson previous work)

#rb Ola.Olsson

[CL 37124280 by tiago costa in 5.5 branch]
2024-10-15 12:14:10 -04:00
tiago costa
a1940412dc [MegaLights] Changes to Volume HZB test
- expand sampling froxel footprint (half res) by 3 full res froxels, since during shading we can use samples from any of the half res neighbors.
- expand shading froxel footprint by 0.5 full res froxels to support trilinear filtering.

#rb Krzysztof.Narkowicz
#jira UE-211955

[CL 37124045 by tiago costa in 5.5 branch]
2024-10-15 12:09:41 -04:00
MarcusSvensson92
ff41c04af8 PR #12331: Fix for missing volumetric fog in the first depth layer when conservative depth testing is enabled
#ushell-cherrypick of 36192890 by UnrealBot

#jira UE-223978
#rb none
#tests PC dx12 with volumetric fog regular and megalight.
#rnx

[CL 37119885 by MarcusSvensson92 in 5.5 branch]
2024-10-15 10:51:36 -04:00
florian penzkofer
d35bfab134 Fix MobileSSR shader compile error
#jira UE-227584
#rb jack.porter

[CL 37110621 by florian penzkofer in 5.5 branch]
2024-10-14 23:57:45 -04:00
Sebastien Hillaire
481f7cb155 Substrate - disable glint with megalight on metal while new driver are available (compute with derivative)
#ushell-cherrypick of 37047974 by Sebastien.Hillaire

#jira UE-224886
#tests Mac
#rnx
#rb carl.lloyd

[CL 37082822 by Sebastien Hillaire in 5.5 branch]
2024-10-14 03:39:35 -04:00
krzysztof narkowicz
12744a7ea4 MegaLights - speedup temporal convergence
* Reduced r.MegaLights.Temporal.NeighborhoodClampScale to 1
* Speedup history accumulation when history is out of neighborhood's bounds
* Fix NumFramesAccumulated encoding
* Expose r.MegaLights.Spatial.MaxDisocclusionFrames
* Remove TemporalAdvanceFrame as history is anyway frozen during a pause

#jira UE-211955
#rb none

[CL 37059458 by krzysztof narkowicz in 5.5 branch]
2024-10-11 14:38:04 -04:00
charles derousiers
e114801ef2 Fix numerical precision causing incorrect shading results on certain platform when opaque rough refraction is enabled with Substrate.
#rb sebastien.hillaire
#jira UE-227377

#ushell-cherrypick of 37045572 by Charles.deRousiers

[CL 37048610 by charles derousiers in 5.5 branch]
2024-10-11 09:43:32 -04:00