OpenGL ES and Metal use framebuffer fetch.
Vulkan uses dual source blending.
For Vulkan and OpenGL ES there is a fallback shader permutation for drivers that don't support this. The fallback is the same as the existing solution that uses regular blending (i.e. looks different).
Others uses dual source blending and we force use of DXC for those shaders.
#rb Dmitriy.Dyomin, Florin.Pascu
[CL 29245271 by florian penzkofer in ue5-main branch]
Platforms that do support uniform buffer objects can now provide batched primitive data through UBO. There is a limit UBO range that can be accessed in shaders, so we group instances into batches that fit into this limit. Switch uses 64KB views, other platfroms16KB views. For each primitive we allocate 512Bytes and 256Bytes for instance. Mobile platforms that do not support UBO will use a desktop version of GPUScene.
There are a few things that still missing: Dynamic mesh passes, static lighting
#rb ola.olsson, benjamin.rouveyrol
[CL 26354848 by marc audy in ue5-main branch]
* This should be used to guard any features that require explicitly accessing buffer or textures SRVs in vertex shaders
#rb Dmitriy.Dyomin
#rb Kenzo.Terelst
[CL 26207274 by yuriy odonnell in ue5-main branch]
r.ShaderPipelines
r.Material.ExcludeNonPipelinedShaders
Both cvars are currently disable on WindowsEngine.ini which make them also disable when we cook for consoles. ExcludeNonPipelinedShaderTypes is currently used only at cooking time when we compile shaders which is currently returning false, since the value is disabled on windows. Making those cvars use FShaderPlatformCachedIniValue, will allow to have specific platform value when cooking for a specific target. Moving r.Material.ExcludeNonPipelinedShaders to the defaultengine.ini file to keep it disable for the moment and not affecting shader key string. Will enable it progressively on console later.
r.Shaders.RemoveUnusedInterpolators
Make that cvar platform agnostic, since it will be used in on other consoles eventually. Platforms supporting the stripping of unused interpolators will check the same flag (CFLAG_ForceRemoveUnusedInterpolators) to enable it. Since windows can run opengl, and stripping is not supported on that shader platform, add extra logic to exclude the flag.
-Make the RHISupportsShaderPipelines function access a real DDPI attribute and not just test if we are not on mobile. Will need this to be able to have stripping unused shader interpolators on Switch.
[REVIEW] Laura.Hermanns
[CL 26018371 by serge bernier in ue5-main branch]
What:
* Add data support flag for NNE shaders so platforms can opt in to the NNERuntimeHlsl shaders compilation.
Tests:
* NNE smoke test + style transfer demo on: win64 editor, win64 packaged
#rb ue-nni
#rnx
#jira UE-184154
#preflight 6447d1e7c632d1e89bc818f6
[CL 25185875 by florent guinier in ue5-main branch]
Several PRs have been filed on GitHub for DXC (PR 5017, PR 5020) and SPIRV-Tools (PR 5107).
Integrated from CL 23998474.
Workaround for DXC rewriter bug: Have member function definition inside struct declaration.
Integrated from CL 23976367.
Explicitly initialize TNaniteWritePixel members as empty structs expose further bugs in SPIR-V backend of DXC.
Rebuild ShaderConductor for Win64, Mac, and Linux (Empty struct fix).
#rb Jason.Nadro, JeanNoe.Morissette, Carl.Lloyd
[FYI] Brian.Karis, Graham.Wihlidal, Rune.Stubbe
#jira UE-175538, UE-172568
#preflight 63eae0eab91ae11c1ceceed2
#rnx
[CL 24214167 by laura hermanns in ue5-main branch]
It's disabled on Android because some android devices don't support dual src blending, and it's disabled on IOS because it doesn't work with MRT.
#rb Dmitriy.Dyomin, Florin.Pascu
#preflight 6391f2e7c415e8dc78348c60
[CL 23448042 by wei liu in ue5-main branch]
- GetFriendlyShaderPlatformName removed
- RHIShaderPlatformDefinitions.inl deleted
- Added FriendlyNames to all ShaderPlatforms in DDSPI
- MenuText now comes from FriendlyNames in DDSPI
#rb Jack.Porter
#jira none
#preflight 632b1f8c826e0c2fe9a9d5d2
[CL 22118730 by florin pascu in ue5-main branch]