EffectSystem Class
Namespace: Stride.RenderingAssembly: Stride.Rendering.dll
The effect system.
Derived from EffectSystem:
public class EffectSystem : GameSystemBase, IDisposable, ICollectorHolder, IGameSystemBase, IComponent, IReferencable, IUpdateable, IDrawable, IContentable
Name | Description | |
---|---|---|
Constructors | ||
EffectSystem(IServiceRegistry) | Initializes a new instance of the EffectSystem class. |
|
Properties | ||
Compiler | ||
FileProvider | Gets or sets the database file provider, to use for loading effects and shader sources. |
|
Methods | ||
Destroy() | ||
GetShaderFromParameters(String, CompilerParameters) | Get the shader from the database based on the parameters used for its compilation. |
|
Initialize() | ||
IsValid(Effect) | ||
LoadEffect(String, CompilerParameters) | Loads the effect. |
|
SetCompilationMode(CompilationMode) | ||
Update(GameTime) |
Constructors
EffectSystem(IServiceRegistry)
Initializes a new instance of the EffectSystem class.
public EffectSystem(IServiceRegistry services)
Parameters
Type | Name | Description |
---|---|---|
IServiceRegistry | services | The services. |
Properties
Compiler
public IEffectCompiler Compiler { get; set; }
Property Value
Type | Description |
---|---|
IEffectCompiler |
FileProvider
Gets or sets the database file provider, to use for loading effects and shader sources.
public IVirtualFileProvider FileProvider { get; }
Property Value
Type | Description |
---|---|
IVirtualFileProvider | The database file provider. |
Methods
Destroy()
protected override void Destroy()
Overrides
GetShaderFromParameters(String, CompilerParameters)
Get the shader from the database based on the parameters used for its compilation.
protected CompilerResults GetShaderFromParameters(string effectName, CompilerParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | effectName | Name of the effect. |
CompilerParameters | parameters | The parameters. |
Returns
Type | Description |
---|---|
CompilerResults | The EffectBytecode if found. |
Initialize()
public override void Initialize()
Overrides
IsValid(Effect)
public bool IsValid(Effect effect)
Parameters
Type | Name | Description |
---|---|---|
Effect | effect |
Returns
Type | Description |
---|---|
System.Boolean |
LoadEffect(String, CompilerParameters)
Loads the effect.
public TaskOrResult<Effect> LoadEffect(string effectName, CompilerParameters compilerParameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | effectName | Name of the effect. |
CompilerParameters | compilerParameters | The compiler parameters. |
Returns
Type | Description |
---|---|
TaskOrResult<Effect> | A new instance of an effect. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Could not compile shader. Need fallback. |
SetCompilationMode(CompilationMode)
public void SetCompilationMode(CompilationMode compilationMode)
Parameters
Type | Name | Description |
---|---|---|
CompilationMode | compilationMode |
Update(GameTime)
public override void Update(GameTime gameTime)
Parameters
Type | Name | Description |
---|---|---|
GameTime | gameTime |