Commit Graph

176 Commits

Author SHA1 Message Date
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
JayLu2000
25f73e4907 PR #8976: Add a setting to disable strip-reflect when Android shaders are compiled (Contributed by JayLu2000)
#jira UE-145556
#rb carl.lloyd, laura.hermanns
#preflight 623179958a603798938a9f22

[CL 19405778 by JayLu2000 in ue5-main branch]
2022-03-16 10:34:16 -04:00
Sebastien Hillaire
d28a031400 Strata - beginning of rough refraction of sub layers (with scene lighting split into untouched, sss and rough reffracted luminance)
- separate SSS, opaque rough refraction and scene color output when strata project setting is enabled.
- simple placeholder per pixel variance from roughness/layers computation
- SSS only reads from subsurface buffer when ORR is enabled
- Added simple combine pass to final scene lighting (no blur for now)
- Started adding tiling but reached UAV count limit. I will refactor code later to workaround that.
- Updated light rendering, reflection environment pixel shader. Next will be lumen and clustered deferred shading.

#preflight https://horde.devtools.epicgames.com/job/622fc09fe348fe2ada4214f8
#rb none
#fyi charles.derousiers, tiantian.xie

[CL 19382940 by Sebastien Hillaire in ue5-main branch]
2022-03-15 03:11:08 -04:00
Lukas Hermanns
c6ed66feff Enable CFLAG_ForceDXC for platforms that require DXC for HLSL2021.
#rb Guillaume.Abadie
#jira UE-138358
#preflight 622918411f1ec97d4e9741aa
#rnx

[CL 19325937 by Lukas Hermanns in ue5-main branch]
2022-03-09 16:26:11 -05:00
Andrew Davidson
4a3e582384 LWC: Remove UE_LARGE_WORLD_COORDINATES_DISABLED toggle
#rb stephen.holmes
[FYI] zak.middleton
#preflight 61f7d18b114ec25fe09648d6

#ROBOMERGE-OWNER: Andrew.Davidson
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18788533 in //UE5/Release-5.0/... via CL 18788583 via CL 18788850
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)
#ROBOMERGE-CONFLICT from-shelf
#preflight 61f7eb7a114ec25fe0990f8c

[CL 18789644 by Andrew Davidson in ue5-main branch]
2022-01-31 10:10:51 -05:00
Charles deRousiers
90e7ad66a9 Add a IsStrataEnable function per module where it is used.
#rb none
#jira none
#fyi sebastien.hillaire
#preflight 61eebce65e0414e6ec1e40cb

[CL 18708521 by Charles deRousiers in ue5-main branch]
2022-01-24 10:02:04 -05:00
arciel rekman
0c74b967c3 Exclude editor-only shaders from games that don't support a cooked editor.
#rb Josh.Adams, Jason.Nadro
[REVIEW] [at]Josh.Adams, [at]Jason.Nadro
#jira none
#preflight none

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 18647895 in //UE5/Release-5.0/... via CL 18649305 via CL 18649672
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18649956 by arciel rekman in ue5-main branch]
2022-01-18 17:45:43 -05:00
axel riffard
92a7004918 Harmonize Metal version to use in iOS / Mac
#jira UE-135971
#rb jack.porter
[FYI] will.damon, carl.lloyd
#preflight 61e51ef2a2616066f675dd5e

#ROBOMERGE-OWNER: axel.riffard
#ROBOMERGE-AUTHOR: axel.riffard
#ROBOMERGE-SOURCE: CL 18631139 in //UE5/Release-5.0/...
#ROBOMERGE-BOT: UE5 (Release-5.0 -> Release-Engine-Staging) (v899-18417669)
#ROBOMERGE-CONFLICT from-shelf
#p4v-cherrypick 18631594
#preflight 61e643cb1f30b67a22f3febd

[CL 18636647 by axel riffard in ue5-main branch]
2022-01-17 23:50:00 -05:00
arciel rekman
2a499437fe Change shader compression method to Oodle Selkie6 by default (UE-136845).
- Provides about 8% runtime memory savings (in local tests).
- Also, adds more compression types for shaders.
- Impact on the shader compilation (in SCWs) seems to be negligible in local tests.

#rb Devin.Doucette, Charles.Bloom
[REVIEW] [at]Devin.Doucette, [at]Charles.Bloom, [at]Jason.Nadro
#jira UE-136845

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 18502862 via CL 18503105 via CL 18503112 via CL 18505939 via CL 18505950
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18505961 by arciel rekman in ue5-release-engine-test branch]
2022-01-04 00:58:30 -05:00
tuxerr
a531f1d4b4 PR #8679: regenerate UBO structs when platform changes (Contributed by tuxerr)
#rb Mihnea.Balta,Lukas.Hermanns
[FYI] Arciel.Rekman
#preflight 61a9017f800738dbfbbc4920

#ROBOMERGE-AUTHOR: jeannoe.morissette
#ROBOMERGE-SOURCE: CL 18408495 in //UE5/Release-5.0/... via CL 18408515
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18408530 by tuxerr in ue5-release-engine-test branch]
2021-12-08 13:31:51 -05:00
arciel rekman
f302f8f030 Fix CVars not being picked up from other sections (UE-135567).
- Some projects put rendering CVars in other sections than RendererSettings.

#jira UE-135567
[at]Josh.Adams, [at]Dmitriy.Dyomin
#rb Josh.Adams, Dmitriy.Dyomin

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 18270117 in //UE5/Release-5.0/... via CL 18270123
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18270137 by arciel rekman in ue5-release-engine-test branch]
2021-11-23 10:17:56 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00