Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    EffectCompilerBase Class

    Namespace: Stride.Shaders.Compiler
    Assembly: Stride.Shaders.dll

    Base class for implementations of IEffectCompiler, providing some helper functions.

    System.Object → DisposeBase → EffectCompilerBase
    Derived from EffectCompilerBase: EffectCompilerChain NullEffectCompiler

    public abstract class EffectCompilerBase : DisposeBase, IReferencable, IEffectCompiler, IDisposable
    Name Description
    Constructors
    EffectCompilerBase()
    Fields
    DefaultSourceShaderFolder
    Properties
    FileProvider

    Gets or sets the database file provider, to use for loading effects and shader sources.

    Methods
    Compile(ShaderMixinSource, EffectCompilerParameters, CompilerParameters)

    Compiles the ShaderMixinSource into a platform bytecode.

    Compile(ShaderSource, CompilerParameters)
    GetShaderSourceHash(String)
    GetStoragePathFromShaderType(String)
    ResetCache(HashSet<String>)

    Remove cached files for modified shaders

    | Improve this Doc View Source

    Constructors


    EffectCompilerBase()

    protected EffectCompilerBase()
    | Improve this Doc View Source

    Fields


    DefaultSourceShaderFolder

    public static readonly string DefaultSourceShaderFolder
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    Properties


    FileProvider

    Gets or sets the database file provider, to use for loading effects and shader sources.

    public abstract IVirtualFileProvider FileProvider { get; set; }
    Property Value
    Type Description
    IVirtualFileProvider

    The database file provider.

    | Improve this Doc View Source

    Methods


    Compile(ShaderMixinSource, EffectCompilerParameters, CompilerParameters)

    Compiles the ShaderMixinSource into a platform bytecode.

    public abstract TaskOrResult<EffectBytecodeCompilerResult> Compile(ShaderMixinSource mixinTree, EffectCompilerParameters effectParameters, CompilerParameters compilerParameters)
    Parameters
    Type Name Description
    ShaderMixinSource mixinTree

    The mixin tree.

    EffectCompilerParameters effectParameters
    CompilerParameters compilerParameters
    Returns
    Type Description
    TaskOrResult<EffectBytecodeCompilerResult>

    The platform-dependent bytecode.


    Compile(ShaderSource, CompilerParameters)

    public CompilerResults Compile(ShaderSource shaderSource, CompilerParameters compilerParameters)
    Parameters
    Type Name Description
    ShaderSource shaderSource
    CompilerParameters compilerParameters
    Returns
    Type Description
    CompilerResults

    GetShaderSourceHash(String)

    public abstract ObjectId GetShaderSourceHash(string type)
    Parameters
    Type Name Description
    System.String type
    Returns
    Type Description
    ObjectId

    GetStoragePathFromShaderType(String)

    public static string GetStoragePathFromShaderType(string type)
    Parameters
    Type Name Description
    System.String type
    Returns
    Type Description
    System.String

    ResetCache(HashSet<String>)

    Remove cached files for modified shaders

    public virtual void ResetCache(HashSet<string> modifiedShaders)
    Parameters
    Type Name Description
    System.Collections.Generic.HashSet<System.String> modifiedShaders

    Inherited Members

    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.Destroy()
    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)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

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