Commit Graph

896 Commits

Author SHA1 Message Date
tuo chen
2ff75a731a Supports black texture array on mobile.
#jira none

#robomerge 5.0

#rb Dmitriy.Dyomin
#preflight 618e0dabe96ba283217718d1

[CL 18166008 by tuo chen in ue5-main branch]
2021-11-12 06:19:58 -05:00
aurel cordonnier
fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -05:00
carl lloyd
232f64154e Added support for full precision in Material expressions to project
Added override for half precision to Materials

#jira UE-130988
#rb Jack.Porter, Dmitriy.Dyomin
#p4v-cherrypick 17965223

#ROBOMERGE-AUTHOR: carl.lloyd
#ROBOMERGE-SOURCE: CL 18035100 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)

[CL 18035152 by carl lloyd in ue5-release-engine-test branch]
2021-11-03 11:57:39 -04:00
tiantian xie
f97ab2884f [Major] Reduce SSS performance overhead when SSS only occupies a small region (e.g., from 0.7ms to 0.2ms).
1. Reduce unnecessary UAV Clear with property velocity projection. Only subpass one UAV is cleared conditionally when separable tiles are detected.
            2. Remove subsurface view copy and use tile based recombine.
            3. Mipmaps are generated only when there are many Burley tiles ( default r.SSS.Burley.MinGenerateMipsTileCount to 4000)
[Minor] Rename pass and texture names, and use proper descriptors.

#jira UE-131573
#rb jian.ru
#ushell-cherrypick of 17979880 by Tiantian.Xie
#preflight 617c0c6b5dbdbc00016ea885

#ROBOMERGE-AUTHOR: tiantian.xie
#ROBOMERGE-SOURCE: CL 17983475 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)

[CL 17983481 by tiantian xie in ue5-release-engine-test branch]
2021-10-29 12:53:33 -04:00
florin pascu
519515e8f4 Disable SceneDepthAux when r.MobileHDR=0 for non-IOS platforms
#rb Dmitriy.Dyomin
#jira none
#preflight 617a54f55794a500012ddb86

#ROBOMERGE-AUTHOR: florin.pascu
#ROBOMERGE-SOURCE: CL 17959353 in //UE5/Release-5.0/... via CL 17959363
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17959365 by florin pascu in ue5-release-engine-test branch]
2021-10-28 05:07:35 -04:00
tiago costa
eb76b7db7f Move FillInstanceUploadBuffer/BuildRayTracingInstanceBuffer from RenderCore to Renderer
- Necessary to access GPUScene

#jira UE-129652
#preflight 617930065794a50001f9bb79
#rb Yuriy.ODonnell

#ROBOMERGE-AUTHOR: tiago.costa
#ROBOMERGE-SOURCE: CL 17942265 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)

[CL 17942290 by tiago costa in ue5-release-engine-test branch]
2021-10-27 07:54:32 -04:00
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04:00
tiago costa
ef9020619e Build RT Instance Buffer in compute shader
- FRayTracingScene::Create() kicks off instance data upload to parallel thread along with RDG pass to build platform specific instance buffer.
- Implemented helper functions FillInstanceUploadBuffer and BuildRayTracingInstanceBuffer
- AutoInstanceBuffer is deprecated but still supported (for one release) when FRayTracingSceneInitializer is used.
- Temporarily remove support for Niagara meshes in TLAS.

#jira UE-129652
#preflight 617177237a83f30001e1407e
#rb Yuriy.ODonnell

#ROBOMERGE-AUTHOR: tiago.costa
#ROBOMERGE-SOURCE: CL 17885359 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v883-17842818)

[CL 17885365 by tiago costa in ue5-release-engine-test branch]
2021-10-21 11:15:38 -04:00
tuxerr
d299b17d29 PR #8517: fix VK_FDM usage on Vulkan (Contributed by tuxerr)
3 fixes:
* Fixes the GRHISupportsVariableRateShading logic to ensure that bool doesn't get nuked if the device supports FragmentDensityMap but not ShadingRateAttachment.
* Ensures Scene Textures are created as an array when multiview enabled.
* Ensures the RenderPass2 impl supports the Multiview Mask.

#jira UE-131846
#rb steve.smith jeannoe.morissette

#ROBOMERGE-AUTHOR: steve.smith
#ROBOMERGE-SOURCE: CL 17864739 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v883-17842818)

[CL 17864759 by tuxerr in ue5-release-engine-test branch]
2021-10-19 15:28:06 -04:00
christopher waters
a43a3f735f More bring-up work on bindless in D3D12RHI and initial public RHI support:
- Bindless rendering is not enabled anywhere yet.
- Adding bSupportsBindless to DDSPI.
- Moving ED3D12DescriptorHeapType into RHI and renaming to ERHIDescriptorHeapType.
- Adding FRHIDescriptorHandle for public usage of bindless indices.
- Adding GetBindlessHandle() to RHI SamplerState, SRV, UAV.
- Adding GetDefaultShaderResourceView() to RHI Textures.
- Adding bindless Sampler heap support to D3D12.
- Cleaned up some common shader code in prep for future bindless work.

#jira none
#rb mihnea.balta
#preflight 6169f8fafeab330001591bd0

#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 17846249 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v883-17842818)

[CL 17846289 by christopher waters in ue5-release-engine-test branch]
2021-10-18 12:00:17 -04:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
ben ingram
0bb0a923a0 Merging Dev-LWCRendering into Main, this includes initial work to support rendering with LWC-scale position
Basic approach is to add HLSL types FLWCScalar, FLWCMatrix, FLWCVector, etc.  Inside shaders, absolute world space position values should be represented as FLWCVector3.  Matrices that transform *into* absolute world space become FLWCMatrix.  Matrices that transform *from* world space become FLWCInverseMatrix.  Generally LWC values work by extending the regular 'float' value with an additional tile coordinate.  Final tile size will be a trade-off between scale/accuracy; I'm using 256k for now, but may need to be adjusted.  Value represented by a FLWCVector thus becomes V.Tile * TileSize + V.Offset.  Most operations can be performed directly on LWC values.  There are HLSL functions like LWCAdd, LWCSub, LWCMultiply, LWCDivide (operator overloading would be really nice here).  The goal is to stay with LWC values for as long as needed, then convert to regular float values when possible.  One thing that comes up a lot is working in translated (rather than absolute) world space.  WorldSpace + View.PrevPreViewTranslation = TranslatedWorldspace.  Except 'View.PrevPreViewTranslation' is now a FLWCVector3, and WorldSpace quantities should be as well.  So that becomes LWCAdd(WorldSpace, View.PrevPreViewTranslation) = TranslatedWorldspace.  Assuming that we're talking about a position that's "reasonably close" to the camera, it should be safe to convert the translated WS value to float.  The 'tile' coordinate of the 2 LWC values should cancel out when added together in this case.  I've done some work throughout the shader code to do this.  Materials are fully supporting LWC-values as well.  Projective texturing and vertex animation materials that I've tested work correctly even when positioned "far away" from the origin.

Lots of work remains to fully convert all of our shader code.  There's a function LWCHackToFloat(), which is a simple wrapper for LWCToFloat().  The idea of HackToFloat is to mark places that need further attention, where I'm simply converting absolute WS positions to float, to get shaders to compile.  Shaders converted in this way should continue to work for all existing content (without LWC-scale values), but they will break if positions get too large.

General overview of changed files:
LargeWorldCoordinates.ush - This defines the FLWC types and operations
GPUScene.cpp, SceneData.ush - Primitives add an extra 'float3' tile coordinate.  Instance data is unchanged, so instances need to stay within single-precision range of the primitive origin.  Could potentially split instances behind the scenes (I think) if we don't want this limitation
HLSLMaterialDerivativeAutogen.cpp, HLSLMaterialTranslator.cpp, Preshader.cpp - Translated materials to use LWC values
SceneView.cpp, SceneRelativeViewMatrices.cpp, ShaderCompiler.cpp, InstancedStereo.ush - View uniform buffer includes LWC values where appropriate
#jira UE-117101
#rb arne.schober, Michael.Galetzka

#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 17787435 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v881-17767770)

[CL 17787478 by ben ingram in ue5-release-engine-test branch]
2021-10-12 13:31:00 -04:00
juan canada
bca4ec6f91 Fixed ray tracing is not enabled by default in cooked games with r.raytracing set to 1.
#rb none
#jira UE-130639
#preflight 6165a31ba8ff590001d9b1be

#ushell-cherrypick of 17786332 by Juan.Canada

#ROBOMERGE-AUTHOR: juan.canada
#ROBOMERGE-SOURCE: CL 17786479 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v881-17767770)

[CL 17786519 by juan canada in ue5-release-engine-test branch]
2021-10-12 12:34:04 -04:00
arciel rekman
2d2c498c41 Do not precreate clear replacement shaders in the editor (UE-127489).
- The benefit isn't worth having to deal with multiple fallouts from this.

#rb none
#jira UE-127489

#ushell-cherrypick of 17776551 by Arciel.Rekman

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 17779200 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v881-17767770)

[CL 17779205 by arciel rekman in ue5-release-engine-test branch]
2021-10-11 21:02:01 -04:00
lukas hermanns
85dec65f90 Add bSupportsDxc to DataDrivenPlatformInfo.
#rb Arne.Schober, Rolando.Caloca
[FYI] Josh.Adams, Brian.White, Florin.Pascu
#jira none
#rnx

#ROBOMERGE-AUTHOR: lukas.hermanns
#ROBOMERGE-SOURCE: CL 17776856 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v881-17767770)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17776906 by lukas hermanns in ue5-release-engine-test branch]
2021-10-11 17:16:04 -04:00
jeannoe morissette
9ae01b3f37 Specify a render area to clearing render pass without targets to fix asserts in Vulkan for AncientGame.
#rb Rolando.Caloca
[FYI] krzysztof.narkowicz

#ROBOMERGE-AUTHOR: jeannoe.morissette
#ROBOMERGE-SOURCE: CL 17664497 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v875-17642767)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17664554 by jeannoe morissette in ue5-release-engine-test branch]
2021-09-29 13:48:29 -04:00
aurel cordonnier
69fe095547 Merge from Release-Engine-Staging @ 17636544 to Release-Engine-Test
This represents UE4/Main @17638339 and Dev-PerfTest @17636504

[CL 17638842 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-27 19:54:25 -04:00
andrew davidson
57beb335f2 Merging //UE5/Dev-LargeWorldCoordinates [at] 17581892 to //UE5/Main
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 17595295 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17595306 by andrew davidson in ue5-release-engine-test branch]
2021-09-22 10:01:48 -04:00
arciel rekman
63977655d7 Make sure shaders are only created on one thread in DX11 (UE-125050).
(cherry pick of 17507631 including later followup fixes in 17526511 and 17542272)

- Disable RDG parallel execution on D3D11.
- Precreate ClearReplacement shaders
- Also add a check to catch other possible issues before it's too late.

#rb Chris.Waters (in Dev-EMT)
#jira UE-125050

#ushell-cherrypick of 17507631 by Arciel.Rekman

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 17586312 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17586354 by arciel rekman in ue5-release-engine-test branch]
2021-09-21 15:10:29 -04:00
carlmagnus nordin
b66caeff28 Fixed cyclic dependency IoStoreUtiltities->RenderCore->PakFileUtilities->IoStoreUtilities by removing unused pak order file functionality from ShaderCodeLibrary
#rnx
#rb per.larsson

#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 17522942 via CL 17523034 via CL 17523046 via CL 17523058
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v870-17433530)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17523070 by carlmagnus nordin in ue5-release-engine-test branch]
2021-09-15 13:30:38 -04:00
arciel rekman
8ce2ab1868 ShaderCodeLibrary: a hopeful fix for the PVS warning.
#rb none
#jira UE-126630

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 17520566 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17520571 by arciel rekman in ue5-release-engine-test branch]
2021-09-15 11:25:43 -04:00
carlmagnus nordin
a627591ffa IoStore: Changes to allow IoStore to run as part of UnrealPak instead of as a cmdlet
#rb per.larsson
#rnx

#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 17517167 via CL 17517189 via CL 17517191 via CL 17519703
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v870-17433530)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17519714 by carlmagnus nordin in ue5-release-engine-test branch]
2021-09-15 10:39:23 -04:00
rune stubbe
f92ae9ba98 FScatterUploadBuffer::Init now respects GetMaxBufferDimension()
Power of two rounding to mitigate fragmentation now happens in bytes, instead of elements, so we get fewer unique buffer sizes.
#rb ola.olsson
#preflight 613f61e53bbb4800011187f1

#ROBOMERGE-AUTHOR: rune.stubbe
#ROBOMERGE-SOURCE: CL 17493448 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17493511 by rune stubbe in ue5-release-engine-test branch]
2021-09-13 12:57:44 -04:00
jeremy moore
daefcfead4 Make "r.vt.FeedbackFactor" something that can be changed at runtime, instead of needing a restart/shader recompile.
This should be useful if we want to vary the feedback trade offs for different modes.
Did some comparisons of shader ISA and ALU cost is unchanged.
#jira none
#ushell-cherrypick of 17483512 by Jeremy.Moore

#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17491509 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17491521 by jeremy moore in ue5-release-engine-test branch]
2021-09-13 09:57:32 -04:00
florin pascu
6eaadba834 Read r.MobileNumDynamicPointLights from platform ini instead of project cvar
Add r.MobileNumDynamicPointLights to the shader keystring
#jira UE-125928
#rb Dmitriy.Dyomin, Jack.Porter
#preflight 6139e0f4f9a522000139e1bd
#ushell-cherrypick of 17470398 by Florin.Pascu

#ROBOMERGE-AUTHOR: florin.pascu
#ROBOMERGE-SOURCE: CL 17470936 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17470965 by florin pascu in ue5-release-engine-test branch]
2021-09-09 07:02:01 -04:00