EffectCompilerBase Class
Namespace: Stride.Shaders.CompilerAssembly: Stride.Shaders.dll
Base class for implementations of IEffectCompiler, providing some helper functions.
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 |
Constructors
EffectCompilerBase()
protected EffectCompilerBase()
Fields
DefaultSourceShaderFolder
public static readonly string DefaultSourceShaderFolder
Field Value
Type | Description |
---|---|
System.String |
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. |
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 |