Namespace ShadowDusk.Compiler.Raylib
Classes
- RaylibConverter
Converts an HLSL
.fxpixel shader to a raylib fragment shader for Raylib-cs (Phase 59, the fragment-only slice). The route is the same seam the SkSL converter uses:HLSL → [DXC] → SPIR-V → [SPIRV-Cross] → modern GLSL → [raylib convention mapper], branching before the MonoGame GLSL rewriter and the MGFX writer, so no substitute compiler is involved and no existing target's output changes.Evidence model: rendered-image fidelity (owner decision 2026-10-01, the SkSL target's model): raylib has no reference compiler, so this is never an
mgfxc-equivalence claim. The proof isvalidation/RaylibRoute, which renders each converted shader in real Raylib-cs and pixel-diffs it against the same.fxbuilt for OpenGL and rendered in real MonoGame DesktopGL.Input languages: anything that becomes
.fxtext. A.slangfile goes through ConvertSlang(string, RaylibConvertOptions, CancellationToken) (built-in frontend) orShadowDusk.Slang'sSlangCompiler.ConvertToRaylib(real slangc); the HLSL either yields is compiled by the same DXC as every.fx, so the converter itself needs nothing Slang-specific.Everything raylib's fixed-function model cannot hold is rejected loudly (
SD0630–SD0636), never emitted as a shader that loads and renders wrong.
- RaylibSampler
One
sampler2Dof a RaylibShader.
- RaylibShader
The successful product: a raylib fragment shader plus the binding contract the consumer's draw code needs. Deliberately NOT a CompiledShader: that type's
Datais an effect container every existing consumer hands tonew Effect(...), and a GLSL string in that slot would load as garbage instead of failing.
- RaylibUniform
One non-sampler uniform of a RaylibShader.