In restrictive mode, material instances could not inherit from a cooked material not in base modules. Now material instances can inherit from such restricted materials as long as they do not introduce a new static parameters permutation and thus a new shader. To prevent this, the UI disables the checkboxes that would trigger a new shader to be created (full validation is still performed at cook time, so even if a user manages to create a material instance with a static permutation, this would be rejected by the content worker).
[REVIEW] josie.yang
#preflight 6464e5a22d446eac96ca83a6
[CL 25511566 by massimo tristano in ue5-main branch]
When this mode is on, a Material or MaterialInstance is allowed to be a parent to another MaterialInstance if and only if:
- It is uncooked.
- It is a special engine material.
- It belongs to the same module as the child MaterialInstance.
- It is belongs to a set of "base modules".
#rb jason.nadro, arciel.rekman, francis.hurteau, matt.peters
#preflight 6412fd4fe62652b594207377
[CL 24672110 by massimo tristano in ue5-main branch]
- Removing MaterialAttributeDefinitionMap and MaterialRenderProxy from MaterialShared.h
- Removing MaterialShared from Material.h
#preflight 639cbb35776b61ba3b82f03e
[CL 23541603 by christopher waters in ue5-main branch]
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]
Sparse Volume Texture asset from imported OpenVDB (only a single float channel for now). Static or animated sequence.
It will be possible to generate SVT at runtime from GPU later.
Using FEditorBulkData for handling raw source without loading everything when not caching or cooking.
BulkData used at runtime for loading. No streaming yet.
Importer with dependency on OpenVDB is in a SparseVolumeTexture module only loaded when in editor
Sparse volume texture can be sampled from any materials (sample, sample parameter) and overridden on material instance and material instance dynamic.
Added support for uint in compiler (fetch from page table, see SparseVolumeTextureGetVoxelCoord)
Volume texture with u8 VirtualTextureLayerIndex!=255 (INDEX_NONE) are sparse texture. The layer index then represent what texture/attribute to sample.
#preflight https://horde.devtools.epicgames.com/job/6346a466f93be0f6345af86c
#rb Patrick.Kelly, Charles.deRousiers
[CL 22551963 by sebastien hillaire in ue5-main branch]
If this is set, and we are rendering a nanite mesh then we use the override material.
Removed nanite override materials from mesh components.
Material override serialization is specialized so that we don't cook out override materials on non-nanite platforms.
#rb jason.nadro, matt.peters, francis.hurteau
#preflight 6334554b665f6b8f7f770a9b
[CL 22240746 by jeremy moore in ue5-main branch]
- This fixes issues where we would display parameters that weren't used in the material.
#rb Laura.Hermanns
#jira UE-158047
#preflight 62f29458fc3c0200e35662fc
#robomerge[BOT1] Main
[CL 21294860 by Jason Nadro in ue5-main branch]
Setters and getters are native functions called by FProperties when setting property values with *_InContainer functions.
Setters and getter function names can be manually specified with Setter = Func and Getter = Func keywords inside of UPROEPRTY macro but they will also be automatically parsed if the name is not explicitly specified if the setter or getter function name matches SetPropertyName and GetPropertyName pattern.
The latter behavior can be disabled in UHT's DefaultEngine.ini by setting AutomaticSettersAndGetters=False.
ImportText and ExportTextItem functions have been deprecated and should be replaced with *_InContainer or *_Direct variants.
#rb Steve.Robb
#preflight 6210a377a83e0bcefd03d9e1
#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 19070318 via CL 19098059 via CL 19104650 via CL 19104661 via CL 19110012
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)
[CL 19147839 by marc audy in ue5-main branch]
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
[CL 17787435 by Ben Ingram in ue5-main branch]
[at]lauren.barnes
#ROBOMERGE-SOURCE: CL 15406937 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
[CL 15406941 by sebastian nordgren in ue5-main branch]