Commit Graph

255 Commits

Author SHA1 Message Date
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
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
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
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
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
e286aecd18 Remove code in UMaterialGraphNode_Base that associated additional data with pins via a TMap
Instead, add 'SourceIndex' directly to UEdGraphPin and remove the map
Too many edge cases where something would modify pins directly, and the map would get out of sync with actual pins
#jira UE-119861
#rb lauren.barnes

#ROBOMERGE-SOURCE: CL 16897567 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16897572 by ben ingram in ue5-release-engine-test branch]
2021-07-20 11:49:47 -04:00
aurel cordonnier
02c0f425e8 Copy up from Release-Engine-Staging @ 16738359
This represents UE4/Main @ 16738161 and Dev-PerfTest @ 16737719

[CL 16738582 by aurel cordonnier in ue5-release-engine-test branch]
2021-06-22 00:27:54 -04:00
kevin ortegren
73961aeb42 Adding a "Preview Blend Mode" on material functions that allows you to modifying the blend mode of the preview material. This is saved off on the material function so that artists can pick what they'd prefer the default preview behavior to be.
Contributed by The Coalition

#rb ben.ingram
#jira none

#ROBOMERGE-SOURCE: CL 16347000 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16347005 by kevin ortegren in ue5-release-engine-test branch]
2021-05-17 06:46:40 -04:00
Lauren Barnes
39f1923ed0 Deprecating .Icon() as a slate attribute on SDockTab. By default, tab icons fall back to using the one for the tab spawner's menu item. SetTabIcon can be used in the edge cases where an icon needs to be set that doesn't match the default. Updating all found cases of .Icon() usage on SDockTab.
#jira UETOOL-3429
#preflight 60996a2bdd2e00000126ff25
#rb Matt.Kuhlenschmidt

[CL 16251489 by Lauren Barnes in ue5-main branch]
2021-05-10 14:19:15 -04:00
christopher waters
688c029803 Tessellation Removal: Removing Tessellation specific material parameters.
#jira UE-94564
#rb ben.ingram, sebastien.hillaire, arciel.rekman, jason.nadro
#preflight 6078b15161a9060001161a4c

[CL 16034000 by christopher waters in ue5-main branch]
2021-04-16 10:46:28 -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
Jason Nadro
336216390d Only display the strata material description if it exists.
#rb sebastien.hillaire
#review @sebastien.hillaire
#jira none

[CL 15823401 by Jason Nadro in ue5-main branch]
2021-03-25 10:40:27 -04:00
Sebastien Hillaire
c10078a527 Fix for preview to not try output Strata type.
#rb Rune.Stubbe

[CL 15797843 by Sebastien Hillaire in ue5-main branch]
2021-03-24 09:38:42 -04:00
lauren barnes
14cab89ad7 Fix for Hide Unused Connectors always resetting to true.
#rb trivial
#jira none

#ROBOMERGE-SOURCE: CL 15589105 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v777-15581079)

[CL 15589109 by lauren barnes in ue5-main branch]
2021-03-03 19:01:19 -04:00
jason nadro
30fa5748df Adding shader count statistic in the material editor. This reports the number of shaders that are in the material's shader maps by calling GetShaderNum().
#rb Arciel.Rekman, Ben.Ingram
[at]Arciel.Rekman, [at]Ben.Ingram
#jira none

#ROBOMERGE-SOURCE: CL 15587074 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v777-15581079)

[CL 15587092 by jason nadro in ue5-main branch]
2021-03-03 16:24:00 -04:00
lauren barnes
aa8befd2a2 Fix for Hide Unrelated Connectors defaulting to on
#jira none
#rb Matt.Kuhlenschmidt+

#ROBOMERGE-SOURCE: CL 15560866 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15560944 by lauren barnes in ue5-main branch]
2021-03-01 15:56:39 -04:00
lauren barnes
3553779a26 Material and Material Instance editors update v1.0
#jira UETOOL-2624
#jira UETOOL-2623
#rb Louise.Rasmussen

#ROBOMERGE-SOURCE: CL 15528734 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15528756 by lauren barnes in ue5-main branch]
2021-02-25 11:30:03 -04:00
lauren barnes
73f5d201b3 Material Editor Cleanup Pass
#rb Matt.Kuhlenschmidt
#jira UE-104842

#ROBOMERGE-SOURCE: CL 15421050 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15421081 by lauren barnes in ue5-main branch]
2021-02-16 15:32:34 -04:00
Ben Ingram
bf90b91344 Add new type FExpressionExecOutput to represent UMaterialExpression execution outputs
- Previously exec inputs/outputs were stored along with other (data) inputs/outpus
- Problem is, for exec pins, we want each output to only support 1 connection, but multiple connections to each input. This is the opposite of data, where we support multiple output connections, but only 1 input connection
- So we flip the representation around, and store output pointers, rather than input pointers...this also better matches the way we iterate exec connections while compiling
- This does complicate some UI logic, as now input/output graph pins no longer line up exeactly with UMaterialExpression inputs/outputs (we still have a flat list of pins, but separate lists of exec/non-exec inputs/outputs)
#jira none
#rb lauren.barnes

[CL 15361599 by Ben Ingram in ue5-main branch]
2021-02-08 18:55:31 -04:00