- When generating Uniform Buffer HLSL code, a 'static const struct {} Name' was created which has been causing compiler issues off and on for years.
- When RemoveUniformBuffersFromSource removed said struct, it parsed the struct's structure to figure out how to translate UniformBuffer.Member into UniformBuffer_Member in code that accessed Uniform Buffers.
- Now, instead of a struct, a "UniformBuffer <Name>" declaration is created and filled with mappings from "UniformBuffer.Member" into the correct code.
- This allows ConstantBuffer objects to be used differently from cbuffer where the former generates "UniformBuffer.Member" and the latter generates "UniformBuffer_Member"
- This also allows resources to always be translated to "UniformBuffer_Member"
- Shader define 'PLATFORM_SUPPORTS_UB_STRUCT' is now 'PLATFORM_SUPPORTS_CONSTANTBUFFER_OBJECT' and will be set on shader formats that support ConstantBuffer<> objects.
- Removed lots of unused code from BindlessResources.ush
#jira UE-195103
#rb dan.elksnitis, jeannoe.morissette
[CL 28058373 by christopher waters in ue5-main branch]
- PLATFORM_SUPPORTS_UB_STRUCT was set for RT shaders, but RemoveUniformBuffersFromSource was still being called.
- New IsUsingSM66 function to keep consistent usage of ELanguage::SM6 since not all RT shaders use that 'language'
- Removing USE_SHADER_MODEL_6_6 since SM6.6 is locked in
- Changing FShaderFormatD3D versions to be Guids instead of numbers to better handle resolving changes in different branches.
#jira UE-195102
#rb yuriy.odonnell
[CL 27872532 by christopher waters in ue5-main branch]
- Added support for up to 32 samplers to the D3D12 RHI.
- Added 'MaxSamplers' to ShaderPlatform in DataDrivenPlatformInfo, this is defaulted to 16 for all shader platforms and can be modified the the DDPI ini files. This value will set the shader compiler define 'PLATFORM_MAX_SAMPLERS'.
- Added a 'RequiredSamplersSwitch' material editor node to branch based on a given shader platform's maximum sampler count.
- To support more than 16 samplers on feature level SM5 platforms Dxc and sm6.0 are used to compile the shader. On platforms that don't support Dxc and sm6.0 the preivew menu item will be disabled.
#jira UE-191404
#rb florin.pascu
[CL 27850133 by michael wanderson in ue5-main branch]
- PC previews of SM6 platforms weren't going to DXC correctly.
- Preview platform include paths weren't initialized when compiling with local-only shader compiles.
- A few preview platform DDSPI settings weren't being initialized correctly based on the capabilites of the preview format.
#rb arciel.rekman, dan.elksnitis
[CL 26589147 by christopher waters in ue5-main branch]