MME Example Mining
Overview
Mine local examples for patterns that can be reused safely. MME behavior is full of host-specific conventions; an existing working effect is often the best spec.
Mining Steps
- Identify the closest effect family:
- full model shader, postprocess, mirror/offscreen, shadow, DOF/bloom, face shadow, PBR material, framework integration.
- Use
rg --files and rg -n to find candidate .fx, .fxsub, readme, config, controller, and texture files.
- Read both shader and usage notes. Many effects depend on MME tab assignment and accessory parameters.
- Extract reusable structure:
- render targets, script order, passes, technique variants, controller names, formats, fallback behavior.
- Identify non-reusable assumptions:
- hard-coded object names, framework buffer layouts, paths, language-specific control names, hardware assumptions.
Output Template
Example mining:
- Candidate examples:
- Closest match:
- Pattern to reuse:
- Dependencies:
- Differences from our target:
- Risks:
Reference Index
Start from:
../mmd-mme-workflow/references/example-index.md
../mmd-mme-workflow/references/framework-notes.md
Useful Search Patterns
rg -n "STANDARDSGLOBAL|ScriptClass|ScriptOrder|string Script|Draw=Buffer|Draw=Geometry|MMDPass" <dir>
rg -n "OFFSCREENRENDERTARGET|DefaultEffect|RENDERCOLORTARGET|RENDERDEPTHSTENCILTARGET" <dir>
rg -n "CONTROLOBJECT|UseTexture|UseSphereMap|UseToon|Subset" <dir>
rg -n "ps_3_0|vs_3_0|R32F|A16B16G16R16F|A32B32G32R32F" <dir>
Framework Mining Notes
- ray-mmd: start with
ray.conf, Shader/textures.fxsub, Shader/gbuffer.fxsub, then the relevant material/light/fog/post folder.
- ExcellentShadow2: read
Readme.txt, ExcellentShadow.fx, ExcellentShadowCommonSystem.fx, full_ES.fx, and the relevant fxsub.
- sdPBR480: read
うまく動かない時は.txt, migration guide, sdPBR.fx, sdPBRGBuffer.fx, config, material head/tail, and matching material/light examples.
Common Mistakes
- Copying a pass graph without its
DefaultEffect render target.
- Copying a material shader without all
UseTexture/UseSphereMap/UseToon variants.
- Using framework internal buffers without checking version-specific layout.
- Missing controller
.pmx/.x assets and morph names.
1---2name: mme-example-mining3description: Use when Codex should inspect local MMD/MME effect examples, official samples, ray-mmd, sdPBR, ExcellentShadow, or existing .fx/.fxsub/readme files to find implementation patterns before planning, authoring, reviewing, or debugging.4---56# MME Example Mining78## Overview910Mine local examples for patterns that can be reused safely. MME behavior is full of host-specific conventions; an existing working effect is often the best spec.1112## Mining Steps13141. Identify the closest effect family:15 - full model shader, postprocess, mirror/offscreen, shadow, DOF/bloom, face shadow, PBR material, framework integration.162. Use `rg --files` and `rg -n` to find candidate `.fx`, `.fxsub`, readme, config, controller, and texture files.173. Read both shader and usage notes. Many effects depend on MME tab assignment and accessory parameters.184. Extract reusable structure:19 - render targets, script order, passes, technique variants, controller names, formats, fallback behavior.205. Identify non-reusable assumptions:21 - hard-coded object names, framework buffer layouts, paths, language-specific control names, hardware assumptions.2223## Output Template2425```markdown26Example mining:27- Candidate examples:28- Closest match:29- Pattern to reuse:30- Dependencies:31- Differences from our target:32- Risks:33```3435## Reference Index3637Start from:3839- `../mmd-mme-workflow/references/example-index.md`40- `../mmd-mme-workflow/references/framework-notes.md`4142## Useful Search Patterns4344```powershell45rg -n "STANDARDSGLOBAL|ScriptClass|ScriptOrder|string Script|Draw=Buffer|Draw=Geometry|MMDPass" <dir>46rg -n "OFFSCREENRENDERTARGET|DefaultEffect|RENDERCOLORTARGET|RENDERDEPTHSTENCILTARGET" <dir>47rg -n "CONTROLOBJECT|UseTexture|UseSphereMap|UseToon|Subset" <dir>48rg -n "ps_3_0|vs_3_0|R32F|A16B16G16R16F|A32B32G32R32F" <dir>49```5051## Framework Mining Notes5253- ray-mmd: start with `ray.conf`, `Shader/textures.fxsub`, `Shader/gbuffer.fxsub`, then the relevant material/light/fog/post folder.54- ExcellentShadow2: read `Readme.txt`, `ExcellentShadow.fx`, `ExcellentShadowCommonSystem.fx`, `full_ES.fx`, and the relevant `fxsub`.55- sdPBR480: read `うまく動かない時は.txt`, migration guide, `sdPBR.fx`, `sdPBRGBuffer.fx`, config, material head/tail, and matching material/light examples.5657## Common Mistakes5859- Copying a pass graph without its `DefaultEffect` render target.60- Copying a material shader without all `UseTexture`/`UseSphereMap`/`UseToon` variants.61- Using framework internal buffers without checking version-specific layout.62- Missing controller `.pmx/.x` assets and morph names.