Navigation
API > API/Runtime > API/Runtime/RenderCore
Variadic template that defines an arbitrary multi-dimensional permutation domain, that can be instantiated to represent a vector within the domain.
// Defines a permutation domain with arbitrary number of dimensions. Dimensions can themselves be domains. // It is totally legal to have a domain with no dimensions. class FMyPermutationDomain = TShaderPermutationDomain
// ...
// Create a permutation vector to be initialized. By default a vector is set at the origin of the domain. // The origin of the domain is the ShaderPermutationId == 0. FMyPermutationDomain PermutationVector;
// Set the permutation vector's dimensions. PermutationVector.Set
// Get the permutation id from the permutation vector for shader compiler. int32 ShaderPermutationId = PermutationVector.ToDimensionValueId();
// Reconstruct the permutation vector from shader permutation id. FMyPermutationDomain PermutationVector2(ShaderPermutationId);
// Get permutation vector's dimension. if (PermutationVector2.Get
| Name | TShaderPermutationDomain |
| Type | struct |
| Header File | /Engine/Source/Runtime/RenderCore/Public/ShaderPermutation.h |
| Include Path | #include "ShaderPermutation.h" |
Syntax
template<typename... Ts>
struct TShaderPermutationDomain
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Constructors. | ShaderPermutation.h | ||
TShaderPermutationDomain
(
int32 PermutationId |
ShaderPermutation.h |
Struct Specializations
| Name | Remarks |
|---|---|
| TShaderPermutationDomain< TDimension, Ts... > |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Type | TShaderPermutationDomain< Ts... > | Setup the dimension's type in permutation domain as itself so that a permutation domain can be used as a dimension of another domain. | ShaderPermutation.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| IsMultiDimensional | bool | Define a domain as a multidimensional dimension so that ModifyCompilationEnvironment() is getting used. | ShaderPermutation.h |
| PermutationCount | int32 | Total number of permutation within the domain is one if no dimension at all. | ShaderPermutation.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const DimensionToGet::Type Get() |
Get dimension's value, but in this case emit compile time error if could not find the dimension to get. | ShaderPermutation.h | |
void ModifyCompilationEnvironment
(
FShaderCompilerEnvironment& OutEnvironment |
Modify compilation environment. | ShaderPermutation.h | |
void Set
(
typename DimensionToSet::Type |
Set dimension's value, but in this case emit compile time error if could not find the dimension to set. | ShaderPermutation.h | |
int32 ToDimensionValueId () |
ShaderPermutation.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static Type FromDimensionValueId
(
const int32 PermutationId |
Returns the permutation domain from the unique ID. | ShaderPermutation.h | |
static int32 ToDimensionValueId
(
const Type& PermutationVector |
Converts domain permutation vector to domain's value id. | ShaderPermutation.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator==
(
const Type& Other |
Test if equal. | ShaderPermutation.h |