Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RPI::MaterialNameContext Class Reference

#include <MaterialNameContext.h>

Public Member Functions

void ExtendPropertyIdContext (AZStd::string_view nameContext, bool insertDelimiter=true)
 Extends the name context to a deeper property group.
 
void ExtendSrgInputContext (AZStd::string_view nameContext)
 
void ExtendShaderOptionContext (AZStd::string_view nameContext)
 
bool ContextualizeProperty (Name &propertyName) const
 Applies the name context to a given leaf name.
 
bool ContextualizeSrgInput (Name &srgInputName) const
 
bool ContextualizeShaderOption (Name &shaderOptionName) const
 
bool ContextualizeProperty (AZStd::string &propertyName) const
 
bool ContextualizeSrgInput (AZStd::string &srgInputName) const
 
bool ContextualizeShaderOption (AZStd::string &shaderOptionName) const
 
Name GetContextualizedProperty (Name &propertyName) const
 
Name GetContextualizedSrgInput (Name &srgInputName) const
 
Name GetContextualizedShaderOption (Name &shaderOptionName) const
 
AZStd::string GetContextualizedProperty (const AZStd::string &propertyName) const
 
AZStd::string GetContextualizedSrgInput (const AZStd::string &srgInputName) const
 
AZStd::string GetContextualizedShaderOption (const AZStd::string &shaderOptionName) const
 
bool HasContextForProperties () const
 Returns true if there is some non-default name context.
 
bool HasContextForSrgInputs () const
 
bool HasContextForShaderOptions () const
 
bool IsDefault () const
 Returns true if the name context is empty.
 

Static Public Member Functions

static void Reflect (ReflectContext *context)
 

Detailed Description

This acts like a namespace description for various types of identifiers that appear in .materialtype files. When reusable property groups are nested inside other property groups, they usually need alternate naming to connect to the appropriate shader inputs. For example, a baseColor property group inside a "layer1" group needs to connect to "m_layer1_baseColor_texture" and the same property definition is repeated inside a "layer2" group where it connects to "m_layer2_baseColor_texture". This data structure provides the name context, like "m_layer1_" or "m_layer2_".


The documentation for this class was generated from the following file: