Interface ISpirvToGlslTranspiler
- Namespace
- ShadowDusk.GLSL
- Assembly
- ShadowDusk.GLSL.dll
Transpiles SPIR-V bytes to GLSL source. This is the injection seam that alternative (e.g. WASM/browser) backends plug into in place of the native SPIRV-Cross implementation, without changing the compilation pipeline.
public interface ISpirvToGlslTranspiler
Methods
Transpile(ReadOnlyMemory<byte>, CancellationToken)
Transpiles a SPIR-V module to GLSL source.
Result<GlslSource, ShaderError> Transpile(ReadOnlyMemory<byte> spirvBytes, CancellationToken cancellationToken = default)
Parameters
spirvBytesReadOnlyMemory<byte>A complete SPIR-V module (little-endian word stream).
cancellationTokenCancellationTokenA cancellation token.
Returns
- Result<GlslSource, ShaderError>
The transpiled GlslSource on success, or a ShaderError on failure.