The engine uses GRayTracingPlaformMask to compute ShouldCompilePermutation() for shaders. This is filled based on platform settings and capabilities when running the editor. When running a standalone game, the mask is filled purely based on whether ray tracing is enabled for the project (r.RayTracing) and the current runtime environment supports it (GRHISupportsRayTracing).
The new CVar is meant to be consistent between the cook time and run time. This is achieved by setting GRHISupportsRayTracing=false when running on SM5 if r.RayTracing.RequireSM6 is 1.
#rb christopher.waters
#preflight 631f8c8680642a7fa783ca18
#jira UE-163012
[CL 21971785 by Yuriy ODonnell in ue5-main branch]
r.Mobile.ShadingModelsMask can be used to mask out specific shading models on mobile platforms.
Masked shading models will fallback to DefaultLit
[CL 21540496 by dmitriy dyomin in ue5-main branch]
- Saves ~0.3ms on PS4/XB1 (Dynres = 100%).
-Add possibility to disable grass velocity output when WPO velocity is enable (only effective when r.velocity.enablevertexdeformation != 0 and r.OptimizedWPO = true)
#rb [at]jeremy.moore
[CL 21524947 by serge bernier in ue5-main branch]
* Add ITargetPlatform::GetRayTracingShaderFormats(), with default implementation that falls back to GetAllTargetedShaderFormats() if HWRT is enabled for a platform
* Override GetRayTracingShaderFormats() for TGenericWindowsTargetPlatform to return only enabled D3D12 and VK shader formats (excluding D3D11)
* Use GetRayTracingShaderFormat() and UsesRayTracing() to configure GRayTracingPlaformMask (the mask contains one bit per shader platform)
Previously all bits of GRayTracingPlaformMask were set if project uses ray tracing, then shader platform bits were disabled for all possible shader formats for platforms that don't support ray tracing.
If SM5 was disabled for D3D12, ray tracing shaders would still get compiled for it because the corresponding bit was still set in GRayTracingPlaformMask.
With this change, SM5 bit will no longer be set in GRayTracingPlaformMask in the editor if it is disabled for D3D12 RHI for the project, so ray tracing shaders won't be compiled.
When running a packaged build, GRayTracingPlaformMask is now set to 0 or 1 based on global project setting (r.RayTracing) and whether the current machine+RHI supports ray tracing.
#rb christopher.waters, jason.nadro
#preflight 62bd0dea3f0d6beee259b636
#ROBOMERGE-AUTHOR: yuriy.odonnell
#ROBOMERGE-SOURCE: CL 20897852 via CL 20898485 via CL 20899239
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)
[CL 20901755 by yuriy odonnell in ue5-main branch]
This resubmits the following original changelists (with fixes).
Original CL Desc for CL20737284 -----------------------------------------------------------------
Add a version of UseVirtualTexturing() that takes a shader platform.
A future goal is to deprecate the version that takes a feature level.
Original CL Desc for CL20738687 -----------------------------------------------------------------
Virtual texturing forces depth pass on.
This fixes bug when using any masked materials that sample VT.
#jira UE-157197
#jira UE-117783
#preflight 62b1cb8ac400b5ee2f517942
[CL 20757215 by jeremy moore in ue5-main branch]
- testing
- compiled and cooked QAGame locally for Win64
#preflight 62b12d784c538079d66599da
#rnx
#fyi Jeremy.Moore
Original CL Desc for CL20737284
-----------------------------------------------------------------
Add a version of UseVirtualTexturing() that takes a shader platform.
A future goal is to deprecate the version that takes a feature level.
#preflight 62b080e1613434b77fa673d0
Original CL Desc for CL20738687
-----------------------------------------------------------------
#jira UE-117783
Virtual texturing forces depth pass on.
This fixes bug when using any masked materials that sample VT.
#preflight 62b08fceef1c984554505316
[CL 20750841 by eric mcdaniel in ue5-main branch]
A future goal is to deprecate the version that takes a feature level.
#preflight 62b080e1613434b77fa673d0
[CL 20737284 by Jeremy Moore in ue5-main branch]
2.Uses the same shading models and dynamic lightings code path on desktop.
3.Remove the division of PI on mobile directional light's color in C++ to line up with desktop in shaders.
#jira UE-114145
#rb Dmitriy.Dyomin, Sebastien.Hillaire
#preflight 62b0411fd8082c5c200fa32a
[CL 20734991 by wei liu in ue5-main branch]
- Added resource pool counters and events.
- Added AllocatePooledBuffer method and refactored pool to no longer take a command list.
- Refactored swap chain barrier logic to be a bit cleaner.
- Added helper methods to cast between views.
- Added power of two alignment option to buffer pool.
- Added GetTypeHash implementations for RDG SRV | UAV descriptors.
#preflight 62631046006fa20b683d130f
[CL 19873407 by zach bethel in ue5-main branch]