Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    EffectSystem Class

    Namespace: Stride.Rendering
    Assembly: Stride.Rendering.dll

    The effect system.

    System.Object → DisposeBase → ComponentBase → GameSystemBase → EffectSystem
    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)
    | Improve this Doc View Source

    Constructors


    EffectSystem(IServiceRegistry)

    Initializes a new instance of the EffectSystem class.

    public EffectSystem(IServiceRegistry services)
    Parameters
    Type Name Description
    IServiceRegistry services

    The services.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    Methods


    Destroy()

    protected override void Destroy()
    Overrides
    ComponentBase.Destroy()

    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
    GameSystemBase.Initialize()

    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
    Overrides
    GameSystemBase.Update(GameTime)

    Inherited Members

    GameSystemBase.Game
    GameSystemBase.Services
    GameSystemBase.Content
    GameSystemBase.GraphicsDevice
    GameSystemBase.DrawOrderChanged
    GameSystemBase.VisibleChanged
    GameSystemBase.BeginDraw()
    GameSystemBase.Draw(GameTime)
    GameSystemBase.EndDraw()
    GameSystemBase.Visible
    GameSystemBase.DrawOrder
    GameSystemBase.InitGraphicsDeviceService()
    GameSystemBase.EnabledChanged
    GameSystemBase.UpdateOrderChanged
    GameSystemBase.Enabled
    GameSystemBase.UpdateOrder
    GameSystemBase.OnDrawOrderChanged(Object, EventArgs)
    GameSystemBase.OnUpdateOrderChanged(Object, EventArgs)
    GameSystemBase.IContentable.LoadContent()
    GameSystemBase.IContentable.UnloadContent()
    GameSystemBase.LoadContent()
    GameSystemBase.UnloadContent()
    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    ComponentBase.ToString()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    EffectSystemExtensions.LoadEffect(EffectSystem, String)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation