Manifest (pack.json)
Every pack.json field - kind (type), required capabilities (requires), inputs, parameters (params / params.ext), groups, textures, material classification, state and passes, look / world blocks.
Manifest overview
pack.json is the JSON file that declares an MMDX Effects pack’s identity, kind, required capabilities, parameters
and material classification rules. When scanning packs, MMDX12 reads this file first and validates it.
{
"format": 1,
"id": "my_pack",
"version": "1.0.0",
"apiVersion": 6,
"minAppVersion": "1.7.0",
"type": "surface",
"name": { "ko": "내 팩", "en": "My Pack", "ja": "マイパック", "zh": "我的着色器" },
"description": { "ko": "원신 풍 툰 셰이딩입니다.", "en": "Cel shading for anime models." },
"recommendedFor": { "ko": "Genshin, Star Rail 공식 모델", "en": "Official HoYoverse MMD models" },
"authors": [ { "name": "YourName", "role": "Shader", "url": "https://github.com/..." } ],
"license": "MIT",
"homepage": "https://...",
"repository": "https://github.com/...",
"tags": ["toon", "anime"],
"requires": ["surface.output"],
"classes": [
{ "class": "eye", "match": ["目", "眼", "瞳", "eye", "Eye"] },
{ "class": "face", "match": ["顔", "颜", "face", "Face", "表情"] },
{ "class": "hair", "match": ["髪", "髮", "hair", "Hair"] },
{ "class": "skin", "match": ["肌", "皮肤", "skin", "Skin"] }
],
"params": [
{ "key": "softness", "label": { "ko": "경계 부드러움", "en": "Softness" }, "default": 0.1, "min": 0.0, "max": 1.0 }
]
}
Field specification
Required fields
version(string): the pack’s semantic version (e.g."1.0.0"). Used for update detection and gallery distribution.name(string or localised object): the pack’s display name.
Identity and compatibility
format(integer): manifest format version. The current version is1.id(string): may contain only lowercase lettersa-z, digits0-9, underscores_and hyphens-, up to 64 characters. If omitted, the folder name becomes the ID. If an installed pack’s folder name andiddisagree, that is an error. In the official gallery the format is[a-z0-9_]{3,40}.apiVersion(integer, default1): target API version. The app’s current maximum is 6; a higher value is classified asIncompatibleand is not compiled. Most new features are declared asrequirescapabilities rather than raising the version.minAppVersion(string, optional): minimum required MMDX12 version (e.g."1.7.0").
Kind (type)
"type":"surface"(default) /"effect"/"look"/"world".surface: character material shading. Requiressurface.hlsl(+ optionalpt_surface.hlsl).effect: screen effect. Requireseffect.hlsland uses"stage".world: world effect. Requiresworld.hlsland the"world"block.look: look preset. Requires the"look"block and uses no shader file.
"stage"(effectonly):"post"(default) or"pre-bloom".
Metadata and localisation
- Localised fields:
name,description,recommendedForand thelabelof parameters / groups are either a plain string or an object withko,en,jaandzhkeys.- Display language order:
current app language->en->plain string->ko->any language that exists.
- Display language order:
authors(array): each entry hasname(required),role(optional) andurl(optional,http:///https://only). The older plain-string"author": "Name"is still supported for compatibility.license(string): an SPDX licence (e.g."MIT","CC-BY-4.0").homepage,repository(strings): onlyhttp:///https://URLs are allowed.tags(string array): lowercase tags for search (up to 12).
Recommended model traits (suggest)
Declares the model data traits a pack suits, e.g. { "additionalUvsMin": 2, "toonMapMaterialsMin": 1 }.
Both keys are optional non-negative integers, and all given conditions must hold (toonMapMaterials is the
number of materials with a non-ramp image UV-mapped into their own toon slot). Unknown keys and the absence of
suggest are ignored. The app marks the pack as “recommended” in the selector and, if a matching model has no shader
selection yet, shows a one-time hint, but never applies the pack by itself.
Required capabilities (requires)
requires is the list of engine capabilities a pack needs. If the app does not know even one of them, the pack
becomes Incompatible and the status line names the capability. Capabilities are declared independently of
apiVersion, and some are satisfied automatically from a certain version on.
| Capability | Minimum apiVersion | What it enables |
|---|---|---|
textures | 2 | "textures" in pack.json and the PackSampleTex / PackFxSampleTex family |
effect | 3 | "type": "effect" and PackEffect |
state | 4 | "state": { "floats": N }, PackEffectState, PackState |
passes | 5 | "passes" intermediate passes and PackPassSample / PackPassLoad / PackPassSize |
replaces.dof | 5 | "replaces": ["dof"] - the pack draws instead of the built-in depth of field |
adduv | 6 | PackSurface.uv1 / uv2, PACK_API_ADDUV, PT_PACK_API_ADDUV in PT |
pt.lighting | 6 | PT_PACK_HAS_LIGHTING / PtPackLighting (PT / GI lighting control) |
surface.output | 0 (declare explicitly) | normal / emission / tag in PackResult / PtPackOut |
inputs.scene | 0 (declare explicitly) | Scene roles in "inputs" and PackInputValid / PackInputPos / PackInputFrame |
inputs.audio | 0 (declare explicitly) | "inputs": ["audio"] and the PackAudio* functions |
inputs.id | 0 (declare explicitly) | The ID image (gEffectId) and PackSampleId / PackId* |
passes.history | 0 (declare explicitly) | "history": true on passes and PackPassSampleHistory / PackPassLoadHistory |
passes.mips | 0 (declare explicitly) | "mips": true on passes and PackPassSampleLevel |
params.ext | 0 (declare explicitly) | 128 extended parameters with types / groups / PackParamInt etc. |
Example:
"requires": ["surface.output", "inputs.scene", "inputs.audio", "params.ext"]
If apiVersion is at least the minimum in the table above, that capability counts as satisfied (e.g. with
"apiVersion": 6, state, passes, adduv, textures and effect need not be declared separately).
Inputs (inputs)
inputs requests scene data that the engine fills in. It is separate from params (user sliders).
{
"requires": ["inputs.scene", "inputs.audio"],
"inputs": ["performer.head", "performer.center", "light.key", "camera.focus", "audio"]
}
inputs string | Role constant | Meaning |
|---|---|---|
performer.head | PACK_IN_PERFORMER_HEAD | The centre performer’s head bone (頭) |
performer.center | PACK_IN_PERFORMER_CENTER | The centre performer’s centre bone (センター) |
performer.hand_l | PACK_IN_PERFORMER_HAND_L | Left wrist (左手首) |
performer.hand_r | PACK_IN_PERFORMER_HAND_R | Right wrist (右手首) |
performer.foot_l | PACK_IN_PERFORMER_FOOT_L | Left ankle (左足首) |
performer.foot_r | PACK_IN_PERFORMER_FOOT_R | Right ankle (右足首) |
light.key | PACK_IN_LIGHT_KEY | Key light (direction is the z axis) |
camera.focus | PACK_IN_CAMERA_FOCUS | The DoF focus point in world space, on the camera axis |
audio | PACK_IN_AUDIO | Music analysis input |
performer.*/light.key/camera.focusrequire"inputs.scene"inrequires.audiorequires"inputs.audio"; without analysis everyPackAudio*value is 0.- Roles are resolved through the humanoid map, so packs never contain bone name strings.
Material classification rules (classes)
MMD models (PMX) name their materials in wildly different ways. MMDX Effects automatically maps materials to one of
six standard classes using classes rules:
body(the default: any material matching no rule)skinfaceeye(pupils)hairweapon(weapons and props)
Matching
- The rule array is evaluated from top to bottom, and the first matching rule wins.
- Each string in
matchis checked as a substring of the PMX material’s Japanese or English name.
"classes": [
{ "class": "eye", "match": ["目", "眼", "瞳", "eye", "Eye"] },
{ "class": "face", "match": ["顔", "颜", "face", "Face", "表情"] },
{ "class": "hair", "match": ["髪", "hair"] },
{ "class": "skin", "match": ["肌", "skin"] }
]
In HLSL, s.materialClass is passed as one of the constants PACK_BODY, PACK_SKIN, PACK_FACE, PACK_EYE,
PACK_HAIR, PACK_WEAPON.
Classifying by texture
A classes rule can also match the material’s diffuse texture path with "texture". Game maps follow texture sheets
rather than material names, so this is more accurate.
{ "class": "hair", "texture": ["发", "髮", "髪", "hair"] }
A rule matches if a match string is in the material name or a texture string is in the texture path, and the
first matching rule still wins.
alphaKey
A classes rule can specify "alphaKey": <0..1>. Pixels whose texture red is below the value are cut out (additive
key sprites such as MME eye highlights). It applies to every render path. The key belongs to the class the rule
specifies; if several rules for the same class have different keys, the first rule wins.
classes is not supported in look and world packs.
Parameters (params) - 16 by default
Without params.ext in requires, these are floating-point parameters the user adjusts with UI sliders:
- Maximum count: 16 (
PackParam(0)throughPackParam(15)). - Order: the order listed in the manifest becomes the HLSL index.
- Properties:
key(string): unique key used to save settings. Keep it stable across versions so user settings survive.label(string or localised object): UI display name. Falls back tokey.default(real): default value.min,max(real): slider range.step(real): slider step (default 0 = continuous).
- Saving: only items the user changed from their default are saved by
key. Parameters left untouched automatically follow a new default when the pack author changes it.
Extended parameters (params.ext)
Declaring "requires": ["params.ext"] lets you organise up to 128 parameters with types and collapsible groups.
Each parameter is passed as one float4 slot.
Types
float(default): a single slider.int: integer slider, moving instepincrements (defaultstep1).bool: toggle. The default istrue/falseor a number (greater than 0.5 = true).color: sRGB colour picker. The JSON value is sRGB and is converted to linear in the shader."alpha": trueincludes an alpha component.vec3: three-component vector with a slider per component.
default formats
- Numeric: a single number.
bool:true/false.color: a"#rrggbb"string or an[r, g, b]/[r, g, b, a]array (0..1).vec3: an[x, y, z]array (each component is clamped tomin..max).
Groups
"requires": ["params.ext"],
"groups": [
{ "id": "general", "label": { "ko": "일반", "en": "General" }, "collapsed": false },
{ "id": "color_adj", "label": { "ko": "색상 조정", "en": "Color Adjustments" }, "collapsed": true }
],
"params": [
{ "key": "strength", "type": "float", "group": "general", "label": { "ko": "강도", "en": "Strength" }, "default": 0.5, "min": 0.0, "max": 1.0, "step": 0.01 },
{ "key": "iterations", "type": "int", "group": "general", "label": { "ko": "반복", "en": "Iterations" }, "default": 4, "min": 1, "max": 16, "step": 1 },
{ "key": "invert", "type": "bool", "group": "general", "label": { "ko": "반전", "en": "Invert" }, "default": false },
{ "key": "tint", "type": "color", "group": "color_adj", "label": { "ko": "색조", "en": "Tint" }, "default": "#ffcc99" },
{ "key": "overlay", "type": "color", "group": "color_adj", "alpha": true, "label": { "ko": "오버레이", "en": "Overlay" }, "default": [1.0, 1.0, 1.0, 0.5] },
{ "key": "offset", "type": "vec3", "group": "color_adj", "label": { "ko": "오프셋", "en": "Offset" }, "default": [0.0, 0.0, 0.0], "min": -1.0, "max": 1.0, "step": 0.05 }
]
groupsids must be unique, and each parameter’sgroupmust be a declared group id.collapsedis the initial collapsed state. The collapsed state is remembered per pack and group.- If
pack.jsonlacksparams.extbut uses groups or non-float types, that is a manifest error.
HLSL access
Without params.ext you only use float PackParam(uint i) (0..15). Declaring it adds these accessors:
float PackParam(uint i)- sloti.x.int PackParamInt(uint i)- rounded integer.bool PackParamBool(uint i)-> 0.5.float3 PackParamColor(uint i)- linear RGB.float4 PackParamColor4(uint i)- linear RGBA.float3 PackParamVec3(uint i)- xyz.uint PackParamCount()- the number of declared parameters.
Pack textures (textures)
"textures": [
{ "file": "textures/body_lightmap.png", "address": "clamp", "srgb": false, "origin": "bundled" },
{ "file": "textures/face_sdf.png", "address": "clamp", "srgb": false, "origin": "user" }
]
file: path relative to the pack folder. Onlypng,jpgandjpegare allowed;..and absolute paths are forbidden.address:"wrap"(default) or"clamp". Ramps must useclamp.srgb(defaulttrue): colour textures. They are sampled as_SRGBand return linear values, so do not applySrgbToLinearagain. Data maps such as lightmaps, SDFs and LUTs should befalseto return stored values unchanged.origin:"bundled"(included in the pack, the default) or"user"(provided by the user texture folder). If omitted, it isbundledwhen the file is inside the pack anduserotherwise.- Limits: 16 by default, 4096 × 4096 per texture, 32 MB per pack. World effects allow 32 textures / 64 MB.
- Array order is the HLSL index (
PackSampleTex(0, uv)is the first entry).
Texture lookup order
- User texture folder: the same relative path, the same file name, and finally a file ending in
_+ the declared name (case-insensitive, shortest name first). - Pack folder: the same relative path.
- A white 1 × 1 fallback texture. The pack still renders, and the Effects screen shows how many textures are missing.
If an origin: "user" texture is missing, the app says “set the texture folder”; a missing bundled texture is
treated as a damaged pack. The user folder can also override textures bundled in the pack with the same name.
Per-character folders
A texture folder can be set per pack and per character (the “Texture folder” row in the Library panel, playback
bar and Studio inspector). The per-character folder takes priority over the per-pack folder. Declaring only a common
suffix lets you keep the original file names: declaring Body_Lightmap.png finds
Avatar_Girl_Pole_Hutao_Tex_Body_Lightmap.png.
State (state) - screen effects
{ "apiVersion": 4, "type": "effect", "state": { "floats": 2 } }
"floats"is an integer from 1 to 16.- It can only be used with
"type": "effect"and requires thestatecapability (apiVersion4 or later). - Declaring it means implementing
PackEffectState(PackStateInput i, out float newState[16])next toPackEffectand reading values withPackState(i). See Screen effects for details.
Passes (passes) - screen effects
{
"apiVersion": 5,
"type": "effect",
"stage": "pre-bloom",
"passes": [
{ "entry": "Bright", "scale": 0.25 },
{ "entry": "Blur", "scale": 0.0625 },
{ "entry": "Accumulate", "scale": 1.0, "history": true, "mips": false }
],
"replaces": ["dof"]
}
entry: the name of afloat4 Name(PackPassInput i)function.PackEffect/PackEffectStatecannot be used.scale: ratio of the output size,1/64..1(default 1). Each pass draws to its own RGBA16F target.- Maximum count: 8.
history(true/false): keeps this pass’s previous frame result inspace9. Requires thepasses.historycapability. It is cleared to zero on camera cuts, scene load / reset and resolution changes.mips(true/false): builds a mip chain down to 1×1 after the pass runs. Requires thepasses.mipscapability.- Packs without passes use the same root signature and PSO as v3 / v4, so they cost nothing extra.
passesis supported only ineffectpacks.
Replacement (replaces) - screen effects
"replaces": ["dof"]
- Only
"dof"is known. - Valid only in
effectpacks with"stage": "pre-bloom". - While on, it turns off the built-in depth of field (DofPass and the offline GI thin lens) and the pack draws in
their place. Requires the
replaces.dofcapability (apiVersion5 or later).
Look block (look) - look packs
"type": "look" stores a preset in the "look" object of pack.json. The app parses this block as LookData, and
its main contents are:
lighting,exposure,shadows,ssao,ssr,autoLuminousbloom(enabled / intensity / threshold / convolution / radius / blend / depthMask / kernelPreset / kernel)dof(enabled / aperture),volumetric(enabled / density)color(lut,lutFile,intensity) -lutFileonly allows a png inside the pack.effects: the screen effect stack (pack id, enabled, params, textureFolder)surface(optional): the surface pack selection to apply to one character (pack, params, textureFolder, materials)packs: every pack this look references (id,minVersion,source)sets: the groups this look actually applies (lighting/effects/color/surface)
Looks cannot use classes, params, state, passes or inputs. See Looks for details.
World block (world) - world effect packs
A "type": "world" pack defines world.hlsl and a "world" object holding simulation settings. The "world" block
holds the fixed step and rewind window, particle systems (up to 8), simulation fields (up to 4) and procedural
surfaces (up to 2). The World Effects page documents the fields and functions, the lighting helpers, the
determinism model and the render limits, with the built-in “Snow” pack as the example.