monogame-effects
Installation
SKILL.md
MonoGame Custom Effects Implementation Guide
This skill covers the MGFX effect system, stock effects, and cross-platform shader compilation. For HLSL syntax, the Material pattern, and SpriteBatch integration, see the monogame-shaders skill. For compiled API signatures, see references/effects.md.
MGFX — MonoGame's Effect System
MonoGame uses its own FX runtime called MGFX, designed to support multiple shader backends from a single .fx source file. Core capabilities:
- Same technique/pass/shader structure as Microsoft FX files.
- Textual
.fxsource compiled to optimized.mgfxobinary at build time. - Cross-platform: targets DirectX HLSL and OpenGL GLSL from one source via MojoShader.
Pipeline:
MyEffect.fx → MGFXC (or MGCB) → MyEffect.mgfxo → Content.Load<Effect>()