class
ShaderVariationParameters
Contains information about a single variation of a Shader.
Each variation can have a separate set of
defines that control shader compilation.
Public
Constructors
ShaderVariationParameters
ShaderVariationParameters
Creates a new shader variation with the specified parameters.
Methods
GetI32
Returns the value of a signed integer parameter with the specified name.
Returns 0 if the parameter cannot be found.
GetUI32
Returns the value of a unsigned integer parameter with the specified name.
Returns 0 if the parameter cannot be found.
GetFloat
Returns the value of a float parameter with the specified name.
Returns 0 if the parameter cannot be found.
GetBool
Returns the value of a boolean parameter with the specified name.
Returns false if the parameter cannot be found.
SetI32
Sets the value of the parameter for the provided name.
Any previous value for a parameter with the same name will be overwritten.
SetU32
Sets the value of the parameter for the provided name.
Any previous value for a parameter with the same name will be overwritten.
SetFloat
Sets the value of the parameter for the provided name.
Any previous value for a parameter with the same name will be overwritten.
SetBool
Sets the value of the parameter for the provided name.
Any previous value for a parameter with the same name will be overwritten.
AddParameter
Registers a new parameter that controls the variation.
RemoveParameter
Removes a parameter with the specified name.
HasParameter
Checks if the variation has a parameter with the specified name.
ClearParameters
Removes all parameters.
FindParameter
Attempts to find a parameter with the provided name, or returns null if not found.
GetParameters
Returns a list of names of all registered parameters.
CreateVariationName
Creates a unique name created from all parameters and their values.
Matches
Checks if this variation matches some other variation.
- other
- Other variation to compare it to.
- exact
- When true both variations need to have the exact number of parameters with identical contents, equivalent to the equals operator. When false, only the subset of parameters present in is used for comparison, while any extra parameters present in this object are ignored.
GetParameterList
Returns all the variation parameters.
staticGetRttiStatic
Operators
operator==
operator!=
Internal
Methods
GetDefines
Converts all the variation parameters in a ShaderDefines object, that may be consumed by the shader compiler.
GetIndex
Returns a unique index of this variation, relative to all other variations registered in ShaderVariations object.
SetIndex
Assigns a unique index to the variation that can later be used for quick lookup.
Private
Methods
FindParameter
Non-const overload of FindParameter() const.