Commit Graph

309 Commits

Author SHA1 Message Date
sebastien hillaire
2415feaccd Added project option for Height fog to match volumetric fog.
Emissive of volumetric fog now follow the distribution of the exp height fog.
Exp fog follow the emissive and albedo of the volumetric fog. And it also uses the same PhaseG and phase function as the volumetric fog (the UI for in scattering is then disabled when the project setting is enabled)
Now volumetric fog looks mostly different due to the lact of shadow casting or difference integration of ambient (through lumen for instance).

This allows for lumen fog sampling to even better match the environment. (currently not including volumetric fog material and local fog volume as this would be a lot more expenssive).

[FYI] Krzysztof.Narkowicz

[CL 34421633 by sebastien hillaire in ue5-main branch]
2024-06-17 10:38:08 -04:00
tiago costa
2d07b192eb Changes to r.RayTracing.EnableOnDemand to work with offline data.
- moved ownership of RayTracingGeometry from FStaticMeshLODResources to FStaticMeshRayTracingProxyLOD so offline data can be streamed-in when ray tracing is toggled on.
- request streaming of ray tracing geometry when it is initally registered or FirstLODIndex changes.
- moved call to ProcessCompletedStreamingRequests(...) so it in every code path of FRayTracingGeometryManager::Tick(...)
- enabled r.RayTracing.EnableOnDemand by default on all platforms.

#rb aleksander.netzel

[CL 34416694 by tiago costa in ue5-main branch]
2024-06-17 05:45:28 -04:00
charles derousiers
a0a936cacc * Fix D3D ES31 not having device profile setup.
* Add Substrate variable for D3D ES31 profile

#rb florin.pascu
[FYI] sebastien.hillaire

[CL 34337838 by charles derousiers in ue5-main branch]
2024-06-13 09:28:25 -04:00
graham wihlidal
8f4a9e47a4 [Nanite-Skinning] Enabled Nanite skinning by default (still experimental), and enabled it on the player character assets in Lyra
#jira UE-210746
#fyi brian.karis, rune.stubbe, jamie.hayes, halfdan.ingvarsson, kiaran.ritchie, andrew.lauritzen

#virtualized

[CL 34289104 by graham wihlidal in ue5-main branch]
2024-06-11 16:22:22 -04:00
tiago costa
d683de11ea Resubmit CL34232076
- added missing TargetPlatform->UsesRayTracing() check in BuildStaticMeshDerivedDataKeySuffix(...)
-----------------------------------------------------------------
Support BLAS streaming when using r.RayTracing.UseReferenceBasedResidency
- serialize FStaticMeshRayTracingProxyLOD buffers into separate FByteBulkData.
    - for the FStaticMeshRayTracingProxy.bUsingRenderingLODs case, this requires shared ownership of resources. FStaticMeshRayTracingProxyLOD owns the RayTracingGeometry while FStaticMeshLODResources owns the VB/IB/etc as usual.
- FRayTracingGeometryManager is responsible for responsible for issuing bulk data read requests and processing the results.
- decoupled r.RayTracing.UseReferenceBasedResidency from r.RayTracing.EnableOnDemand.
- made r.RayTracing.UseReferenceBasedResidency read-only since it affects serialization.

#rb aleksander.netzel, Kenzo.Terelst

[CL 34249031 by tiago costa in ue5-main branch]
2024-06-10 15:29:33 -04:00
tiago costa
6a6ef5b7e5 [Backout] - CL34232076
[FYI] tiago.costa
Original CL Desc
-----------------------------------------------------------------
Support BLAS streaming when using r.RayTracing.UseReferenceBasedResidency
- serialize FStaticMeshRayTracingProxyLOD buffers into separate FByteBulkData.
    - for the FStaticMeshRayTracingProxy.bUsingRenderingLODs case, this requires shared ownership of resources. FStaticMeshRayTracingProxyLOD owns the RayTracingGeometry while FStaticMeshLODResources owns the VB/IB/etc as usual.
- FRayTracingGeometryManager is responsible for responsible for issuing bulk data read requests and processing the results.
- decoupled r.RayTracing.UseReferenceBasedResidency from r.RayTracing.EnableOnDemand.
- made r.RayTracing.UseReferenceBasedResidency read-only since it affects serialization.

#rb aleksander.netzel, Kenzo.Terelst

[CL 34236551 by tiago costa in ue5-main branch]
2024-06-10 10:35:30 -04:00
tiago costa
54484e6a13 Support BLAS streaming when using r.RayTracing.UseReferenceBasedResidency
- serialize FStaticMeshRayTracingProxyLOD buffers into separate FByteBulkData.
    - for the FStaticMeshRayTracingProxy.bUsingRenderingLODs case, this requires shared ownership of resources. FStaticMeshRayTracingProxyLOD owns the RayTracingGeometry while FStaticMeshLODResources owns the VB/IB/etc as usual.
- FRayTracingGeometryManager is responsible for responsible for issuing bulk data read requests and processing the results.
- decoupled r.RayTracing.UseReferenceBasedResidency from r.RayTracing.EnableOnDemand.
- made r.RayTracing.UseReferenceBasedResidency read-only since it affects serialization.

#rb aleksander.netzel, Kenzo.Terelst

[CL 34232090 by tiago costa in ue5-main branch]
2024-06-10 05:56:23 -04:00
graham wihlidal
f547b42cf6 Numerous fixes to Nanite programmable and compute raster disable flags (two sided, etc.)
#jira UE-192509
#fyi rune.stubbe, jamie.hayes, krzysztof.narkowicz
#rb Brian.Karis

[CL 34221934 by graham wihlidal in ue5-main branch]
2024-06-07 22:14:51 -04:00
florian penzkofer
695d4319e6 Support screen space reflections in the mobile renderer.
Supported in forward and deferred. It works without TAA but no denoising is done, so it looks much worse.

At the moment enabling SSR implies doing a depth prepass.

#jira UE-120565
#rb Dmitriy.Dyomin, Florin.Pascu

[CL 34127334 by florian penzkofer in ue5-main branch]
2024-06-05 12:02:30 -04:00
dmitriy dyomin
4d83c873d2 Mobile: Added rect lights support to a deferred shading
r.Mobile.Forward.RenderRectLightsAsSpotLights will only affect lights that use LightGrid, translucency or clustered

[CL 34120289 by dmitriy dyomin in ue5-main branch]
2024-06-05 07:16:52 -04:00
charles derousiers
84b0d0490b * Fix incorrect output texture format during SLW base pass with Substrate, causing SLW to be incorrect.
* Share logic for enabling/disabling SLW directional texture

#jira UE-214432

[CL 34027623 by charles derousiers in ue5-main branch]
2024-05-31 02:34:02 -04:00
tiago costa
4bcc8c2560 Updated IsRayTracingUsingReferenceBasedResidency() to use GetValueOnAnyThread()
[CL 33888752 by tiago costa in ue5-main branch]
2024-05-24 04:18:46 -04:00
charles derousiers
e1b6604e2f Fix Lumen shader compilation issue on Mac SM5
#jira UE-213388
[FYI] krzysztof.narkowicz

[CL 33518647 by charles derousiers in ue5-main branch]
2024-05-08 13:19:24 -04:00
christopher fiala
d93e6246a4 Refactor VRS RHI implementation and manager to avoid using GRHI variables bound to CVars, and to allow disabling support for VRS with a read-only variable (requires shader recompile, may avoid performance cost on some platforms).
#jira UE-197460
#rb Josie.Yang

[CL 33505949 by christopher fiala in ue5-main branch]
2024-05-07 22:29:35 -04:00
aleksander netzel
2a8d87939a HWRT: Add new platform setting for better control over which passes in HWRT are enabled on platforms that support all modes:
* New options:
 - "Disabled" - will turn off cooking and running with ray tracing.
 - "Inline" - will not compile any ray tracing material shaders and disable support for ray tracing shaders at runtime (saving time and memory) only inline passes will work.
 - "Full" - will enable full support for any ray tracing pass using inline or material shaders.

* Set "Inline" as a default mode on those platforms.
* Made barycentrics the new default ray tracing visualization mode because it's supported in all modes.

#rb Krzysztof.Narkowicz, Yuriy.ODonnell
#tests project with different RayTracingMode configurations

[CL 33473937 by aleksander netzel in ue5-main branch]
2024-05-06 18:21:02 -04:00
krzysztof narkowicz
ccda73c856 Lumen - allow Metal to run Lumen with SM5 until it won't get solid SM6 support.
#jira UE-213388
[FYI] carl.lloyd

[CL 33374312 by krzysztof narkowicz in ue5-main branch]
2024-05-01 12:07:47 -04:00
krzysztof narkowicz
7c40b57ef0 Lumen - force Lumen to run only on SM6 for desktop/consoles and SP_VULKAN_SM5 for Android. There's no longer any reason for Lumen to support SM5, but it causes various random shader compilation issues there.
#jira UE-213388
[FYI] Florian.Penzkofer, Mihnea.Balta

[CL 33373180 by krzysztof narkowicz in ue5-main branch]
2024-05-01 11:08:44 -04:00
tiago costa
d59f17d87a Experimental support for raytracing geometry residency management based on TLAS references.
- controlled by r.RayTracing.UseReferenceBasedResidency (disabled by default)
- Gather which FRayTracingGeometry or RayTracingGeometryGroup are referenced by TLAS
- If a RayTracingGeometryGroup is referenced by TLAS, all the LODs are made resident
  - doing this requires having an array in FRayTracingGeometryGroup to track which FRayTracingGeometry are part of the group (one per LOD)
  - in the future we could track which LODs are actually necessary and only make LODs up to the highest LOD referenced resident.
- Tracking of referenced geometries is only active when cvar is enabled to avoid overhead/allocations when not being used.

#rb Kenzo.Terelst

[CL 33258852 by tiago costa in ue5-main branch]
2024-04-26 05:03:23 -04:00
graham wihlidal
6483e2aaaa [Nanite-Materials] First large scale removal of legacy PS material shading path from Nanite (in favor of new system). Lumen needs to be moved over to the new system in order to fully remove the legacy path (WIP).
#rb zach.bethel
#jira UE-187480
#fyi brian.karis, rune.stubbe, jamie.hayes, juan.canada

[CL 33127625 by graham wihlidal in ue5-main branch]
2024-04-20 00:25:44 -04:00
graham wihlidal
9fceb67705 Removed r.Nanite.AllowTessellation to always compile in support for Nanite tessellation. Can still use r.Nanite.Tessellation runtime toggle, but shaders are always built now.
#rb Brian.Karis
#jira UE-190057
#fyi rune.stubbe, jamie.hayes

[CL 33016018 by graham wihlidal in ue5-main branch]
2024-04-16 17:39:19 -04:00
tiago costa
3d0118dac5 Remove r.RayTracing.EnableInEditor
- projects can use r.RayTracing.Enable to disable ray tracing in editor device profiles if necessary.

#rb aleksander.netzel

[CL 33010216 by tiago costa in ue5-main branch]
2024-04-16 15:07:14 -04:00
tiago costa
11b1cf1e43 Check r.RayTracing.Enable during initialization when not using r.RayTracing.EnableOnDemand.
#rb aleksander.netzel

[CL 32977451 by tiago costa in ue5-main branch]
2024-04-15 17:45:43 -04:00
tiago costa
26c9f5d4a7 Remove r.RayTracing.EnableInGame.
#rb aleksander.netzel

[CL 32970706 by tiago costa in ue5-main branch]
2024-04-15 09:36:19 -04:00
graham wihlidal
731e2640e6 [Nanite-Skinning] Initial rasterizer support for linear blend skinning under a permutation to avoid affecting performance of rigid meshes. There are still quite a number of critical missing pieces, such as correct bounding volumes under deformation, and the tangent space basis is currently ref pose, leading to lighting/shading issues. Motion vectors are also not exported yet, so TAA has plenty of ghosting artifacts. All in good time...
#jira UE-210923
#fyi brian.karis, jamie.hayes, rune.stubbe, halfdan.ingvarsson, kiaran.ritchie
#tests CitySample Package and Test

[CL 32690526 by graham wihlidal in ue5-main branch]
2024-04-03 02:30:21 -04:00
jeremy moore
804418158d #jira UE-206245, UE-206247
Add basic DX12 Work Graph support.
For this first pass there is no exposed RHI functionality for directly dispatching a work graph. Instead shader bundles have been extended to support a work graph based implementation.
Nanite compute materials now can use work graph shader bundles on D3D12 when r.Nanite.AllowWorkGraphMaterials and r.Nanite.Bundle.Shading are both set. Both of these default to off at the moment.
Also DataDrivenPlatformInfo now expose bSupportsWorkGraphs. This is false everywhere, but will be enabled for D3D12_SM6 as soon as we have the latest DXC shader compiler with lib_6_8 support submitted.
#rb Kenzo.Terelst, Yuriy.ODonnell

[CL 32196717 by jeremy moore in ue5-main branch]
2024-03-12 18:42:09 -04:00