Commit Graph

560 Commits

Author SHA1 Message Date
arciel rekman
1e5deb1942 Improve availability of shader platforms in the mat ed (UE-136509).
#rb none
#jira UE-136509

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 18387134 in //UE5/Release-5.0/... via CL 18387149
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18387152 by arciel rekman in ue5-release-engine-test branch]
2021-12-06 15:33:50 -05:00
ben ingram
5dae45efae Hand integrate CL 17250155:
Prevent stack overflow from material editor setting color from details view that doesn't own current color picker.
#jira UE-120042
#rb none

#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 18238668 via CL 18239212 via CL 18239370 via CL 18240762 via CL 18240831
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18242931 by ben ingram in ue5-release-engine-test branch]
2021-11-18 15:23:37 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -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
sebastian nordgren
8890867a8a Moved FDetailColumnSizeData to its own file.
#rb paul.chipchase
#preflight 617c0f47c44dc500016a989d

#ROBOMERGE-AUTHOR: sebastian.nordgren
#ROBOMERGE-SOURCE: CL 18017897 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)

[CL 18017953 by sebastian nordgren in ue5-release-engine-test branch]
2021-11-02 09:25:24 -04:00
dmitriy dyomin
883f6648c8 Mobile: fix a broken string formating for material stats
#jira UE-131469
#rb none

#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 17975854 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17975863 by dmitriy dyomin in ue5-release-engine-test branch]
2021-10-29 05:45:24 -04:00
kevin ortegren
7bf79cbec3 [Backout] - CL17887288
[FYI] Ben.Ingram
#jira UE-132661
Original CL Desc
-----------------------------------------------------------------
Generate cached data for MID created at runtime in non-editor builds
Make sure material instance resources are updated from cached data loaded in non-editor builds
#jira UE-131802
#rb none

#ROBOMERGE-OWNER: aurel.cordonnier
#ROBOMERGE-AUTHOR: kevin.ortegren
#ROBOMERGE-COMMAND: _robomerge UE5-Release-Engine-Test
#ROBOMERGE-SOURCE: CL 17921250 in //UE5/Release-5.0/... via CL 17922774
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)

[CL 17930569 by kevin ortegren in ue5-release-engine-test branch]
2021-10-26 14:27:07 -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
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
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
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
kevin ortegren
b8a406a8e8 Refactored CPD view to skip duplicate entries.
#rb trivial
#jira none
#preflight 614850a4116f2a0001559066

#ROBOMERGE-AUTHOR: kevin.ortegren
#ROBOMERGE-SOURCE: CL 17569204 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17569223 by kevin ortegren in ue5-release-engine-test branch]
2021-09-20 06:21:10 -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
patrick laflamme
b18dc332d0 Added a 'Preview Profiles' combo box to the advances preview scene toolbar to quickly change preview profiles.
- The profile combo is only visible when the user has more than one profile
  - This was added to the Material Editor, the Static Mesh Editor and Niagara Editor.

#jira UETOOL-2775  Add preview scene background profile dropdown to asset editor vieport toolbar.
#rb Lauren.Barnes, Brooke.Hubert
#preflight 6130c00617a8610001b8ba61

#ROBOMERGE-SOURCE: CL 17402767 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17402787 by patrick laflamme in ue5-release-engine-test branch]
2021-09-02 10:04:12 -04:00
ben ingram
84d2bffbc3 Fix pin index assignments when collapsing material nodes
#rb none
#jira UE-121677

#ROBOMERGE-SOURCE: CL 17391239 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17391245 by ben ingram in ue5-release-engine-test branch]
2021-09-01 15:30:38 -04:00
ben ingram
c0a303be42 Continuation of previous material parameter refactor. Replace FMaterialRenderProxy Scalar/Vector/Texture parameter query functions with generic version
#rb none
#jira none

#ROBOMERGE-SOURCE: CL 17378446 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17378452 by ben ingram in ue5-release-engine-test branch]
2021-08-31 17:38:39 -04:00
ben ingram
d4e0953afb Refactor/cleanup surrounding material parameters.
Primary goal is to reduce amount of code duplicated across different parameter types, and reduce amount of boilerplate required to add new parameters
The main part are new types FMaterialParameterValue, and FMaterialParameterMetadata (both in MaterialTypes.h).  FMaterialParameterValue is a tagged union/variant type, that can represent any material parameter value.  FMaterialParameterMetadata contains a value, along with various editor-only fields that describe how that value is used.
Using this new type, many places that previously included separate APIs for each parameter type collapse to a single API that operates on a FMaterialParameterValue/FMaterialParameterMetadata.  Code that previously had a block copy/pasted for each parameter type can be replaced with a loop that iterates over all parameter types.
Also includes some API cleanup that should improve (editor) performance.  Previously we had APIs GetAllScalarParameters, GetAllVectorParameters, etc, which would return a list of FMaterialParameterInfos for each parameter of the given type.  Code would often query all parameters, then loop over the results and lookup each parameter value.  Now there's a new API, GetAllParametersOfType, which returns a list of all FMaterialParameterMetadata of a given type.  It's easy to just collect the values at the time we're building the list of parameters, so this saves the work of looking up each value individually.
#jira none
#rb lauren.barnes
[FYI] zousar.shaker

#ROBOMERGE-SOURCE: CL 17360722 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17360730 by ben ingram in ue5-release-engine-test branch]
2021-08-30 18:53:14 -04:00
ben ingram
14b02e485d Modifying a material function will continue to recompile all materials that depend on that function, but the materials will no longer be marked dirty
This is fine, because materials will refresh the stateID of any dependent MF when loaded, and use updated stateIDs to form the ShaderMapID
#rb arciel.rekman, jason.nadro
#preflight 6125576daf9a8f0001510587

#ROBOMERGE-SOURCE: CL 17294061 via CL 17294075
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17294091 by ben ingram in ue5-release-engine-test branch]
2021-08-24 17:29:44 -04:00
ben ingram
2351588c6a Add texture cube array assets, support for sampling in materials
#rb graham.wihlidal
#preflight 611ebf1a2c1f1c0001355fe7

#ROBOMERGE-OWNER: ben.ingram
#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 17240322 via CL 17268789
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v858-17259218)

[CL 17268797 by ben ingram in ue5-release-engine-test branch]
2021-08-23 12:36:17 -04:00
aurel cordonnier
dc4bf61540 Merge from Release-Engine-Staging @ 17030559 to Release-Engine-Test
This represents UE4/Main @ 17030256 and Dev-PerfTest @ 17030553

[CL 17031509 by aurel cordonnier in ue5-release-engine-test branch]
2021-08-03 11:56:47 -04:00
jason nadro
ccf73c6f27 Fix crash in the material editor when running with -onethread.
- Let the game thread remove its reference before the deferred deletion so we don't trigger a non-zero ref count check in ~FMaterial.

#rb Ben.Ingram
#preflight 610071545938f90001e90c85

#ROBOMERGE-SOURCE: CL 16975782 via CL 16975842
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16975864 by jason nadro in ue5-release-engine-test branch]
2021-07-27 18:49:38 -04:00
ben ingram
569985155a Avoid crash when opening material function instance, don't look for expressions connected to inputs, since nothing is connected in this context
#rb none

#ROBOMERGE-SOURCE: CL 16911375 via CL 16920633
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16920748 by ben ingram in ue5-release-engine-test branch]
2021-07-22 00:43:16 -04:00
ben ingram
66be2e976f When material function changes, update all dependent function instances, and all material instances that use any of those function (instances)
#rb none

#ROBOMERGE-SOURCE: CL 16886264 via CL 16913628
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16913842 by ben ingram in ue5-release-engine-test branch]
2021-07-21 15:23:35 -04:00