Commit Graph

187 Commits

Author SHA1 Message Date
dmitriy dyomin
c833228e68 Mobile: Use 3 shadow cascades on Epic shadow quality (Android, iOS)
Remove r.Shadow.CSM.MaxMobileCascades, use r.Shadow.CSM.MaxCascades to limit number of cascades
#jira UE-142377
#rb jack.porter
#preflight 632843baf258fccf9879925a

[CL 22084614 by dmitriy dyomin in ue5-main branch]
2022-09-19 19:48:09 -04:00
Charles deRousiers
f7a18f5fbf Add support for blending DBuffer as a post-pass.
The post base-pass dbuffer blending only works for simple and single materials. Complex material are still apply during the base pass. This pass is disabled by default, and will be enabled only per-platform. Following needs to happen making unpacking/packing modulare and reusable.

On lower-platform this allows to reduce significatly the cost of base pass (BasePass:-1.2ms DBufferPass+0.4ms = -0.8ms net), as the compiler can better prune code, and allows to increase occupancy.

#rb none
#jira none
#preflight 6324633b74361465145e0f75
#fyi sebastien.hillaire

[CL 22048223 by Charles deRousiers in ue5-main branch]
2022-09-16 08:21:00 -04:00
Yuriy ODonnell
6db429d732 ShaderMinifier - Add experimental CFLAG_RemoveDeadCode to run shader rewriting step that removes unused functions and types from shader source before compilation to improve compile times
#rb Jason.Nadro
#preflight 632363a75a44869a7d025585

[CL 22036834 by Yuriy ODonnell in ue5-main branch]
2022-09-15 15:45:20 -04:00
Charles deRousiers
64aa33f6c2 Change Strata byte per pixel budget to be driven per platform, rather than a global project settings.
#rb none
#jira none
#preflight 6322ef526a1299de1d3daaa6
#fyi sebastien.hillaire

[CL 22025779 by Charles deRousiers in ue5-main branch]
2022-09-15 05:43:33 -04:00
robert srinivasiah
7717a11e22 Remove Omni-Directional Stereo Capture (experimental)
#jira UE-147895
#preflight 630723b7c85b7fef22eccd17
#rb Jeff.Fisher Alejandro.Arango Juan.Canada

[CL 21567260 by robert srinivasiah in ue5-main branch]
2022-08-25 12:50:10 -04:00
dmitriy dyomin
ba4c590e33 Added ShadingModels mask.
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]
2022-08-24 10:40:03 -04:00
christopher waters
aee024fd71 Adding bindless support to more MDC parameter types. Removing unneeded data from MDC UB binding info.
#jira UE-139616
#rb zach.bethel
#preflight 6303ec020061f895d0edfe3d

[CL 21496103 by christopher waters in ue5-main branch]
2022-08-22 18:22:37 -04:00
Florin Pascu
960d2cf9d4 Filter Frequencies for mobile platforms(only allow vertex, pixel and compute)
#rb Dmitriy.Dyomin
#jira UE-159449
#preflight 62f50941086f90bbc415bb9d

[CL 21335708 by Florin Pascu in ue5-main branch]
2022-08-11 10:19:42 -04:00
serge bernier
6df0b584ae Use DDPI option to use the compressed transforms with scenedata. For platforms not supporting nanite, using non compressed transforms saves 0.4ms on the GPU.
#rb [at]jamie.hayes

#ROBOMERGE-AUTHOR: serge.bernier
#ROBOMERGE-SOURCE: CL 21090729 via CL 21090755 via CL 21095104
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21099187 by serge bernier in ue5-main branch]
2022-07-14 17:05:33 -04:00
wei liu
87f2d95ada 1.Supports more shading models on mobile, including twoside foliage, cloth and eye shading models.
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]
2022-06-20 06:02:51 -04:00
Florin Pascu
e6ae5eb431 Adding Getters for ShaderPlatform Name, the Shader Format of the ShaderPlatform and the ShaderPlatformPropertiesHash as defined in DDPI
#rb Jack.Porter
#jira UE-120561
#preflight 62b031a7d8082c5c200e7364

[CL 20734617 by Florin Pascu in ue5-main branch]
2022-06-20 05:21:42 -04:00
Florin Pascu
6b14075ce6 Adding Cvar Flags that will make them automatically modify the KeyString when modified
Cvars with this flag will modify the Shader Keystring for All Platforms
ECVF_GeneralShaderChange = 0x200,

Cvars with this flag will modify the Shader Keystring for Mobile Platforms
ECVF_MobileShaderChange = 0x400,

Cvars with this flag will modify the Shader Keystring for Desktop Platforms
ECVF_DesktopShaderChange = 0x800,

r.MobileHDR is using this system now. Others will follow.

#rb Jack.Porter, Mihnea.Balta
#jira UE-120561
#preflight 62aae0aeea213dadf0b36fdd

[CL 20684686 by Florin Pascu in ue5-main branch]
2022-06-16 04:38:20 -04:00
christopher waters
f9e5f44dee Restoring functionality to r.ShaderCompiler.EmitWarningsOnLoad
#jira none
#rb jason.nadro
#preflight 62a8ab32d502a554367beb52

[CL 20657856 by christopher waters in ue5-main branch]
2022-06-14 17:03:34 -04:00
carl lloyd
4b6434cac6 Fix for Apple A8 device support
- Devices crashing when using Base_Vertex metal shader semantics
  - Runtime error when using Virtual Texturing on A8 devices which is unsupported.

#jira UE-131863, UE-132217
#rb Will.Damon
[FYI] Jack.Porter
#preflight 62a75ad63d0a713cf8caf486

#ROBOMERGE-AUTHOR: carl.lloyd
#ROBOMERGE-SOURCE: CL 20631592 in //UE5/Release-5.0/... via CL 20649245
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20656300 by carl lloyd in ue5-main branch]
2022-06-14 16:23:13 -04:00
robert srinivasiah
511b73a9ef Bind InstancedViewUB independent of active stereo rendering
The shader compiler will enable ISR or Mobile Multi-View in shaders, independent of whether they are actively engaged in stereo rendering.
But we _bind_ the instanced view UB when we think stereo is active. We can bind the instanced view UB even while doing mono rendering.

#jira UE-145187
#rb Arciel.Rekman
#preflight 62a7d16df017fed6d25c6641 62a80b5c67522b9df01e96cc

[CL 20650995 by robert srinivasiah in ue5-main branch]
2022-06-14 12:14:38 -04:00
christopher waters
14ae8de4f8 Adding RHI cvars to control if bindless resources or samplers are enabled. If an RHI is configured with Bindless support, these configs will turn on the bindless defines and should control bindless heap creation.
The previous control was just setting the D3D12 bindless heap sizes; now those sizes can be set and will only be used when the RHI controls are enabled.

#jira UE-139617
#rb yuriy.odonnell, zach.bethel
#preflight 629a7fb7bf3102c6e4b6f53b

[CL 20494064 by christopher waters in ue5-main branch]
2022-06-03 18:12:17 -04:00
Arciel Rekman
5623c7e0ae Fix disabling instanced stereo crashing the project.
#rb Jules.Blok
#jira UE-152879
#preflight none
#fyi Robert.Srinivasiah

[CL 20301834 by Arciel Rekman in ue5-main branch]
2022-05-20 15:54:01 -04:00
christopher waters
1e01768e33 Bindless shader parameters
- Adding support for bindless resources/samplers. The loose resources have to be wrapped in a macro that generates an index and proxy resource when bindless is enabled. Reflection has to parse these differently from other resources since they're parsed as uint parameters. The runtime also has to bind these differently since they end up needing to find their real resource in the binding data and then update a constant buffer.
- To assist in conversions, the shader compiler will detect if a shader is compiled with both bindless and non-bindless resources/samplers and will emit errors if that is the case.
- Adding support for bindless Uniform Buffer resources/samplers. Because Uniform Buffers aren't per-shader, they'll always update their constants with the bindless indices of their resources.
- Adding more flags to FShaderCodePackedResourceCounts required changing all the array initializations to individual parameters since not all the new flags are used everywhere.
- No shaders have been configured to support bindless resources/samplers. Yet.

#jira UE-139616
#rb zach.bethel, arciel.rekman
#preflight 6282b8ec44349a6581a21a39

[CL 20250348 by christopher waters in ue5-main branch]
2022-05-17 16:30:48 -04:00
Dmitriy Dyomin
038d909044 Support shading models for mobile deferred path when static lighting is disabled
#rb wei.liu
#jira none
#preflight 627b5f586842238976719cc3

[CL 20134438 by Dmitriy Dyomin in ue5-main branch]
2022-05-11 03:17:42 -04:00
Dmitriy Dyomin
f819c89c21 Support shading models in a mobile deferred shading path. Disabled by default
Requrements:
iOS: A8+
Android VK: more than 4 color attachements, more than 4 input attachments
Android GL: Unsuported - PLS seem to be limited to 128bits on most devices
#rb wei.liu
#preflight 625f866b9c09ef439db7612b

[CL 19861367 by Dmitriy Dyomin in ue5-main branch]
2022-04-22 01:15:27 -04:00
Wei Liu
04d7580d62 Clustered local lights and reflections are supported on mobile forward and deferred.
Local light shadows are supported on mobile forward and deferred, need to enable full depth prepass to generate the ShadowMaskTexture.

Remove the 4 maximum local lights limitation on mobile forward.

Remove the "High Quality Reflection" on mobile forward.

Disable simple lights on mobile forward.

#jira UE-149064

#rb Dmitriy.Dyomin

#preflight 625d17da772cf82d3a6059a6

[CL 19784597 by Wei Liu in ue5-main branch]
2022-04-18 09:09:40 -04:00
Sebastien Hillaire
674c1641ab Strata - advanced vis debug
- partial checkin to continue on another stream.
- Write to the end of the strata texture array is working.

#rb none
#preflight none
#fyi charles.derousiers

[CL 19752138 by Sebastien Hillaire in ue5-main branch]
2022-04-14 03:13:39 -04:00
carl lloyd
9bc1cec538 Enabling half precision floating point for Metal on iOS/tvOS
#rb Dmitriy.Dyomin, Laura.Hermanns
#jira UE-120588
#preflight 624c3b06f4217035fac65500

[CL 19626453 by carl lloyd in ue5-main branch]
2022-04-05 11:51:04 -04:00
Sebastien Hillaire
ab609c73b5 Add support for distance field shadow on water.
Storing water in gbuffer and runnign extra lighting pass would be too expenssiv. So instead, when in deferred, single layer water always output the main dir light luminance into a separate 111110 texture.
DF shadow is applied on that texture. DFShadow culling step is cached the first time for a given view in order to be able to reapply DFShadow later with a depth buffer containing water. This save 0.4ms on a base console.
DFShadow is naturaly skipped if the directional light does not have that feature enabled.
When DFShadow is executed, it is basically 0.24ms extra on a base console @ 1080p.
The separated light buffer is an extra 8MB allocated when in deferred.
This only works with deferred for now (forward does not run the reflection/composite pass).

Render target slot assignement is a bit fuzzy but this is a mostly static setup so should be fine. And could change with Strata down the line.

r.Water.SingleLayer.ShaderSupportDistanceFieldShadow is to enabled dfshadow on water for the shaders. Defaults to 1 and will only be enalbed when using deferred and when distance fields are enabled.
r.Water.SingleLayer.DistanceFieldShadow is a runtime toggle of the feature (if enabled the shaders still output to the separate light render target, but that is simply discarded).

Follow up: tile upsample, tile traceshadow, make it work with strata.

Tested shooter and console.

#rb Tiago.Costa, Kevin.Ortegren
#preflight https://horde.devtools.epicgames.com/job/62457ad79f404234145cd424

[CL 19613312 by Sebastien Hillaire in ue5-main branch]
2022-04-04 15:03:48 -04:00
christopher waters
8a555ab176 Adding missing DDC key modifications for DDSPI controlled defines.
#jira none
#rb jason.nadro
#preflight 623ce37615497b40c2015bb3

[CL 19504400 by christopher waters in ue5-main branch]
2022-03-24 18:55:49 -04:00