Table of Contents

Class EffectCompilerBase

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

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

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

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 ShaderMixinSource

The mixin tree.

effectParameters EffectCompilerParameters
compilerParameters 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 ShaderSource

The shader source.

compilerParameters CompilerParameters

The compiler parameters.

Returns

CompilerResults

Result of the compilation.

GetShaderSourceHash(string)

public abstract ObjectId GetShaderSourceHash(string type)

Parameters

type string

Returns

ObjectId

GetStoragePathFromShaderType(string)

public static string GetStoragePathFromShaderType(string type)

Parameters

type string

Returns

string

ResetCache(HashSet<string>)

Remove cached files for modified shaders

public virtual void ResetCache(HashSet<string> modifiedShaders)

Parameters

modifiedShaders HashSet<string>