#include <MaterialTypeAsset.h>
Inherits AZ::Data::AssetData, AZ::Data::AssetBus::MultiHandler, and AssetInitBus::Handler.
|
static void | Reflect (ReflectContext *context) |
|
|
static const char * | DisplayName |
|
static const char * | Group |
|
static const char * | Extension |
|
static constexpr AZ::u32 | SubId = 0 |
|
static constexpr uint32_t | InvalidShaderIndex = static_cast<uint32_t>(-1) |
|
|
class | MaterialTypeAssetCreator |
|
class | MaterialTypeAssetHandler |
|
MaterialTypeAsset defines the property layout and general behavior for a type of material. It serves as the foundation for MaterialAssets, which can be used to render meshes at runtime.
Use a MaterialTypeAssetCreator to create a MaterialTypeAsset.
◆ ApplyPropertyRenames()
bool AZ::RPI::MaterialTypeAsset::ApplyPropertyRenames |
( |
Name & |
propertyId | ) |
const |
Possibly renames @propertyId based on the material version update steps.
- Returns
- true if the property was renamed
◆ GetDefaultPropertyValues()
const AZStd::vector< MaterialPropertyValue > & AZ::RPI::MaterialTypeAsset::GetDefaultPropertyValues |
( |
| ) |
const |
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.
◆ GetMaterialFunctors()
const MaterialFunctorList & AZ::RPI::MaterialTypeAsset::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. |
The documentation for this class was generated from the following file:
- Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialTypeAsset.h