#include <ShaderVariant.h>
Public Member Functions | |
| AZ_DEFAULT_COPY_MOVE (ShaderVariant) | |
| void | ConfigurePipelineState (RHI::PipelineStateDescriptor &descriptor, const ShaderVariantId &specialization) const |
| void | ConfigurePipelineState (RHI::PipelineStateDescriptor &descriptor, const ShaderOptionGroup &specialization) const |
| void | ConfigurePipelineState (RHI::PipelineStateDescriptor &descriptor) const |
| const ShaderVariantId & | GetShaderVariantId () const |
| bool | IsFullyBaked () const |
| bool | IsFullySpecialized () const |
| Returns whether the variant is using specialization constants for all of the options. | |
| bool | UseSpecializationConstants () const |
| Return true if this shader variant has at least one shader option using specialization constant. | |
| bool | UseKeyFallback () const |
| Return true if this variant needs the ShaderVariantKeyFallbackValue to be correctly set when drawing. | |
| bool | IsRootVariant () const |
| ShaderVariantStableId | GetStableId () const |
| const Data::Asset< ShaderAsset > & | GetShaderAsset () const |
| const Data::Asset< ShaderVariantAsset > & | GetShaderVariantAsset () const |
Friends | |
| class | Shader |
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.
| void AZ::RPI::ShaderVariant::ConfigurePipelineState | ( | RHI::PipelineStateDescriptor & | descriptor | ) | const |
Fills a pipeline state descriptor with settings provided by the ShaderVariant. Only use this function if the shader variant is not using ANY specialization constant. Otherwise an error will be raised and the default values will be used.
| void AZ::RPI::ShaderVariant::ConfigurePipelineState | ( | RHI::PipelineStateDescriptor & | descriptor, |
| const ShaderOptionGroup & | specialization | ||
| ) | const |
Fills a pipeline state descriptor with settings provided by the ShaderVariant. It also configures the specialization constants if they are being used by the shader variant.
| void AZ::RPI::ShaderVariant::ConfigurePipelineState | ( | RHI::PipelineStateDescriptor & | descriptor, |
| const ShaderVariantId & | specialization | ||
| ) | const |
Fills a pipeline state descriptor with settings provided by the ShaderVariant. It also configures the specialization constants if they are being used by the shader variant. (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).
|
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.