ShaderMixinManager Class
Namespace: Stride.ShadersAssembly: Stride.Shaders.dll
Manages IShaderMixinBuilder and generation of shader mixins.
public class ShaderMixinManager
Name | Description | |
---|---|---|
Methods | ||
Contains(String) | Determines whether the specified PDXFX effect is registered. |
|
Generate(String, ParameterCollection) | Generates a ShaderMixinSource for the specified names and parameters. |
|
Register(String, IShaderMixinBuilder) | Registers a IShaderMixinBuilder with the specified sdfx effect name. |
|
TryGet(String, out IShaderMixinBuilder) | Tries to get a IShaderMixinBuilder by its name. |
|
UnRegisterAll() | Un-register all registered IShaderMixinBuilder. |
Methods
Contains(String)
Determines whether the specified PDXFX effect is registered.
public static bool Contains(string sdfxEffectName)
Parameters
Type | Name | Description |
---|---|---|
System.String | sdfxEffectName | Name of the PDXFX effect. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | sdfxEffectName |
Generate(String, ParameterCollection)
Generates a ShaderMixinSource for the specified names and parameters.
public static ShaderMixinSource Generate(string sdfxEffectName, ParameterCollection properties)
Parameters
Type | Name | Description |
---|---|---|
System.String | sdfxEffectName | The name. |
ParameterCollection | properties | The properties. |
Returns
Type | Description |
---|---|
ShaderMixinSource | The result of the mixin. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | sdfxEffectName or properties |
System.ArgumentException | sdfxEffectName |
Register(String, IShaderMixinBuilder)
Registers a IShaderMixinBuilder with the specified sdfx effect name.
public static void Register(string sdfxEffectName, IShaderMixinBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
System.String | sdfxEffectName | Name of the mixin. |
IShaderMixinBuilder | builder | The builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | sdfxEffectName or builder |
TryGet(String, out IShaderMixinBuilder)
Tries to get a IShaderMixinBuilder by its name.
public static bool TryGet(string sdfxEffectName, out IShaderMixinBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
System.String | sdfxEffectName | Name of the mixin. |
IShaderMixinBuilder | builder | The builder instance found or null if not found. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | sdfxEffectName |
UnRegisterAll()
Un-register all registered IShaderMixinBuilder.
public static void UnRegisterAll()