54 Commits

Author SHA1 Message Date
jian ru
9e02435ecf Remove r.MaterialEnableControlFlow and disable the feature as how control flow should be implemented in the material editor is still under discussion
#rb jason.nadro

[CL 25154565 by jian ru in ue5-main branch]
2023-04-21 17:43:44 -04:00
Sebastien Hillaire
6f058da7c5 Substrate - bring back proper premultipled alpha that can be toggle on materials and material instances.
- Coverage over the background can be override from the root node when AlphaCompiste blend mode is selected. If not plugged in, coverage of over brackground is off and regular blending is used.
 - Decals only support translucent, composite and modulate. Normal is ignored when using CompositeAlpha (seen somewhere)
 - Light functions can only be opaque so nothing to do in this case.
 - UI domain tested with all blend mode
 - Material attribute aslo tested
 - Fixed many of issues with blend mode defines, being forced, etc.


#rb soon charles.derousiers
#preflight https://horde.devtools.epicgames.com/job/64426db6641e2c3cb4fc7966
#fyi charles.derousiers

[CL 25143802 by Sebastien Hillaire in ue5-main branch]
2023-04-21 07:37:40 -04:00
charles derousiers
5229394cfe Fix incorrect material appearance on raytracing material with Strata enabled
* Add adaptive RT material payload for Strata.
* Centralize all Strata settings in RenderCore/RenderUtils.h to ensure consistency

#rb chris.kulla
#jira none
#preflight 63d43bcff626715201a0ed1d
[FYI] sebastien.hillaire

[CL 23923301 by charles derousiers in ue5-main branch]
2023-01-31 01:12:18 -05:00
Charles deRousiers
338b5c153b Merge BlendMode and BlendModeStrata to reduce code divergence, and ease maintenance.
#rb sebastien.hillaire
#jira none
#preflight 63c03173c77f50e3b47ed2bd

[CL 23683231 by Charles deRousiers in ue5-main branch]
2023-01-13 14:19:13 -05:00
christopher waters
e886ebc3cd Adding includes that code depended on implicitly. This is preperation for upcoming header dependency improvements.
#preflight 6397418acb2317695e1f3b2b

[CL 23480135 by christopher waters in ue5-main branch]
2022-12-12 13:40:46 -05:00
massimo tristano
e20cd251e0 Fixed crash occurring when the user selects multiple material parameter collection nodes belonging to different collections.
#rb jason.nadro
#preflight 636d17eff406b9a4ff2b6e9e

[CL 23102251 by massimo tristano in ue5-main branch]
2022-11-11 14:11:59 -05: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
Ben Ingram
ff516caf95 Hide UMaterialFunction UI options for new HLSL generator/control flow, if the global CVARs are disabled
#rb none
#jira none
#preflight none

[CL 18567303 by Ben Ingram in ue5-main branch]
2022-01-10 19:25:13 -05:00
yangke li
e2c5409b91 support Mobile full precision floats only for MaterialExpressions, excluding shader codes in .ush/.usf
#jira UE-116139
#rb Dmitriy.Dyomin Wei.Liu

[CL 16432022 by yangke li in ue5-main branch]
2021-05-23 11:58:03 -04:00
Ben Ingram
b6fcc96128 Early WIP of refactored material HLSL translator/generator.
Only mildly functional currently, my goal here is to get feedback on the high level direction.  The new code is disabled by default; it needs to be opted-into per material (and the UI for that is hidden by default behind a CVAR), so it shouldn't affect any existing workflows.
Basic outline:
* UMaterialExpression::Compile is replaced by GenerateHLSLStatement/GenerateHLSLExpression
* GenerateHLSLExpression returns a HLSLTree::FExpression derived object.  This is broadly similar to FShaderCodeChunk, except FExpression stores pointers to dependent expressions, and only generates the final HLSL string on demand (EmitHLSL method).  FExpression will have many derived classes to represent various HLSL expresisons like Add, Parameter, Constant, etc.
* GenerateHLSLStatement returns a HLSLTree::FStatement.  Statements represent chunk of HLSL code rather than a value.  'if(...)' is a statement for example.
* UMaterialExpression will normally override only 1 of GenerateHLSLStatement/GenerateHLSLExpression, although both are possible (for loop may override both, since the for loop index is an expression for example)
* FMaterialHLSLGenerator is the 'context' object passed to GenerateHLSLStatement/GenerateHLSLExpression.  This is kind of like FHLSLMaterialTranslator.  It's responsible for tracking which scope statements/expressions belong to (this can evolve as a given expression/statement is accessed from multiple UMaterialExpressions)
* HLSLTree.h contains the implementation of Expression and FStatement.  I feel like it's possible this could be useful outside of the material system (for example could be shared with Niagara).  Will be tricky to partition/organize the code in such a way to make this work though.
* HLSLTreeCommon.h contains derived expression/statement types.  The intent is to support plugins that define additional derived types.
* MaterialExpressionHLSL.cpp contains the implementations of GenerateHLSLStatement/GenerateHLSLExpression I've added so far.  Eventually all expression types will need to be converted over (this will be a big job).  Once the new system is done, we can remove all the old Compile() functions in MaterialExpressions.cpp
* I haven't given any real thought to Strata or analytic derivatives yet, but I don't forsee any serious problem adapting them to this new system

#jira none
#rb arciel.rekman, sebastien.hillaire, rune.stubbe

[CL 15536071 by Ben Ingram in ue5-main branch]
2021-02-25 19:27:22 -04:00
Ben Ingram
a557c4be0e Add experimental support for material control flow (if-statement, for-loop, local variables)
- Very WIP, not intended/ready for production use
- Hidden behind CVAR to enable support, and per-material flag to opt in
#jira none
#rb rune.stubbe

[CL 15251606 by Ben Ingram in ue5-main branch]
2021-01-28 17:48:58 -04:00
daren cheng
0e796eb369 Add grouping to material graph.
Add composite & pinbase expressions / nodes, which use reroutes under the hood to ensure zero material overhead.
Convert MaterialEditor to a WorkflowCentricApplication.
Generally add subgraph existence support to MaterialGraph / MaterialEditor.

#jira UE-96104
#rb Ben.Ingram Lauren.Barnes
#fyi Lauren.Barnes

[CL 14437968 by daren cheng in ue5-main branch]
2020-10-07 10:35:24 -04:00
Marc Audy
a7c9001a94 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14075166
#rb
#rnx

[CL 14075271 by Marc Audy in ue5-main branch]
2020-08-11 01:36:57 -04:00
peter knepley
6ce3499652 Back out changelist 12117723
[FYI] Nick.Darnell
#jira


#ROBOMERGE-SOURCE: CL 12136905 via CL 12136907
#ROBOMERGE-BOT: (v659-12123632)

[CL 12136909 by peter knepley in Main branch]
2020-03-11 14:18:11 -04:00
nick darnell
f26bb64eea Moving the texture parameter's value property to the top of the details panel
#jira UE-90350
[FYI] Lauren.Barnes


#ROBOMERGE-SOURCE: CL 12117712 via CL 12117723 via CL 12128129
#ROBOMERGE-BOT: (v659-12123632)

[CL 12128284 by nick darnell in Main branch]
2020-03-11 11:23:40 -04:00
lauren barnes
ef4d95529a Don't allow channel names for the channel mask parameter
#jira UE-90086
#rb Jamie.Dale

#ROBOMERGE-SOURCE: CL 11912202 in //UE4/Release-4.25/... via CL 11912214
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)

[CL 11912891 by lauren barnes in Main branch]
2020-03-04 15:20:58 -05:00
ryan durand
627baf970a Updating copyright for Engine Editor.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870586 by ryan durand in Main branch]
2019-12-26 15:33:43 -05:00
Robert Manuszewski
7b6f840f7f Copying //UE4/Dev-Core @ 10708550 to Dev-Main (//UE4/Dev-Main)
#rb none

[CL 10708666 by Robert Manuszewski in Main branch]
2019-12-13 11:07:03 -05:00
Chris Gagnon
8ab0638182 Copying //UE4/Dev-Editor to Dev-Main (//UE4/Dev-Main) for 4.24
#rb none

[CL 9325047 by Chris Gagnon in Main branch]
2019-10-01 20:41:42 -04:00
lauren barnes
25e71b3717 Curve atlas parameters now filter out curves that aren't in the current atlas.
#jira UE-73129
#rb none
#rnx


#ROBOMERGE-SOURCE: CL 8639261 via CL 8651346
#ROBOMERGE-BOT: (v412-8640799)

[CL 8651500 by lauren barnes in Main branch]
2019-09-12 02:26:38 -04:00
Chris Gagnon
2e87118a18 Copying //UE4/Dev-Editor to Dev-Main (//UE4/Dev-Main) Interim 4.24.
#rb none

[CL 8614014 by Chris Gagnon in Main branch]
2019-09-10 11:35:20 -04:00
jeremy moore
ba2c07876c Edition support for RVT parameters
#ROBOMERGE-SOURCE: CL 8562097 via CL 8563573
#ROBOMERGE-BOT: (v406-8472469)

[CL 8563703 by jeremy moore in Main branch]
2019-09-06 19:47:59 -04:00
Rolando Caloca
aa0d2303d6 Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main) @ 6944469
#rb none
#rnx

[CL 6944849 by Rolando Caloca in Main branch]
2019-06-11 18:27:07 -04:00
kevin ortegren
6e86d755db Some UI improvements to matrerial scalar/vector parameters when using the custom primitive data.
Added a debug string field to display all the shading models in a material in UMaterial, this is displayed only when "From Material Expression" is the selected shading model on the material.

#rb none
#rnx


#ROBOMERGE-SOURCE: CL 6604268 via CL 6604783
#ROBOMERGE-BOT: (v351-6581450)

[CL 6604810 by kevin ortegren in Main branch]
2019-05-22 10:27:49 -04:00
Marcus Wassmer
6995e20184 Merging //UE4/Dev-Main@4848702 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none
#lockdown rolando.caloca

[CL 4854488 by Marcus Wassmer in Dev-Rendering branch]
2019-01-30 20:34:55 -05:00