>>2884415Ok. I'm starting with SplitView_v01. Copied SwapScreen.fx and .x. Open it with a text editor that won't add a Unicode byte-order mark to the start and that can open with the correct Japanese encoding, which is CP932 (or its simpler ancestor Shift-JIS). Code highlighting is also helpful, either C or "CG Shader Language".
MME English reference:
pastebin.com/HDwjKyYTMain part is 'technique EffectTech'. We try commenting out everything but
"ScriptExternal=Color;"
"Pass=DrawObjScreen;"
Comment out now-unused 'shared texture SAVE_SCREEN'. Update CopyPS to return opaque or transparent black based on the sampled texture:
float4 sampleColor = tex2D(Sampler, Tex);
float alpha = sampleColor.r < 0.5;
return float4(0,0,0,alpha);
Change string DefaultEffect to some new effects, copying the pattern from AutoLuminousBasic.fx:
"* = DrawWhite.fx;"
Copy そぼろ's 296-byte Stealth shader, change (0.1, 0.1, 0.1, 0.09) to (0.9, 0.9, 0.9, 1) for DrawWhite, then disable ground shadow and edge techniques by making them empty, but leaving Z-plot that only runs in main shader; using MME reference for the correct MMDPass name.
Then change 0.9 back to 0.1 and save as DrawBlack.fx.
Load MMD and try to run it, and fix bugs: ";" in the middle of strings for DefaultEffect instead of at the end. MMD crashes! I really haven't done any post-effects in a while.
Second try, no crash; in DrawBlackObjects.fx, change CLEAR_COLOR from 0,0,0,0 to 1,1,1,1, and SCREEN_NAME from LeftScreen to BlackMaskScreen. In MME, select test object in BlackMaskScreen, drag DrawBlack.fx onto it, fix output color still being 0.9 instead of 0.1. Result: it works, but with aliasing. Change alpha from binary test to 'saturate(1-(sampleColor.r-0.11)/0.78)' to keep the original antialiasing.
You can make DrawGray.fx if you want to merely darken, instead of turning completely black.
mediafire.com/file/mlweye5n7jxzzu2/DrawBlackObjects_Post.7z/filePoses from
youtu.be/9tmGZwMndWwyoutu.be/y-2VQX5QkpU