- Make various vertex factories work with the new translator
- Fix EnableNewHLSLTranslator check box not showing up when material domain is UI
- Implemented GenerateHLSLExpression for ObjectLocalBounds
- Fix per instance random/custom data not working for some material instances
- Update material function calls before generating a HLSL tree. This is needed to avoid mismatch of inputs/outputs between function calls and the material functions
- Fix SubsurfaceColor having the incorrect default value for two-sided foliage materials
- ShadingModel material property is now prepared before other properties. This is needed because some other properties depend on shading models. For example, SubsurfaceColor has a different default value for two-sided foliages
- For MP_ShadingModel, falls back to the first mateiral shading model if per pixel shading model is not allowed
- Added some error checkings that are present in the old translator but not in the new one
- Fix dynamic parameter and per instance custom data not working with the new translator
- Fix a bug with user vertex interpolators when the new translator is used. The bug is, when there are multiple material graph paths that use the same vertex interpolator and the component usages are different in those paths, the last component usage will override all previous usages causing some components being discarded because the translator think they are not used
- Component swizzling on a numeric scalar now replicates the scalar to YZW instead of returning zeros. This is also the behavior in the old translator
[FYI] tom.holmes, Danny.Kabrane, massimo.tristano, Jason.Nadro
[CL 29098392 by jian ru in ue5-main branch]
- 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]
* 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]
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]
- 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]
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]
#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]
#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]