Class EffectCompilerBase
Base class for implementations of IEffectCompiler, providing some helper functions.
public abstract class EffectCompilerBase : DisposeBase, IReferencable, IEffectCompiler, IDisposable
- Inheritance
-
EffectCompilerBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
EffectCompilerBase()
protected EffectCompilerBase()
Fields
DefaultSourceShaderFolder
public static readonly string DefaultSourceShaderFolder
Field Value
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
- IVirtualFileProvider
The database file provider.
Methods
Compile(ShaderMixinSource, EffectCompilerParameters, CompilerParameters)
Compiles the ShaderMixinSource into a platform bytecode.
public abstract TaskOrResult<EffectBytecodeCompilerResult> Compile(ShaderMixinSource mixinTree, EffectCompilerParameters effectParameters, CompilerParameters compilerParameters)
Parameters
mixinTree
ShaderMixinSourceThe mixin tree.
effectParameters
EffectCompilerParameterscompilerParameters
CompilerParameters
Returns
- TaskOrResult<EffectBytecodeCompilerResult>
The platform-dependent bytecode.
Compile(ShaderSource, CompilerParameters)
Compiles the specified shader source.
public CompilerResults Compile(ShaderSource shaderSource, CompilerParameters compilerParameters)
Parameters
shaderSource
ShaderSourceThe shader source.
compilerParameters
CompilerParametersThe compiler parameters.
Returns
- CompilerResults
Result of the compilation.
GetShaderSourceHash(string)
public abstract ObjectId GetShaderSourceHash(string type)
Parameters
type
string
Returns
GetStoragePathFromShaderType(string)
public static string GetStoragePathFromShaderType(string type)
Parameters
type
string
Returns
ResetCache(HashSet<string>)
Remove cached files for modified shaders
public virtual void ResetCache(HashSet<string> modifiedShaders)