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.

KindtypeWhat it changesEntry file
Surface shadersurface (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 effecteffectThe entire finished screen. Runs as one entry in the effect stack.effect.hlsl
World effectworldA simulated staging element placed in scene space. Reacts to character movement. Example: the built-in “Snow”.world.hlsl
LooklookA 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 implementing PackShade.
  • pt_surface.hlsl (optional): PackEvaluate for path tracing / offline GI. Without it, those paths use the default shading.
  • preview.png or preview.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. PackShade in surface.hlsl paints material pixels.
  • Real-time RT: the same PackShade runs in ray-traced camera views.
  • Path tracing / offline GI: if pt_surface.hlsl exists, it describes the material at hit points via PackEvaluate. 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. Without PackEdge, the engine’s default outlines are used.
  • Surface output: declaring the surface.output capability lets PackResult pass normal / 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-bloom effects apply to the lit linear HDR image; post effects 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:

  1. Built-in packs: <MMDX12 folder>/shaders/packs/<id>/
    • Shipped with the program and cannot be deleted in the app (e.g. hoyo_toon).
  2. Installed packs: <MMDX12 folder>/shader_packs/<id>/
    • Packs downloaded from the gallery or created by you. Online-installed packs also contain .mmdx_install.json metadata.

Pack identifier (ID) rules

  • Only lowercase letters a-z, digits 0-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: apiVersion is higher than the app’s, an unknown requires capability is present, or minAppVersion is newer than the current build. The status line names the capability at fault.
  • Manifest error: pack.json is 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