#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 |
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
AZ::RPI::ShaderVariantSearchResult::ShaderVariantSearchResult | ( | ShaderVariantStableId | stableId, |
uint32_t | dynamicOptionCount | ||
) |
ShaderVariantSearchResult constructor.
index | The StableId of the variant found in the shader variant tree asset. |
dynamicOptionCount | The number of dynamic (non-baked) options in this shader variant |
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().
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