#include <MaterialAsset.h>
Inherits AZ::Data::AssetData, and AssetInitBus::Handler.
|
static void | Reflect (ReflectContext *context) |
|
|
static const char * | DisplayName |
|
static const char * | Group |
|
static const char * | Extension |
|
static constexpr uint32_t | UnspecifiedMaterialTypeVersion = static_cast<uint32_t>(-1) |
|
|
class | MaterialVersionUpdates |
|
class | MaterialAssetCreator |
|
class | MaterialAssetHandler |
|
MaterialAsset defines a single material, which can be used to create a Material instance for rendering at runtime. Use a MaterialAssetCreator to create a MaterialAsset.
◆ GetMaterialFunctors()
const MaterialFunctorList & AZ::RPI::MaterialAsset::GetMaterialFunctors |
( |
| ) |
const |
The material may contain any number of MaterialFunctors. Material functors provide custom logic and calculations to configure shaders, render states, and more. See MaterialFunctor.h for details.
◆ GetMaterialSrgLayout() [1/3]
Just like the original GetMaterialSrgLayout() where it uses the index of the default supervariant. See the definition of DefaultSupervariantIndex.
◆ GetMaterialSrgLayout() [2/3]
Same as above but accepts the supervariant name. There's a minor penalty when using this function because it will discover the index from the name.
◆ GetMaterialSrgLayout() [3/3]
Returns the shader resource group layout that has per-material frequency, which indicates most of the topology for a material's shaders. All shaders in a material will have the same per-material SRG layout.
- Parameters
-
supervariantIndex | supervariant index to get the layout from. |
◆ GetObjectSrgLayout() [1/3]
Just like the original GetObjectSrgLayout() where it uses the index of the default supervariant. See the definition of DefaultSupervariantIndex.
◆ GetObjectSrgLayout() [2/3]
Same as above but accepts the supervariant name. There's a minor penalty when using this function because it will discover the index from the name.
◆ GetObjectSrgLayout() [3/3]
Returns the shader resource group layout that has per-object frequency. What constitutes an "object" is an agreement between the FeatureProcessor and the shaders, but an example might be world-transform for a model. All shaders in a material will have the same per-object SRG layout.
- Parameters
-
supervariantIndex | supervariant index to get the layout from. |
◆ GetPropertyValues()
Returns the list of values for all properties in this material. The entries in this list align with the entries in the MaterialPropertiesLayout. Each AZStd::any is guaranteed to have a value of type that matches the corresponding MaterialPropertyDescriptor. For images, the value will be of type ImageBinding.
Note that even though material source data files contain only override values and inherit the rest from their parent material, they all get flattened at build time so every MaterialAsset has the full set of values.
Calling GetPropertyValues() will automatically finalize the material asset if it isn't finalized already. The MaterialTypeAsset must be loaded and ready.
The documentation for this class was generated from the following file:
- Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialAsset.h