Class EffectCompilerBase
Base class for implementations of IEffectCompiler, providing some helper functions.
public abstract class EffectCompilerBase : DisposeBase, IReferencable, IEffectCompiler, IDisposable
- Inheritance
-
objectEffectCompilerBase
- 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
mixinTreeShaderMixinSourceThe mixin tree.
effectParametersEffectCompilerParameterscompilerParametersCompilerParameters
Returns
- TaskOrResult<EffectBytecodeCompilerResult>
The platform-dependent bytecode.
Compile(ShaderSource, CompilerParameters)
Compiles the specified shader source.
public CompilerResults Compile(ShaderSource shaderSource, CompilerParameters compilerParameters)
Parameters
shaderSourceShaderSourceThe shader source.
compilerParametersCompilerParametersThe compiler parameters.
Returns
- CompilerResults
Result of the compilation.
GetShaderSourceHash(string)
public abstract ObjectId GetShaderSourceHash(string type)
Parameters
typestring
Returns
GetStoragePathFromShaderType(string)
public static string GetStoragePathFromShaderType(string type)
Parameters
typestring
Returns
ResetCache(HashSet<string>)
Remove cached files for modified shaders
public virtual void ResetCache(HashSet<string> modifiedShaders)