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::ShaderCollection Class Reference

#include <ShaderCollection.h>

Classes

class  Item
 

Public Types

using iterator = AZStd::vector< Item >::iterator
 
using const_iterator = AZStd::vector< Item >::const_iterator
 

Public Member Functions

 AZ_TYPE_INFO (ShaderCollection, "{8D509258-E32C-4CC7-AADC-D13F790DCE4B}")
 
size_t size () const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
Itemoperator[] (size_t i)
 
const Itemoperator[] (size_t i) const
 
bool HasShaderTag (const AZ::Name &shaderTag) const
 
Itemoperator[] (const AZ::Name &shaderTag)
 
const Itemoperator[] (const AZ::Name &shaderTag) const
 
void TryReplaceShaderAsset (const Data::Asset< ShaderAsset > &newShaderAsset)
 
bool InitializeShaderOptionGroups ()
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Friends

class MaterialTypeAssetCreator
 

Detailed Description

Collects the set of all possible shaders that a material could use at runtime, along with configuration that indicates how each shader should be used. Each shader item may be reconfigured at runtime, but items cannot be added or removed (this restriction helps simplify overall material system code, especially around material functors).

Member Function Documentation

◆ InitializeShaderOptionGroups()

bool AZ::RPI::ShaderCollection::InitializeShaderOptionGroups ( )

Loops through all items in the collection and calls Item::InitializeShaderOptionGroup(). Returns true if all Item::InitializeShaderOptionGroup() return true, otherwise returns false.

◆ TryReplaceShaderAsset()

void AZ::RPI::ShaderCollection::TryReplaceShaderAsset ( const Data::Asset< ShaderAsset > &  newShaderAsset)

Convenience function that loops through all @m_shaderItems and calls TryReplaceShaderAsset on all of them.


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