Open 3D Engine Atom Gem API Reference  2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Public Member Functions | Friends | List of all members
AZ::RPI::ShaderVariant Class Referencefinal

#include <ShaderVariant.h>

Public Member Functions

 AZ_DEFAULT_COPY_MOVE (ShaderVariant)
 
void ConfigurePipelineState (RHI::PipelineStateDescriptor &descriptor) const
 
const ShaderVariantIdGetShaderVariantId () const
 
bool IsFullyBaked () const
 
AZStd::sys_time_t GetBuildTimestamp () const
 
bool IsRootVariant () const
 
ShaderVariantStableId GetStableId () const
 
const Data::Asset< ShaderAsset > & GetShaderAsset () const
 
const Data::Asset< ShaderVariantAsset > & GetShaderVariantAsset () const
 

Friends

class Shader
 

Detailed Description

Represents the concrete state to configure a PipelineStateDescriptor. ShaderVariant's match the RHI::PipelineStateType of the parent Shader instance. For shaders on the raster pipeline, the RHI::DrawFilterTag is also provided.

Member Function Documentation

◆ ConfigurePipelineState()

void AZ::RPI::ShaderVariant::ConfigurePipelineState ( RHI::PipelineStateDescriptor descriptor) const

Fills a pipeline state descriptor with settings provided by the ShaderVariant. (Note that this does not fill the InputStreamLayout or OutputAttachmentLayout as that also requires information from the mesh data and pass system and must be done as a separate step).

◆ GetBuildTimestamp()

AZStd::sys_time_t AZ::RPI::ShaderVariant::GetBuildTimestamp ( ) const
inline

Return the timestamp when this asset was built. This is used to synchronize versions of the ShaderAsset and ShaderVariantAsset, especially during hot-reload. This timestamp must be >= than the ShaderAsset timestamp.

◆ IsFullyBaked()

bool AZ::RPI::ShaderVariant::IsFullyBaked ( ) const
inline

Returns whether the variant is fully baked variant (all options are static branches), or false if the variant uses dynamic branches for some shader options. If the shader variant is not fully baked, the ShaderVariantKeyFallbackValue must be correctly set when drawing.


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