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::ShaderVariantSearchResult Struct Reference

#include <ShaderVariantKey.h>

Public Member Functions

 ShaderVariantSearchResult (ShaderVariantStableId stableId, uint32_t dynamicOptionCount)
 
ShaderVariantStableId GetStableId () const
 
bool IsRoot () const
 True if the search returned the root shader variant.
 
bool IsFullyBaked () const
 
uint32_t GetDynamicOptionCount () const
 

Detailed Description

Suggests the shader binary which best fits a requested variant The suggested binary is given as an index in the asset where the search was performed

Constructor & Destructor Documentation

◆ ShaderVariantSearchResult()

AZ::RPI::ShaderVariantSearchResult::ShaderVariantSearchResult ( ShaderVariantStableId  stableId,
uint32_t  dynamicOptionCount 
)

ShaderVariantSearchResult constructor.

Parameters
indexThe StableId of the variant found in the shader variant tree asset.
dynamicOptionCountThe number of dynamic (non-baked) options in this shader variant

Member Function Documentation

◆ GetStableId()

ShaderVariantStableId AZ::RPI::ShaderVariantSearchResult::GetStableId ( ) const

Returns the StableId of the variant found within the shader variant tree asset. It always returns a valid shader, but not always fully baked (static). Also check IsFullyBaked().

◆ IsFullyBaked()

bool AZ::RPI::ShaderVariantSearchResult::IsFullyBaked ( ) const

True if the search found a fully baked (static) variant, false if the variant contains dynamic branches If the shader is not fully baked, the ShaderVariantKeyFallbackValue must be correctly set when drawing


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