Commit Graph

139 Commits

Author SHA1 Message Date
Charles deRousiers
80ae3ebe74 Fix BlendMode public API for backward compatibility.
#rb none
#jira none
#preflight 63cef61d544e5bb07565f75c
#fyi sebastien.hillaire

[CL 23827517 by Charles deRousiers in ue5-main branch]
2023-01-24 02:15:00 -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
massimo tristano
7043371116 Added check that reports errors if a parameter is added in a Material bound to different values. This should not be allowed.
Code now checks for this occurrences and reprorts an error message instead of siliently trying to compile the material anyway.

This was causing a crash when two material functions containing the same parameter bound to different values (e.g. different textures) are used in the same material.

#jira UE-150412
#rb jeremy.moore
#preflight 63bc4896bf54fa7b36f61ea5
#preflight 63c13055b0652247507fae3e

[CL 23675742 by massimo tristano in ue5-main branch]
2023-01-13 05:36:38 -05:00
massimo tristano
9e4720a5bd Undo changelist 23624757.
#preflight 63bd624ad862fdd347d9fda2

[CL 23625729 by massimo tristano in ue5-main branch]
2023-01-10 08:18:49 -05:00
massimo tristano
98e8affa58 Added check that reports errors if a parameter is added in a Material bound to different values. This should not be allowed.
Code now checks for this occurrences and reprorts an error message instead of siliently trying to compile the material anyway.

This was causing a crash when two material functions containing the same parameter bound to different values (e.g. different textures) are used in the same material.

#jira UE-150412
#rb jeremy.moore
#preflight 63bc4896bf54fa7b36f61ea5

[CL 23624757 by massimo tristano in ue5-main branch]
2023-01-10 04:45:56 -05:00
massimo tristano
a8dc32e175 Undo changelist 23611477
#preflight 63bc20b068068a8bd6e6cca0

[CL 23611763 by massimo tristano in ue5-main branch]
2023-01-09 09:24:30 -05:00
massimo tristano
755e6df654 Added check that reports errors if a parameter is added in a Material bound to different values. This should not be allowed.
Code now checks for this occurrences and reprorts an error message instead of siliently trying to compile the material anyway.

This was causing a crash when two material functions containing the same parameter bound to different values (e.g. different textures) are used in the same material.

#jira UE-150412
#rb jeremy.moore
#preflight 63bc17dd68068a8bd6e4b7bb

[CL 23611477 by massimo tristano in ue5-main branch]
2023-01-09 08:52:28 -05:00
christopher waters
f8abec7a8e Material header dependency cleanup
- Removing MaterialAttributeDefinitionMap and MaterialRenderProxy from MaterialShared.h
- Removing MaterialShared from Material.h

#preflight 639cbb35776b61ba3b82f03e

[CL 23541603 by christopher waters in ue5-main branch]
2022-12-16 16:24:02 -05:00
christopher waters
7215f7d4ec Fully moving MaterialDomain to its own header.
#jira none
#preflight 639b4dc335203bc7aa695078

[CL 23531533 by christopher waters in ue5-main branch]
2022-12-15 16:01:51 -05:00
Charles deRousiers
d5a07828ed Fix even more Strata blend mode.
#rb none
#jira none
#preflight 639a1ee98c64c74ac80ff657

[CL 23516373 by Charles deRousiers in ue5-main branch]
2022-12-14 14:47:58 -05:00
Charles deRousiers
0f6c784ba0 Fix more Strata blend mode.
#rb none
#jira none
#preflight 6399fdac2960b7322075550f

[CL 23513686 by Charles deRousiers in ue5-main branch]
2022-12-14 12:32:01 -05:00
Charles deRousiers
5c44593f0d Abstract blendmode lookup to ease blend mode compatibility with Strata.
#rb sebastien.hillaire
#jira none
#preflight 6398964335203bc7aa695e10

[CL 23492252 by Charles deRousiers in ue5-main branch]
2022-12-13 10:44:43 -05:00
Sebastien Hillaire
29639be6fb Reworked distortion to:
- Use material F0=>IOR by default.
- Then use the root node refraction pin input to override IOR for art direction.
- Refraction is now disable using the mode None.
- This data converted according to the graph content. Usingthe Rectraction input is detected by looking at all the node from the mateiral graph. When material attributes are used however, It is however over conservative since it does not check if the node a really plugged in an actual attribute path.

It was needed to deprecated the previouls RefractionMode variable as default value needs to now be RM_None. The new property is RefractionMethod.

The new GetRootNodeOverridesDefaultRefraction function on FMaterial has a default but to have correct refraction it must be implemented when it matters.

Refraction engine test were all green.

#rb charles.derousiers, chris.kulla
#preflight  https://horde.devtools.epicgames.com/job/63885ca3b21cdd3a2601428e

[CL 23370408 by Sebastien Hillaire in ue5-main branch]
2022-12-02 03:49:35 -05:00
Charles deRousiers
5b21c9a8e4 Change how thickness is setup on Strata material.
* Add a new thickness input on the root node for thin surface
* Add a new thickness input on vertical layer operator, to provide the thickness of the 'layered' material
* Mark Slab thickness input as deprecated, for converting existing asset once this CL is checked in.

#rb sebastien.hillaire
#jira none
#preflight 638903020e4613faedc9e8be

[CL 23358938 by Charles deRousiers in ue5-main branch]
2022-12-01 14:52:03 -05:00
Charles deRousiers
9f9607a23f Add IsThinSurface on root node for flagging surface with thin shell (i.e., hollow interrior).
The defines a clear semantic for how thickness of a bottom layer should be handled with Strata. This CL only pipes the data for the various parts. A following CL will add a thickness property on the root node.

#rb none
#jira none
#preflight 638672dd4004f73f62ea9600
#fyi sebastien.hillaire

[CL 23324261 by Charles deRousiers in ue5-main branch]
2022-11-30 02:10:42 -05:00
Arne Schober
075e43786d Prepare to move StaticSwitchData from EditorOnlyData into RuntimeData in preparation to make StaticSwitches dynamic
#preflight 635993e25d49a96f7b00d3df

[CL 22832676 by Arne Schober in ue5-main branch]
2022-10-28 13:54:13 -04:00
henrik karlsson
b5b86c796c This change is a strategical submit for a coming change that removes lots of includes in headers that are included by many files. This change contains adding of includes in files that previously got those includes transitively from other inclkudes
#preflight 6355d4940313c24974b2107b
#rb none

[CL 22783162 by henrik karlsson in ue5-main branch]
2022-10-26 12:57:32 -04:00
ryan bickell
2e72bca6f8 Add support for masked materials with Merge Actors flatten material.
Fix condition for bRenderOpacityMask to be correctly based on the OpacityMask property instead of Opacity property.

#jira none
#rb sebastien.lussier
#preflight 63516e137261e565c4298e27

[CL 22727672 by ryan bickell in ue5-main branch]
2022-10-24 11:03:51 -04:00
sebastien lussier
2689dd71cb World Partition - HLOD: Added support for automatic texture sizing for Merged & Simplified HLODs
* Reused existing code to share it between all HLOD generation methods

#jira UE-161274, UE-156559
#rb patrick.enfedaque
#preflight 632927c99840225da23c49a5

[CL 22088941 by sebastien lussier in ue5-main branch]
2022-09-20 01:40:59 -04:00
fabian giesen
7d8781778c Deprecate TVector2 operator <, >, <=, >=
2D vectors are not canonically ordered and having these operators results in very unfortunate interactions with generic code. In particular FMath::{Min,Max,Abs} on TVector2s compile but do not behave as one would expect.

Add explicit comparison methods as a replacement and deprecate uses of TVector2 overloaded relational operators since it's confusing and error-prone. Fix existing uses to avoid deprecation warnings. Several of these fixes are behavioral changes to fix what I am reasonably certain are bugs in the existing code - in particular, uses of FMath::{Min,Max,Abs} on TVector2s that almost certainly actually want TVector2::{Min,Max,GetAbs} instead.

#rb charles.bloom,jeff.roberts
#preflight 62d70a6547779a730aaac04b

#ROBOMERGE-AUTHOR: fabian.giesen
#ROBOMERGE-SOURCE: CL 21168341 via CL 21173069 via CL 21173193
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21192034 by fabian giesen in ue5-main branch]
2022-07-20 18:23:11 -04:00
Andrew Davidson
8d844cd4a6 Improve support for an extended WORLD_MAX
#rb various, trivial
#preflight 62a1cb46f73a01bd981b9978

[CL 20573655 by Andrew Davidson in ue5-main branch]
2022-06-09 07:03:13 -04:00
Jason Nadro
fc3dcee397 Restore backed out CL, with fixes.
Also restores follow-up CLs 19973746, 19973782
FStaticParameterSet::MaterialLayers can't be deprecated, since a property with the same name is included via FStaticParameterSetRuntimeData
So instead, FMaterialLayersFunctionsRuntimeData is updated with SerializeFromMismatchedTag, to allow serializing a full FMaterialLayersFunction.
When this happens, the EditorOnly portion is stored in a separate heap allocation, and then transferred to FStaticParameterSet::EditorOnly::MaterialLayers
#preflight 626c3405e31dbb512cef1e98

[Backout] - CL19973745
#fyi bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL19964485
#fyi Ben.Ingram
Original CL Desc
-----------------------------------------------------------------
Add 'Optional' EditorOnly data for UMaterialInterface and UMaterialFunctionInterface
These are separate UObject hierarchies that store editor-only UPROPERTIES, but can be included with cooked content, which allows full editor support.
In principle, all editor-only properties could be moved over.  So far, this has been limited to UMaterialExpressions, and data related to material parameters.
FStaticParameterSet, FMaterialLayersParameters, and FMaterialCachedExpressionData have all been split into separate editor-only/non-editor-only classes,
which allows the editor-only portion to be stored on the optional editor-only UObject.
#preflight 626ab21dad56c0cbbea32dc4
#rb jason.nadro, francis.hurteau
#jira FORT-463329

[CL 20043286 by Jason Nadro in ue5-main branch]
2022-05-04 12:21:52 -04:00
bob tellez
34d8d5badd [Backout] - CL19964485
#fyi Ben.Ingram
Original CL Desc
-----------------------------------------------------------------
Add 'Optional' EditorOnly data for UMaterialInterface and UMaterialFunctionInterface
These are separate UObject hierarchies that store editor-only UPROPERTIES, but can be included with cooked content, which allows full editor support.
In principle, all editor-only properties could be moved over.  So far, this has been limited to UMaterialExpressions, and data related to material parameters.
FStaticParameterSet, FMaterialLayersParameters, and FMaterialCachedExpressionData have all been split into separate editor-only/non-editor-only classes,
which allows the editor-only portion to be stored on the optional editor-only UObject.
#preflight 626ab21dad56c0cbbea32dc4
#rb jason.nadro, francis.hurteau
#jira FORT-463329

[CL 19973745 by bob tellez in ue5-main branch]
2022-04-28 20:08:12 -04:00
Ben Ingram
448b0a9807 Add 'Optional' EditorOnly data for UMaterialInterface and UMaterialFunctionInterface
These are separate UObject hierarchies that store editor-only UPROPERTIES, but can be included with cooked content, which allows full editor support.
In principle, all editor-only properties could be moved over.  So far, this has been limited to UMaterialExpressions, and data related to material parameters.
FStaticParameterSet, FMaterialLayersParameters, and FMaterialCachedExpressionData have all been split into separate editor-only/non-editor-only classes,
which allows the editor-only portion to be stored on the optional editor-only UObject.
#preflight 626ab21dad56c0cbbea32dc4
#rb jason.nadro, francis.hurteau
#jira FORT-463329

[CL 19964485 by Ben Ingram in ue5-main branch]
2022-04-28 12:56:28 -04:00
sebastien lussier
fb46509564 Fixed static analysis warning in MaterialUtilities.cpp
#jira UE-145139
#rb patrick.enfedaque
#preflight 62278ce67077eb04cf6f6faf
#lockdown simon.tourangeau
#rnx

#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 19306498 in //UE5/Release-5.0/... via CL 19307900
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19347228 by sebastien lussier in ue5-main branch]
2022-03-10 21:09:41 -05:00