Namespace ShadowDusk.Core.Preprocessor
Classes
- FileSystemIncludeResolver
An IIncludeResolver that resolves
#includedirectives from the file system, searching first relative to the including file's directory and then the supplied additional search paths.
- InMemoryIncludeResolver
An IIncludeResolver that resolves
#includedirectives from an in-memory dictionary of file path → contents, with no disk access. Ideal for the WASM/in-browser host and for tests, where the entire shader source set is held in memory.
- IncludeResolvedFile
The successful result of resolving an
#include: the file's path and text.
- MacroDefinition
A single preprocessor macro definition (a
#define) injected into compilation.
- MacroSet
A set of preprocessor macros applied to a compile, with helpers to render them either as prepended
#definetext or as DXC command-line-Dflags.
- PlatformMacros
Provides the standard preprocessor macros (e.g.
MGFX,GLSL/HLSL, per-target flags) that shaders branch on for each PlatformTarget, mirroring the macrosmgfxcdefines.
- PreprocessedSource
The output of the include-flattening preprocessor pass: the fully expanded source text, the DXC macro flags to pass downstream, and the original file path for diagnostics.
- Preprocessor
Flattens an HLSL source tree by expanding all
#includedirectives (honoring#pragma onceand detecting circular includes) and prepending the platform macros, producing a single self-contained PreprocessedSource for the compiler.
Interfaces
- IIncludeResolver
Resolves an HLSL
#includedirective 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.