Interface IIncludeResolver
- Namespace
- ShadowDusk.Core.Preprocessor
- Assembly
- ShadowDusk.Core.dll
Resolves an HLSL #include directive to its source text. Supply a custom
implementation via IncludeResolver to control where includes
come from — e.g. InMemoryIncludeResolver to compile without touching disk
(WASM/in-browser) or FileSystemIncludeResolver for normal file access.
public interface IIncludeResolver
Methods
Resolve(string, string?, IReadOnlyList<string>)
Resolves a single #include reference to its file path and contents.
Result<IncludeResolvedFile, ShaderError> Resolve(string includePath, string? includingFilePath, IReadOnlyList<string> additionalSearchPaths)
Parameters
includePathstringThe path as written in the
#includedirective.includingFilePathstringThe file that issued the
#include, or null.additionalSearchPathsIReadOnlyList<string>Extra directories to search, in order.
Returns
- Result<IncludeResolvedFile, ShaderError>
The resolved file (path + text) on success, or a ShaderError (e.g. IncludeNotFound) on failure.