EffectParameterDescription Class |
Namespace: DigitalRune.Graphics.Effects
The EffectParameterDescription type exposes the following members.
Name | Description | |
---|---|---|
EffectParameterDescription |
Initializes a new instance of the EffectParameterDescription class.
|
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Hint |
Gets a value indicating how the effect parameter should be treated during state sorting.
| |
Index |
Gets the zero-based index.
| |
Parameter |
Gets the effect parameter.
| |
Semantic |
Gets the standard semantic (case-sensitive).
|
EffectParameterDescriptions provide additional information for effect parameters. This information is used by the graphics engine to understand effects and apply them properly during rendering.
The standard semantic (see Semantic) is a unique, case-sensitive string (such as "World", "Diffuse", "PointLightPosition", etc.) that defines how the parameter should be interpreted and used by the engine. User-defined strings can be used, as long as they do not conflict with any of the existing semantics. Existing semantics are defined by the following types: DefaultEffectParameterSemantics, SceneEffectParameterSemantics.
The index (see Index) defines the object to which the parameter needs to be bound if multiple objects of the same type exist. The description (Semantic = "PointLightPosition", Index = 3, Hint = Local) means that the parameter stores the position of 4th point light near the object that is being rendered.
Additionally, the sort hint (see Hint) indicates how the parameter should be treated during state sorting.
The descriptions are created automatically by effect interpreters (see IEffectInterpreter) when an effect is initialized. The graphics service manages a list of effect interpreters. Custom interpreters can be added to the graphics service to support new types of effects.