Commit Graph

90 Commits

Author SHA1 Message Date
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
9df93068de Remove obsolete mobile base pass parameters
#jira none
#preflight 6266488ad80b06866cb2b75b
#rb wei.liu

[CL 19899039 by Dmitriy Dyomin in ue5-main branch]
2022-04-25 03:36:53 -04:00
Wei Liu
2be82d909c Fix a bug of depthAux corruption on mobile opengl.
#jira UE-145101

#rb Dmitriy.Dyomin
#preflight 62629916d929bc34a3269fb2

[CL 19863137 by Wei Liu in ue5-main branch]
2022-04-22 08:07:57 -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
Dmitriy Dyomin
a591abf5a6 Added lighting channels support for mobile deferred shading
#rb wei.liu
#preflight 625506ac460d9cb610b9660b

[CL 19735357 by Dmitriy Dyomin in ue5-main branch]
2022-04-13 01:56:42 -04:00
dmitriy dyomin
6c7bb51f6f Fixed: Android Package for TM-Shadermodels crashes on launch with Global Clip Plane enabled
#jira UE-141929
#rb jack.porter
#preflight 621f3ef73e14f0c7e568c601

#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 19219526 in //UE5/Release-5.0/... via CL 19219564
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19227381 by dmitriy dyomin in ue5-main branch]
2022-03-02 15:20:01 -05:00
jack porter
ac87efeae3 Added mobile shader permutation cvar to support bSupportStaticLighting=true with Force No Precomputed Lighting enabled on a level
#jira UE-143323
#rb Dmitriy.Dyomin
#preflight 6215ffcd9e113332ba5998e1
#preflight 621632a8bd3bdd9086d2f5f8


#ROBOMERGE-AUTHOR: jack.porter
#ROBOMERGE-SOURCE: CL 19089743 via CL 19092602 via CL 19094313 via CL 19095775 via CL 19101841
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19141863 by jack porter in ue5-main branch]
2022-02-25 00:10:44 -05:00
zak middleton
36c99f6887 #ue5 - LWC: FVector4f <-> FVector4d conversion is now explicit.
FLinearColor has also been modified to make any double->float conversions explicit. Previously all 3D TVector versions were allowed to be implicit and thus could convert TVector<double> => FLinearColor => TVector4<float>.

Fixed up all engine and game casts. Added "//LWC_TODO: precision loss" around any explicit casts that previously were silently explicit and we may need to revisit for precision loss analysis.

#jira UE-122085
#rb Ben.Ingram, Andrew.Davidson
#preflight 61f24af473238441cb7bb0f1

#ROBOMERGE-AUTHOR: zak.middleton
#ROBOMERGE-SOURCE: CL 18751249 in //UE5/Release-5.0/... via CL 18751253 via CL 18751319
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18751326 by zak middleton in ue5-main branch]
2022-01-27 03:30:41 -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
wei liu
a36d432240 Force mobile dynamic pointlight to use static branch.
#jira UE-131469

#rb Dmitriy.Dyomin

#p4v-preflight-copy 17870962

#ROBOMERGE-AUTHOR: wei.liu
#ROBOMERGE-SOURCE: CL 17883009 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v883-17842818)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17883020 by wei liu in ue5-release-engine-test branch]
2021-10-21 05:35:48 -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
dmitriy dyomin
783ce8c4b5 Fixed SceneColor alpha on mobile to be consistent with desktop rendering
#rb florin.pascu, jack.porter

#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 17658402 via CL 17658416 via CL 17658423 via CL 17658426 via CL 17658451
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v875-17642767)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17658455 by dmitriy dyomin in ue5-release-engine-test branch]
2021-09-29 02:54: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
aurel cordonnier
7f517562d5 Merge from Release-Engine-Staging @ 17438845 to Release-Engine-Test
This represents UE4/Main @17430120 and Dev-PerfTest @17437669

[CL 17439044 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-06 12:23:53 -04:00
dmitriy dyomin
a28d53b8bc Fix some LWC related fallout in mobile rendering
#ROBOMERGE-SOURCE: CL 17285642 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17285669 by dmitriy dyomin in ue5-release-engine-test branch]
2021-08-24 08:44:53 -04:00
florin pascu
d4cbc4822e Fill StencilValue correctly in the DepthPass when enabled
Revert BasePass changes
#rb Dmitriy.Dyomin, Ben.Woodhouse
#jira UE-121532
#preflight 6115153c29ebef000137915b

#ROBOMERGE-SOURCE: CL 17151576 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17151608 by florin pascu in ue5-release-engine-test branch]
2021-08-12 09:49:16 -04:00
florin pascu
e953afc1fb Integrate SDF to mobile deferred renderer
#rb Dmitriy.Dyomin
#jira UE-108947
#preflight 6110f66e9c7bb10001464b81

#ROBOMERGE-SOURCE: CL 17099491 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)

[CL 17099499 by florin pascu in ue5-release-engine-test branch]
2021-08-09 06:21:58 -04:00
florin pascu
5c1e32c73c RG11B10 + SceneDepthAux 16/32F + Alpha Propagate
For Forward ES31
 Default SceneColor RG11B10 + R16F\32F Depth texture
 With PropagateAlpha on RGBA16F + R16F\32F
 PostProcess we sample SceneDepthAux for Depth
For Deferred ES31
 SceneDepthAux only for Metal
 PropagateAlpha not working yet
 PostProcess we sample SceneDepthTexture for Depth

cvar to change Depth texture from 16 to 32Fr.Mobile.SceneDepthAux
cvar for AlphaPropagate r.Mobile.PropagateAlpha
#jira UE-98033
#rb Dmitriy.Dyomin, Carl.Lloyd, Jack.Porter

#ROBOMERGE-SOURCE: CL 16644095 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v833-16641396)

[CL 16644108 by florin pascu in ue5-release-engine-test branch]
2021-06-11 13:47:20 -04:00
Marc Audy
e80ea6b959 Merge from Release-Engine-Staging @ 16444985
This represents UE4/Main @ 16445039 and Dev-PerfTest @ 16444526

[CL 16445122 by Marc Audy in ue5-release-engine-test branch]
2021-05-25 02:43:26 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00
Florin Pascu
555d4d6875 Mobile Full DepthPrepass UE5
#rb Dmitriy.Dyomin
#jira none
#preflight 60586031c27ab80001a77914

[CL 15758057 by Florin Pascu in ue5-main branch]
2021-03-22 05:53:01 -04:00
Wei Liu
1711d3aece 1.Convert mobile base passes to single pass to avoid leveraging on the RDG pass merge which could let the resource transitions occurred inside a pass.
2.Make pixel projected reflection using last frame scenecolor and scenedepth to avoid to split mobile base pass and translucency pass.
3.Support GTAO and PPR for mobile deferred renderer.

#jira none

#rb Dmitriy.Dyomin, Jack.Porter, Mi.Wang

[CL 15651055 by Wei Liu in ue5-main branch]
2021-03-09 00:23:43 -04:00
dmitriy dyomin
4660a0c391 Fixed occasional crashes in TM-ShaderModels mobile preview related to reflection captures
TextureResource can be updated inside UTexture and cached FTexture pointer inside reflection capture will get stale
#rb jack.porter, florin.pasku

#ROBOMERGE-SOURCE: CL 15637557 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v778-15633161)

[CL 15637589 by dmitriy dyomin in ue5-main branch]
2021-03-08 07:16:20 -04:00