Overview: What Are MMDX Effects?
The MMDX Effects ecosystem in MMDX12 - surface shaders, screen effects, world effects and looks, where they apply, and where packs live and their states.
Introducing MMDX Effects
MMDX Effects is MMDX12’s custom effect ecosystem. Without altering the app’s renderer, anyone can create and share their own surface shading, screen effects, world staging and lighting looks. MMDX Effects is MMDX12’s native custom effect format. Existing MMD projects keep their MME (MMD Effect) setup as authored. Unlike MME, an MMDX effect is designed so the same pack works across raster, ray tracing, path tracing and offline GI.
MMDX Effects come in four kinds.
| Kind | type | What it changes | Entry file |
|---|---|---|---|
| Surface shader | surface (default) | Per-pixel shading of character materials. Applied per character and per material, and also draws outlines via PackEdge. | surface.hlsl (+ optional pt_surface.hlsl) |
| Screen effect | effect | The entire finished screen. Runs as one entry in the effect stack. | effect.hlsl |
| World effect | world | A simulated staging element placed in scene space. Reacts to character movement. Example: the built-in “Snow”. | world.hlsl |
| Look | look | A preset that stores lighting, screen effects and pack selections as one bundle. | the look block in pack.json |
The word “pack” means the distribution unit (a zip / a gallery entry). Surface shaders, screen effects, world effects and looks are all distributed as packs.
Anatomy of a pack
A surface shader pack is a folder like this:
pack.json: the manifest defining the pack’s metadata, kind (type), required capabilities (requires), material classification rules and parameters.surface.hlsl: HLSL code implementingPackShade.pt_surface.hlsl(optional):PackEvaluatefor path tracing / offline GI. Without it, those paths use the default shading.preview.pngorpreview.jpg(optional): preview shown in the Effects screen and the gallery (16:9 recommended).preview_before.png/.jpg(optional): the same frame with the pack off. With both images, you can drag to compare before and after.README.md,LICENSE(optional).
Screen effects use effect.hlsl, world effects use world.hlsl, and looks use the look block. For the detailed
file rules, see Manifest and the docs for each kind.
Where they apply
Surface shaders
- Raster: play mode, the Studio viewport and the raster video renderer.
PackShadeinsurface.hlslpaints material pixels. - Real-time RT: the same
PackShaderuns in ray-traced camera views. - Path tracing / offline GI: if
pt_surface.hlslexists, it describes the material at hit points viaPackEvaluate. Packs without that file use the default shading on those paths. - Outlines: with
PACK_HAS_EDGE+PackEdge, the pack’s outlines are drawn not only in raster and RT but also in offline GI. WithoutPackEdge, the engine’s default outlines are used. - Surface output: declaring the
surface.outputcapability letsPackResultpassnormal/emission/tag, i.e. normals, emission and an ID tag. A pack is no longer limited to changing “pixel color only”.
Screen effects
- Apply to the playback screen, lobby preview, real-time raster / RT / PT video and stills, and offline GI (stills and video).
pre-bloomeffects apply to the lit linear HDR image;posteffects apply to the screen after tone mapping.- They do not apply to unlit or wireframe views, or to the Studio quad view.
- With no effects enabled there are no extra targets or passes, so the frame is exactly the same.
World effects
- Entities placed in scene space: simulated staging that reacts to scene state such as character position and footprints.
- Drawn directly in raster and RT; composited as a depth-tested layer in PT and offline GI. World effect surfaces receive sun shadows only in the raster renderer; they receive no shadows in RT, PT, or offline GI.
- The built-in “Snow” is an example.
Looks
- Bundle lighting, exposure, the screen effect stack, colour LUT, bloom look and optionally one character’s surface pack selection into a single file.
- Packs referenced by a look are recorded as id + minimum version + source index; missing or outdated packs prompt for installation.
Where default shading remains
- Stage and props: surface shaders apply to character materials. Stages and props keep the default shading.
- PT / GI for packs without
pt_surface.hlsl: the default shading is used. - Special views: Studio unlit / wireframe / orthographic quad view.
What the engine still handles
- Vertex skinning and bone deformation, MMD outlines (when a pack does not use
PackEdge), shadow maps / RT shadows, post-processing (bloom, DoF, TAA, upscalers) and light transport (indirect light and denoising in PT / GI). - If a pack fails (e.g. a compile error), only that model / effect returns to the default behaviour and the app keeps running.
Assets and texture folders
Packs can and should include assets the author created themselves. Put them in the pack’s textures/ folder and
declare them under "textures" in pack.json; they ship with the pack.
Assets that cannot be redistributed, such as textures extracted from a game, must not go into the pack; read them
from a user texture folder instead. Set "origin": "user" on the texture entry in pack.json and the Effects screen
will prompt you to “set the texture folder”. Files with the same name in the user folder can also override textures
bundled with the pack. See Manifest for the detailed rules.
Storage locations and identifiers
Relative to the folder containing the MMDX12 executable, packs live in two places:
- Built-in packs:
<MMDX12 folder>/shaders/packs/<id>/- Shipped with the program and cannot be deleted in the app (e.g.
hoyo_toon).
- Shipped with the program and cannot be deleted in the app (e.g.
- Installed packs:
<MMDX12 folder>/shader_packs/<id>/- Packs downloaded from the gallery or created by you. Online-installed packs also contain
.mmdx_install.jsonmetadata.
- Packs downloaded from the gallery or created by you. Online-installed packs also contain
Pack identifier (ID) rules
- Only lowercase letters
a-z, digits0-9, underscores_and hyphens-are allowed, up to 64 characters. - Built-in pack IDs cannot be overridden by user packs.
- If a duplicate ID is found, the later pack is marked “duplicate” and cannot be selected.
States
The Effects screen and selector show these states:
- Available / compiled: the manifest is valid and the pack is ready to use.
- Compile error: HLSL compilation failed. The pack falls back to the default shading and an
[E]line is written to the log. - Incompatible:
apiVersionis higher than the app’s, an unknownrequirescapability is present, orminAppVersionis newer than the current build. The status line names the capability at fault. - Manifest error:
pack.jsonis malformed or a required field is missing. - Duplicate: another pack with the same ID already exists.
- Blocked in the gallery (revoked): the zip is on the official index’s revocation list.
- Disabled after a crash: the pack was active when the app crashed in a previous run, so the crash guard quarantined it. You can re-enable it in the Effects screen.
Studio: keys and saving
In Studio you can add per-parameter timeline keys to the screen effect stack; world effect entity parameters are
keyed the same way. Keys undo like ordinary track edits and evaluate to the same values in playback, video rendering
and GI rendering. The effect stack, world entities and surface pack selection are saved in the project file
(.mmdxproj).
Next steps
- Quickstart: applying packs in the app and authoring with live hot reload.
- Manifest specification: every
pack.jsonfield and the material classification rules. - Shader API: rules for writing
surface.hlsland the v6 inputs / outputs. - Screen effects: effect API v3-v6, stacks, passes, history and focus.
- Looks: look pack contents, applying / exporting, and
--look. - PT / GI packs:
pt_surface.hlslandPT_PACK_HAS_LIGHTING. - Porting from MME: a summary of moving MME effects to MMDX Effects.
- hoyo_toon analysis: the structure of the official example pack and its SDF face shadow technique.
- Debugging and validation: diagnosing compile errors and the
pack_check.exetool. - Publishing and gallery submission: zip packaging rules and how to submit to the official gallery.