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

#include <ShaderSystem.h>

Inherits AZ::RPI::ShaderSystemInterface.

Public Member Functions

 AZ_TYPE_INFO (ShaderSystem, "{F57DB8D9-0701-4C96-92DB-A8E07DEA09A6}")
 
void Init ()
 
void Shutdown ()
 
void SetGlobalShaderOption (const AZ::Name &shaderOptionName, ShaderOptionValue value) override
 Set a global shader option value that can be used by any shader with a matching shader option name.
 
ShaderOptionValue GetGlobalShaderOption (const AZ::Name &shaderOptionName) override
 Return the value of a global shader option, or Null if the value is not set.
 
const GlobalShaderOptionMap & GetGlobalShaderOptions () const override
 Returns the collection of all global shader options and their values.
 
void Connect (GlobalShaderOptionUpdatedEvent::Handler &handler) override
 Connect a handler for GlobalShaderOptionUpdatedEvent's.
 
void SetSupervariantName (const AZ::Name &supervariantName) override
 
const AZ::Name & GetSupervariantName () const override
 
- Public Member Functions inherited from AZ::RPI::ShaderSystemInterface
 AZ_RTTI (ShaderSystemInterface, "{D14E323A-2240-46DA-9126-6746D10A93F1}")
 
 AZ_DISABLE_COPY_MOVE (ShaderSystemInterface)
 
virtual void SetGlobalShaderOption (const AZ::Name &shaderOptionName, ShaderOptionValue value)=0
 Set a global shader option value that can be used by any shader with a matching shader option name.
 
virtual ShaderOptionValue GetGlobalShaderOption (const AZ::Name &shaderOptionName)=0
 Return the value of a global shader option, or Null if the value is not set.
 
virtual const GlobalShaderOptionMap & GetGlobalShaderOptions () const =0
 Returns the collection of all global shader options and their values.
 
virtual void Connect (GlobalShaderOptionUpdatedEvent::Handler &handler)=0
 Connect a handler for GlobalShaderOptionUpdatedEvent's.
 
virtual void SetSupervariantName (const AZ::Name &supervariantName)=0
 
virtual const AZ::Name & GetSupervariantName () const =0
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
static void GetAssetHandlers (AssetHandlerPtrList &assetHandlers)
 
- Static Public Member Functions inherited from AZ::RPI::ShaderSystemInterface
static ShaderSystemInterfaceGet ()
 

Additional Inherited Members

- Public Types inherited from AZ::RPI::ShaderSystemInterface
using GlobalShaderOptionUpdatedEvent = Event< const AZ::Name &, ShaderOptionValue >
 
using GlobalShaderOptionMap = AZStd::unordered_map< Name, ShaderOptionValue >
 

Detailed Description

Manages system-wide initialization and support for shader classes

Member Function Documentation

◆ Connect()

void AZ::RPI::ShaderSystem::Connect ( GlobalShaderOptionUpdatedEvent::Handler &  handler)
overridevirtual

Connect a handler for GlobalShaderOptionUpdatedEvent's.

Implements AZ::RPI::ShaderSystemInterface.

◆ GetGlobalShaderOption()

ShaderOptionValue AZ::RPI::ShaderSystem::GetGlobalShaderOption ( const AZ::Name &  shaderOptionName)
overridevirtual

Return the value of a global shader option, or Null if the value is not set.

Implements AZ::RPI::ShaderSystemInterface.

◆ GetGlobalShaderOptions()

const GlobalShaderOptionMap & AZ::RPI::ShaderSystem::GetGlobalShaderOptions ( ) const
overridevirtual

Returns the collection of all global shader options and their values.

Implements AZ::RPI::ShaderSystemInterface.

◆ GetSupervariantName()

const AZ::Name & AZ::RPI::ShaderSystem::GetSupervariantName ( ) const
overridevirtual

◆ SetGlobalShaderOption()

void AZ::RPI::ShaderSystem::SetGlobalShaderOption ( const AZ::Name &  shaderOptionName,
ShaderOptionValue  value 
)
overridevirtual

Set a global shader option value that can be used by any shader with a matching shader option name.

Implements AZ::RPI::ShaderSystemInterface.

◆ SetSupervariantName()

void AZ::RPI::ShaderSystem::SetSupervariantName ( const AZ::Name &  supervariantName)
overridevirtual

The ShaderSystem supervariantName is used by the ShaderAsset to search for an additional supervariant permutation. This is done by appending the supervariantName set here to the user-specified supervariant name. Currently this is used for NoMSAA supervariant support.

Implements AZ::RPI::ShaderSystemInterface.


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