Commit Graph

522 Commits

Author SHA1 Message Date
Yujiang Wang
f6dc5c0058 Make sure every uniform buffer name in shader optional data is a valid name, i.e. no more "None"-s. Usually it's $Global being removed
#rb laura.hermanns
#preflight 62f1216bd76ea4b503e25128

[CL 21269863 by Yujiang Wang in ue5-main branch]
2022-08-08 12:01:59 -04:00
Tim Smith
606d63e307 Updating LiveCoding to Live++ 1.6.10
#rb self
#preflight 62f128d1185da2495f7b4182

[CL 21269385 by Tim Smith in ue5-main branch]
2022-08-08 11:29:32 -04:00
Laura Hermanns
5217d615d5 Only clear loop control mask instead of replacing Unroll with Loop mask when cross-compiling HLSL-to-HLSL.
#rb Christopher.Waters
#fyi Ryan.Hummer, Andrew.Wang
#preflight 62dae116d54af4b9a244c1dc
#jira UE-160185
#rnx

[CL 21226240 by Laura Hermanns in ue5-main branch]
2022-07-22 14:36:08 -04:00
aleksander netzel
f5fc355c09 Require DXR Tier 1.1 for ray tracing and use shader model 6.5 for all ray tracing shaders in SM5 mode.
#rb Yuriy.Odonnell
#preflight 62d87aad185da2495f0fba0f

[CL 21200656 by aleksander netzel in ue5-main branch]
2022-07-21 10:27:22 -04:00
Dmitriy Dyomin
f00c0a426b Remove support for a landscape baked mesh which was used for mobile platforms only
#jira none
#rb jonathan.bard
#preflight 62d769cdbc175ec68cee67d0

[CL 21171586 by Dmitriy Dyomin in ue5-main branch]
2022-07-19 23:03:12 -04:00
jimmy smith
b92f1fdf0d Configuration support for AudioInfos / AudioFormats per platform
#jira UE-159832
#rb Aaron.mcleran Phil.Popp Dan.Thompson Josh.Adams
#preflight 62d260033c3df323907eaa93

[CL 21153330 by jimmy smith in ue5-main branch]
2022-07-18 17:47:55 -04:00
Arciel Rekman
09175d79ea Multi-viewport on PC (D3D11/12, Vulkan).
- RHISupportsMultiviewport made to work on relevant shader platforms.
- RHISetStereoViewport implemented
- Unused outputs removal fixed to always consider viewport index used.
- Renamed confusing terminology (multiview -> multiviewport).
- Added a CVar (vr.MultiViewport) to force disable
- Added a canvas output to know the method in non-Shipping

#jira UE-151349
#review @Robert.Srinivasiah, @Jules.Blok, @JeanNoe.Morissette
#rb Robert.Srinivasiah, Jules.Blok, Chris.Waters
#preflight 62d193c43b057e727491c9d2

[CL 21153050 by Arciel Rekman in ue5-main branch]
2022-07-18 17:31:15 -04:00
Tim Smith
561cc621f4 Fixed issue where live coding would always complain that a plugin wasn't enabled for live coding. This would happen if the plugin wasn't explicitly enabled by the project but was loaded by another plugin.
#rb self
#jira UE-155343
#preflight 62d57d283c3df32390b44c54

[CL 21149283 by Tim Smith in ue5-main branch]
2022-07-18 11:46:10 -04:00
Yuriy ODonnell
6bea9a80b6 Always support ray tracing shaders when cooking for SM6
* RT shaders are still excluded from SM5 if project is configured to not cook SM5 shaders for D3D12

#rb chris.kulla
#jira UE-158270
#preflight 62d1d478e468fcfd0b97d55a

[CL 21117293 by Yuriy ODonnell in ue5-main branch]
2022-07-15 17:23:41 -04:00
christopher waters
a987160f55 Reworking the parameter rewrite code to do automatic bindless
- Refactoring FShaderParameterParser to use more string views since we can rely on OriginalParsedShader not changing.
- Split FShaderParameterParser::ParseAndMoveShaderParametersToRootConstantBuffer into smaller functions
- Moving FShaderParametersMetadata::IterateShaderParameterMembers into the only module it's used in, ShaderParameterParser.cpp
- Adding CFLAG_BindlessResources which will be set when ENABLE_BINDLESS_RESOURCES is set
- Adding CFLAG_BindlessSamplers which will be set when ENABLE_BINDLESS_SAMPLERS is set
- Adding resource/sampler detection and conversion to bindless in FShaderParameterParser

#jira UE-139616
#rb guillaume.abadie, jeannoe.morissette, yuriy.odonnell, laura.hermanns
#preflight 62d180cce468fcfd0b7001a0

[CL 21111994 by christopher waters in ue5-main branch]
2022-07-15 12:25:44 -04:00
yuriy odonnell
cadadf9780 Add "TargetedRHIs" to the list of settings evaluated in GetRayTracingShaderFormats()
* This is necessary because some (pre UE 5.1) projects use this instead of D3D12TargetedShaderFormats, etc.

#rb jason.nadro
#jira UE-158270
#preflight 62c47a332f31b87c6c91fb52

#ROBOMERGE-AUTHOR: yuriy.odonnell
#ROBOMERGE-SOURCE: CL 20947047 via CL 20947122 via CL 20947433
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20950739 by yuriy odonnell in ue5-main branch]
2022-07-05 17:48:45 -04:00
yuriy odonnell
07aeb4900e Exclude ray tracing shaders from SM5 if it's disabled for D3D12
* 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]
2022-06-30 15:44:00 -04:00
christopher waters
b28a0c467f Moving ShaderParameterParser into its own source files.
#jira none
#rb guillaume.abadie, kenzo.terelst
#preflight 62b0ecb8ec13d14b5a1897ba

[CL 20757788 by christopher waters in ue5-main branch]
2022-06-21 10:49:56 -04:00
christopher waters
0c8638b589 Removing the "equality comparison with extraneous parentheses" warning from DXC compiles.
#jira none
#rb laura.hermanns
#preflight 62aa2c56da0af39a474fbb74

[CL 20677503 by christopher waters in ue5-main branch]
2022-06-15 17:57:39 -04:00
Tim Smith
2b7e4bb5da Fixed a reliability issue with LiveCoding where it could crash on startup.
#rb self
#preflight 62976df5101592b80503164f

[CL 20451989 by Tim Smith in ue5-main branch]
2022-06-01 10:02:51 -04:00
christopher waters
784625ccec Include Reflection data with SM6 embedded PDBs. This makes them way more useful in PIX.
#jira none
#rb jason.nadro, arciel.rekman, zach.bethel
#preflight 628e8695592ae524e3daac98

[CL 20400241 by christopher waters in ue5-main branch]
2022-05-27 17:56:55 -04:00
laura hermanns
9108353e55 Expand handling of D3D internal compiler errors.
#rb Jason.Nadro
#jira UE-154204
#rnx

#ROBOMERGE-AUTHOR: laura.hermanns
#ROBOMERGE-SOURCE: CL 20382878 via CL 20382903 via CL 20382926
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20385710 by laura hermanns in ue5-main branch]
2022-05-26 17:10:39 -04:00
tiago costa
fc62d1fc0e Initial support for deferred decals in path tracer.
- Decals materials are evaluated using callable shaders in PathTracingKernel.
- Decals are culled using a 2D grid similar to the existing light grid.
- In order to correctly handle decal blending order, decals are sorted using the same logic as the rasterizer on CPU. The compute shader that builds the decal grid maintains the correct order.
- Decal materials are wrapped in FRayTracingDecalMaterialShader. The instance parameters of each decal are bound using uniform buffers.

#preflight 628f3fed2f2409bc1e7a6414
#rb Yuriy.ODonnell, chris.kulla, Jeremy.Moore

[CL 20377336 by tiago costa in ue5-main branch]
2022-05-26 05:59:55 -04:00
charles bloom
f9ebb7fd57 remove unused bSupportDX11TextureFormats in WindowsTargetPlatform
#rb none
#preflight none

[CL 20348934 by charles bloom in ue5-main branch]
2022-05-24 11:23:44 -04:00
charles bloom
0d6b70e857 fix TargetPlatform calls to GetDefaultTextureFormatNamePerLayer changed by 20227025
the bad value passed to BlockSize was not actually used so behavior was not actually broken

#preflight 628bb9cc016e5daa1cbc21e5
#rb jon.olick

[CL 20335399 by charles bloom in ue5-main branch]
2022-05-23 15:28:40 -04:00
christopher waters
8d8c05f497 Reworking shader platform settings on Windows to be per-RHI. This removes the ill-fated "min/max feature level" configs that were just causing confusion.
On Windows, "TargetedRHIs" is now split into "D3D11TargetedShaderFormats", "D3D12TargetedShaderFormats" and "VulkanTargetedShaderFormats". "TargetedRHIs" is still parsed for backwards compatibility.
Using this, projects can now be more easily configured for D3D12-only or even Vulkan-only.
Updated FShaderFormatsPropertyDetails to use FName instead of FString for shader platforms. Also added a filtering method for mixed RHI platforms like Windows.

#jira none
#rb mihnea.balta, josh.adams
#preflight 6287cbf46c7692ac8cc8805f

[CL 20300786 by christopher waters in ue5-main branch]
2022-05-20 15:09:09 -04:00
Laura Hermanns
71b90823ed Force DXC precompilation when FXC contains an "internal error: out of memory" report.
#rb Jason.Nadro
#jira FORT-478366
#preflight 62840e8f82530182723e144b
#rnx

[CL 20260406 by Laura Hermanns in ue5-main branch]
2022-05-18 09:58:29 -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
Jon Olick
0a7be0f773 Removed bSupportDX11TextureFormats, functionality is no longer necessary. Pushed functionality of bSupportDX11TextureFormats down to target platform code.
#preflight 6282816acf7e4667a999a6ea

[CL 20227025 by Jon Olick in ue5-main branch]
2022-05-16 13:05:50 -04:00
Lauren Barnes
6248f8d412 Replacing legacy EditorStyle calls with AppStyle
#preflight 6272a74d2f6d177be3c6fdda
#rb Matt.Kuhlenschmidt

#ROBOMERGE-OWNER: Lauren.Barnes
#ROBOMERGE-AUTHOR: lauren.barnes
#ROBOMERGE-SOURCE: CL 20057269 via CL 20070159 via CL 20072035 via CL 20072203
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
#ROBOMERGE-CONFLICT from-shelf

[CL 20105363 by Lauren Barnes in ue5-main branch]
2022-05-09 13:12:28 -04:00