Publish verified live restoration source snapshot and known limits

This commit is contained in:
0xcjy
2026-10-01 19:42:22 +08:00
parent 0dd0d3bdaa
commit d70a65c7ce
896 changed files with 105420 additions and 12745 deletions
+33
View File
@@ -0,0 +1,33 @@
# UmaViewer Live 还原交接(2026-09-25)
## 首要问题
工作区为 `D:\Projects\UmaTools\UmaViewer-master7`,目标是还原已编译的 `D:\Projects\UmaTools\UmaViewer` 的完整 Live 画面。用户指出:二进制版加载 Live 时进度数字为数千级,master7 为两位数;此前长期修后处理却没有明显画质改进,并且部分画面过亮。**下一步先对齐资源收集、加载和进度计数口径,再判断渲染链是否需要修复。**
这两个数字目前来自用户目测,尚无同条件进度日志、对应的二进制计数函数或两边完整资源清单。不能直接断言 master7 少加载数千项,也不能排除缺资源;绝不可只增大 UI 的计数来掩盖差异。
## 已核实的 master7 链路
- `Assets/Scripts/UmaViewerBuilder.cs:840`:`LoadLive` 经 `Director.GetLivePreloadEntries`、`UmaAssetManager.PreLoadAndRun`,再切换 `LiveScene`、`Director.Initialize`、`LoadLiveUma`、初始化时间轴与音乐。
- `Assets/Scripts/umamusume/Gallop/Live/Director.cs:731`:预载根为语音、Cutt、歌曲 part 和可选的 `3d/env/live/live{BackGroundId}/` 下舞台 bundle,最后按名称去重。`Director.cs:787` 有舞台依赖的同步兜底。这不是完整的角色、动作、特效资产清单。
- `Assets/Scripts/UmaAssetManager.cs:103-147`:根条目去重、展开依赖。Standalone 模式下 `UmaViewerDownload.cs:87-105` 的 `DownLoading(x/y)` 只统计本机缺失的展开条目;本机都有文件时该阶段不显示。之后对每个根执行 `SearchAB`,`Loading(x/y)` 的 `y=loadItems.Count`,可含重复的共享依赖。每次 `AcquireOne` 返回后即递增,**不表示成功打开了 y 个唯一 bundle**:`UmaAssetManager.cs:193-245` 有句柄复用、文件缺失等路径。`UmaSceneController.cs:73-91` 原样显示数字。
- `UmaAssetManager.cs:150` 的 `LoadAssetBundle` 是上述进度回调之外的按需入口。预载结束后 `UmaViewerBuilder.cs:102` 加载角色;`LiveTimelineControl.cs:355` 加载动作;`StageController.cs:284`、`LiveFlashController.cs:650`、`StageLensFlareDriver.cs:237`、`MonitorUvMovieProvider.cs:1741`、`CyalumePlaybackProvider.cs:377` 等有其它加载路径。`UmaViewerMain.cs:77` 另有初始化界面固定 10 步进度,不能和 Live 进度混同。
- master5 的旧预载流程更窄,不能认为它是完整正确的范本;master7 当前目录无 Git 元数据,避免覆盖式拷贝。
## 二进制逆向的起点
- `D:\Projects\UmaTools\UmaViewer\GameAssembly.dll` 与 `UmaViewer_Data\il2cpp_data\Metadata\global-metadata.dat`。磁盘上的 metadata 只有 **21 字节**;master5 的 `tmp/global-metadata.runtime.dat`、`tmp/render-analysis.txt`、`tmp/render-call-map.txt`、`tmp/render-disassembly.txt`、`tmp/render-pipeline-api.txt` 为已有线索。详情见 `docs/LIVE_RENDER_RESTORATION.md:6-11`。本地 Cpp2IL、Il2CppDumper、Il2CppInspector、IDA 可用;此前的 RVA/Shader 研究**没有**建立二进制 Live 资源图和进度计数链。
- 核对正在对比的 exe/DLL 身份与哈希;沿进度 UI 调用、回调源、Live 资源集合构造、依赖展开、资产实际打开和角色/舞台/时间轴阶段建立调用链。函数名相似不等于行为相同;必要时用受控运行日志验证静态推断。不要读取或输出账号、令牌及 `Config.json` 内容。
## 渲染状态与约束
- `docs/LIVE_RENDER_RESTORATION.md` 详列 Bloom/柔光、三层 PostFilm、径向模糊、简单颜色曲线、景深的证据、改动和隔离 GPU 回归。2026-09-25 的主相机检查未发现明确的第二次 Bloom 合成,但不排除多相机、真实帧 RT 交接、参数或素材差异引起过亮。径向模糊时间轴 bit17/bit18 矩形标志未确认。
- `tmp/dof-focus-test-project` 只含最小 Shader 测试素材;GPU PASS 不是全场景 Live 画质对齐。**物理和用户认可的景深算法不要改;不要凭截图盲调后处理强度。**不要关闭或重启用户主 Unity Editor(此前 PID 15476;操作前重查),不要同时启动两个同一隔离测试项目。
- 真实游戏参考是 `D:\Projects\UmaTools\UmaViewer-master5\captures\reference`,不是 master5 的输出。`live1176-content-aligned-20260912/manifest.json` 有歌曲 1176、舞台 10148、14 角色槽、60 fps、1920x1080,优先同条件检查 308、868、3848 帧。完整 Live 对齐截图**尚未完成**。
## 下一阶段的验收
1. 在相同歌曲、舞台、角色、资源库和工作模式下记录两程序进度文字、阶段、最大值;给出二进制计数来源及两边**同口径**的数字定义。
2. master7 增加可开关的只读诊断:预载根数、去重与含重复的依赖请求数、本地缺文件数、实际打开的唯一 bundle、句柄复用、失败和缺依赖;分阶段记录实际 `LoadAsset`/`LoadAllAssets` 请求及成功项。日志用规范名和阶段,不泄露配置/私有路径;`GetAllAssetNames` 的潜在资产数不可冒充实际加载数。
3. 逆向并对照二进制的资源收集和依赖图,明确列出多出/缺少的模型、动作、舞台、灯光/特效、屏幕素材、Shader/纹理,指出可见画面影响。静态无法确认的项目标为未知。
4. 只修有明确证据的缺项;运行 `tools/check_live_compile.ps1` 和隔离 GPU 回归。最后用**完整素材**对齐同一帧、机位及参数,报告资源差异、画面差异和过亮帧结论。若不能运行全场景,明确承认限制,不声称已经完成还原。
+111
View File
@@ -0,0 +1,111 @@
# Live 还原改进汇总与源码发布边界(2026-10-01)
## 发布状态与证据范围
本次发布为 `UmaViewer-master7` 的冻结源码快照,基于目标仓库既有 `master` 历史创建普通分支;不替换、重写或强推 `master`。冻结后正在进行的 **1093 观众缺失调查及任何后续修复不纳入本次快照**。
本轮改进并不意味着已达到原游戏全部视觉一致。下文的“通过”只对应明确列出的行为、歌曲、帧段或 GPU 场景。连续捕获报告的 `verified=true` 仅表示捕获身份/时间/连续历史合同通过,不是像素等价通过。用户最新实测优先于旧组件测试与旧截图。
汇总依据:本地中央工作区 `HANDOFF.md`(§3、§11、§12 最新追加)和 `REPORT.md`(§11、§12.1–12.11),以及项目原有 `docs/LIVE_RENDER_RESTORATION.md`。原始游戏数据、反汇编、截图与验证工程均不随源码发布;下面的 `tmp/...` 路径是维护者保留的本地证据索引,不是仓库内可下载附件。本发布代理只进行文件选择、安全审查与 Git 上传,未重跑 Unity、编译门或测试;运行结果为上述记录中的实际验证。
## 1. 驱动、时间轴与资源生命周期
- 阶段一删除重复 `AlterUpdate_BgColor1` 分发;移除跨相机自造 DOF bypass,恢复焦点深度数学,移除焦点预钳制与多减 near 的偏差。
- 后处理相机门控改为演示相机组成员判定;`ScreenOverlayRender.Parameter.Setup` 补拷 `ColorBlendFactor`,恢复作者 colorBlend 权重;shader 预热补 RadialBlur、ColorCorrection 三件。
- Exposure/ToneCurve 的序列化数据、worksheet、求值与渲染参数路由接入;不把仅编译接入称为整首亮度已匹配。
- A4 Effect/Particle 接入 MainLive SheetType 查表、事件分发、真实资源预载、父节点初始化、销毁释放、pause 与 seek 清空。1176 实际加载 27 个 prefab、观测 841 个粒子。修复 Effect 键漏 `OnLoad`、每帧重启已结束非循环粒子、Vr03 缺失/重复槽被压缩;实际修改前失败、修改后通过。
- 原生动画时钟恢复 `_isTimescaleDisabled` 与 approximately-zero speed 按 1 处理。真实 Animation 曲线前后证明错误 1.25/0 改为期望 5;不声称由此解决全部姿态差异。
- 显式 Animation.Sample 前按既有 IK 合同 reset,关闭后置自动 reset,保留 lookAt 求解;1176 腿部采样差消失,但头部约 33° 的差异仍在,不称完整姿态一致。
- Director 在角色构造前建立演示相机并维护唯一 MainCamera 标签,解决角色 FixedUpdate 的 `Camera.main` 空引用。308/868/3848 三个切换帧眼神追踪异常为零;不是在角色物理路径加空值绕过。
- 1176 激光合法空数组初始化不再每帧释放/扫描/重建:成功的非 null(含空)结果标记完成,真正资源失败仍可重试。实际 308 帧初始化调用由 328 次降至 1 次。
主要证据:`tmp/goal-effect-live-result.txt`、`goal-final-review-smoke-{before,after}.txt`、`goal-motion-clock-{before,after}.txt`、`goal-pose-reset-order-after.txt`、`goal-camera-ownership-result.txt`、`goal-laser-setup-{before,after}.txt`。
## 2. 多摄像头、最终合成与实际显示表面
- 辅相机独立 RT 捕获、原生 Composite/FinalComposite 消费、Single 冻结图及尺寸切换/恢复、独立后处理参数接入;可选后处理开关不再关闭必需多相机合成。
- 六项最终评审缺陷均有修改前失败/修改后通过证据:三项 Effect/Light 生命周期问题,以及 Single 冻结重建时机、禁用 owner/aux 生命周期旁路、aux Setup 后未重新 `DecideDrawType` 导致 Bloom 不生效。
- 真正生产显示链修复:`CopyCameraToRTFeature` 原 event1000 抢在 composition 之前复制,camera target 已分屏而 `RT_Screen` 仍单人。现仅复制 Director 主演示相机最终输出,pass/renderer 配置置 event1004。真实 1053 前后 `copied-display.png` 从单人变三栏。
- 1093 frame840 发现每相机独立 render context 重复触发 beginFrameRendering。FinalComposite 每个 Unity 帧只准备/清空一次,OnEnable 重置帧标记;最终 pass 按 URP projectionFlipped 处理 live framebuffer 方向,Single 冻结路径保持。
- 1093 最终实际捕获输出正向副相机人物;既有十一场景真实 URP GPU 回归全部通过,覆盖可见贡献、禁用/alpha-zero 旁路、Single 捕获/冻结/尺寸切换/恢复、aux Bloom 启闭。用户最新明确确认多摄像头已修复。
边界:十一场景不覆盖所有曲目、所有非对称分屏遮罩或全部视觉一致性。
主要证据:`tmp/goal-display-copy-{before,after}/`、`goal-composition-lifecycle-{before,after}.txt`、`goal-aux-draw-{before,after}.txt`、`goal-composite-draw-mode-smoke/result.txt`;实际 1093 捕获 `20261001_110949_870/frame_000840.png`。
## 3. 渲染、光照、镜面、屏幕与可见性
- A5 VolumeLight/LightShafts 真实贴图预载、timeline 事件与 URP passes 接入;13 场景、141 断言、311296 GPU 像素采样通过。A3 Spotlight3d 使用真实 AssetHolder prefab、角色附着与生命周期,1001 frame4000 三组 renderer 启用于 BG12。
- 恢复 GraphicSettings 逻辑槽到实际图层映射(effect11、excluded30、transparent1、spotlight12),保留 viewer Background23/UIHandle24 与碰撞矩阵。
- GlobalLight、角色颜色与舞台颜色按 Renderer 的 Get→修改→Set 保留其他 MPB 字段,避免覆盖 Rim/Ambient;方向光也不再逐帧创建 materials 实例数组。Blink 开关路径保留 Ambient 的前后实验通过。
- 舞台颜色按 FNV/nameHash 与 unit 子哈希寻址;恢复实例 enabled、原 parent/start TRS、`_MulColor0/_ColorPower`(包括 0)及精确 BgBL Ambient 语义。1001 角色颜色补消费 power,实际 frame298 从错误亮色恢复作者暗剪影;Control power 的无钳制插值实际中点 .5 通过。
- Blink 色彩恢复原生 HDR HSV、白端点继承 hue、reverse/直接 hue 插值等语义;修改前 HDR3 被截为1、期望青变红,修改后通过。Blink 材质缓存复用 List 并逐材料引用比较,不再因 sharedMaterials getter 新数组而每帧重建。
- 镜面双提交实际由 2 次降至 1 次,owner/receiver 禁用不再额外提交。恢复 `MirrorReflection.SetActive` 的 GameObject 生命周期语义,隐藏/零提交/恢复通过。
- 镜面组件恢复 `Gallop.MirrorReflection` namespace 与作者字段 `_mirrorCliipPlaneOffset`,避免丢原组件而补全层默认组件。1093 恢复 size512/layers12544/offset0,1176 恢复 size512/layers78080/offset0 与原 distortion 参数;真实 RT 从错误 1024×768 回到作者 512×384,不是随意降质量。
- 舞台监视器沿用 Builder 单 owner,删除重复 RT owner;1093 frame1198 主屏实际显示人物近景。Monitor timeline position/size 改为主纹理居中裁切,不覆盖作者物理 Width/Height;恢复 UVAdjust 与作者 FilterTexScale 合同,crop/aspect 烟测通过。
- 监视相机恢复 position key attribute0x20000 裁剪与0x40000背景,按原生 cullingLayer 转 mask,未标记 key 不被 CopyFrom 覆写历史状态。真实 camera8257→未标记保持→flagged4161/background切换通过;1093 自然 frame5556.599 验证 mask/background 正确,但横纹仍明显。
- 星芒迁移启用演示相机 URP postProcessing:真实1001 frame300、163 emitters 开关产生84883变化像素,画面直接可见交叉星芒。仍非完整 fog/directional/IgnoreLayers/fade 等价。
- StageWashBeam 使用原网格单层 sibling proxy、保留 TRS/生命周期,按每实际相机回调更新;清除空 material-index MPB 的 override,避免遮掉 renderer-wide Blink颜色。44 个真实 proxy、八同距离视角产生6170–6479变化像素,可见宽均32px;不是不同距离恒定屏幕像素宽。
- LightProjection worksheet/event/插值/角色附着与 URP Projector 绘制链接入;恢复 Near/Far timeline 无钳制插值与释放后的作者裁剪。真实 frustum 作者 far60 拒绝 z70,轨道 far75 接受z70且拒绝z80,Dispose 恢复。1001 局部投影贡献实测不等于用户最新地面镜头验收已通过。
- 1053 放射光锁定为 IndirectLightShafts 的真实 def_A/def_B 纹理;恢复 `_Offset=info.Offset`、`_Angle=info.Angle/360`,不修改作者 alpha/亮度。1004 残余过亮未据此关闭。
- 1037 Blink driver 两处强制 `renderer.enabled=true` 覆盖 object timeline:删除越权启用,真实 frame30/300/1100 六个 stardust 对象按作者保持关闭,而803个应可见 renderer 仍启用;早期 geometry CLEAR 点1694后四组粒子实际 playing=false/count0。未把整首粒子状态全部关闭问题标完成。
- Cyalume 实例初始化按原生 shader manager 使用 HQ 原 shader,清理无效 simple/全场景每帧修补;保留作者 mesh/TRS/ST。1093 天空棒/灰色观众问题仍开放,不移动相机或棒、不按高度猜裁剪。
- WashLight 收集作者现有组件并初始化,按 IsInitialized 注册;恢复 projection child TRS 重置。1093 上方光斑仍无贡献,原生 indices 已核对,不任意反转生产面序。
用户明确验收完成:1053 多余灰模型、1001 暗部舞台过亮、1093 橙色半透明覆盖。不得据此扩大为高光过曝、地面闪烁或性能全部解决。
主要证据:`tmp/goal-lighting-observation.txt`、`goal-blink-native-color-{before,after}.txt`、`goal-character-power-{before,after}.txt`、`goal-mirror-submit-{before,after}.txt`、`goal-mirror-activation-{before,after}.txt`、`goal-mirror-binding-check.json`、`goal-authored-flare-pixels.txt`、`goal-actual-beam-views/`、`goal-monitor-uv-scenario-result.txt`、`goal1093-monitor-evidence/monitor-native-state-result.txt`、`goal1037-visibility/visibility-proof.txt`、`projection-clip-proof.txt`。
## 4. 脚底圈光与每脚十字阴影
- 按真实资源 TypeTree 接入 common spotlight/shadow、layer13、原 mesh/material/TRS、预载和释放。
- 修复圆斑误常亮根因:FollowSpotCenter/Left/Right/Back BgColor1 未消费导致材质默认 power1。默认关闭,按作者角色 mask/flags、color/power/scale 更新;不统一gain、不以alpha启闭、不按歌曲硬编码。
- 真实1001 frame300全18人关、1248仅后排15人power.15、1422前三人.5/.4/.4及后排.15、5656全关,72个状态检查通过。1053 在作者开启时段仍可出现圈光,非整首禁用。
- 用户纠正后每角色两个 cross 分别绑定 Ankle_L/Ankle_R,XZ 独立随脚、Y 使用当前 timeline 地面输入;保留作者淡cross纹理、强度及 disabled projector。1053 38.4秒18角色/36实例逐脚检查和单独左脚位移隔离通过,真实近景直接可见双脚下独立cross。
- 1001 23.7秒逐脚绑定同样通过,但独立近景未清楚显示圈光/cross,不能关闭该歌曲脚底视觉验收。旧单中心 pixel PASS 不作为双脚验收证据;locator Position 可能是动画骨骼而非静态地面,未凭假设改 rootY/0 或 clamp。
主要证据:`tmp/goal-foot-timeline-result.txt`、`goal-two-foot-shadow-result.txt`、`goal-two-foot-shadow/feet.png`、`goal1001-two-foot-shadow-result.txt`。
## 5. 手持道具生产链
- 新增真实 Props/Attach 序列化 schema、完整 settings 与 worksheet 初始化;Builder 条件预载,Director 构造/late-evaluate/dispose controller,删除无消费者旧 bridge。
- 61首可用样本中30首声明道具、121组设置,不是全游戏全集。1093 DressId50 实例真实 M_ToonProp 在5232/6944/7074显示→隐藏→恢复并跟 Hand_Attach_R。
- 修复 propsID 为每角色条件过滤后的局部编号,而非全局setting索引;匹配但加载失败保留未解析slot,避免后续编号漂移。1177 修改前第二角色隐藏,修改后两个角色 local0 真道具均显示/跟手。
- 1004 body prefab 缺少作者 motion 曲线路径中的 Mic 附件节点,导致 timeline override target=null 而隐藏。Animation/locator 缓存前仅补缺失的四个真实动画节点,已有TRS不变、缺Position不猜 fallback,不偷改到手节点。自然播放630/634/1843/1922共12次显隐及 animated target 绑定通过;无清晰麦克风近景,不宣称原游戏视觉等价。
- canonical DressId 改为现有 costume选择对应 DressData row.id,而非资源前缀;缺失/歧义拒绝猜测。1032/00 predicate 前后通过;1037 实际自然播放30/5211/5305六次道具显隐与 Hand_Attach_L 跟随通过,闭合此前仅 predicate 烟测的边界。
- 1174 AlphaToon 作者材质 ZWrite1/Cutoff.2 的实际加载烟测通过,未盲目改材质。1181 默认输入原生明确 variation0;不把作者存在1/2轨道当作必须全启用。
仍未闭合:非默认 live variation 输入、1092 linked attachment、depth-alpha完整策略、flare collision/reserve warming等;不能写成“全部有道具Live已完整还原”。
主要证据:`tmp/goal-props-live-result.txt`、`goal-props1177/{before-index,after-index}-result.txt`、`goal-props1004/missing-motion-node-experiment/production-after-result.txt`、`canonical-{before,after}-result.txt`、`goal1037-visibility/props-canonical-result.txt`、`goal-prop-depth-material-result.txt`。
## 6. 验证总边界与开放问题
阶段一六套GPU回归(DOF焦点、前景CoC80采样、Bloom/Diffusion60检查、RadialBlur、ColorCorrection124902像素、PostFilm)有实际PASS;阶段二编译门及多个实际Live/URP前后证明见上述索引。验证使用隔离工程,不干扰用户编辑器;原生产 Config、CySpring 与角色物理不由本轮渲染调查修改。
1176严格连续308/868/3848对比 score约.45809/.52095/.47640、SSIM约.35684/.23779/.25706,仍有明显姿态/曝光差;没有像素等价验收。
明确仍开放:
1. **1093灰色观众缺失**:用户确认真实游戏有、viewer没有;保留作者荧光棒与相机位置,后续恢复真实mob加载/显隐/绘制,不统一给所有Live加观众。冻结后的诊断/修复不在本发布完成项。
2. **1093地面闪烁**:应集中约25秒及随后几秒,不用其他时段静态归因替代;橙色覆盖已由用户确认解决,不重开。
3. **1093屏幕横纹过重**:框架纹理来源及真实裁剪修复已证实,横纹仍在;不任意置黑框架、降低gain、隐藏draw或换镜面pass。
4. **1093舞台照地光斑**:作者wash已加载/初始化,但上方绘制贡献缺失,原native面序一致;未完成根因。
5. **1004约37.7秒亮度**:真实读回UNorm,before/after RGB最大均1,不支持“shaft输出HDR>1再进bloom”假设;alpha变化不足以单独证明偏差,不统一压曝光。
6. **1001约55.6秒远景DOF**:焦点目标/深度输入与参考存在差异;未通过关DOF、改size/spread掩盖。
7. **1001生产地面发光投影与脚底圆光/cross镜头验收**:局部贡献、轨道与绑定PASS不能覆盖用户最新反馈。
8. **全部道具Live与1037全场错误常显**:已修具体可复现分支,特殊策略/其他时段仍未完全验收。
9. **完整姿态、高光曝光及原游戏视觉一致**:仍有残差,不写成全部还原。
10. **1176性能研究暂停**:用户要求效果完整还原前暂停。既有正确性/分配/重复初始化修复保留;历史batch墙钟样本不等于用户实时FPS,不再开展成本/降质量实验。
## 7. 安全发布清单与运行前提
发布包含普通 Unity C#、自写 shader、asmdef/meta、必要普通材质/RT/场景/UI prefab、Packages、ProjectSettings、现有通用第三方插件、手写工具与本地网页查看器源码,以及项目文档。保留 Unity GUID,不广泛忽略全部 `.asset/.mat/.unity/.dll/.a`。
排除:Config.json与本地密钥、Library/Temp/Logs/obj/UserSettings、build/IDE生成物、tmp隔离验证工程、captures/exports/PMX/VMD游戏导出、备份、内存dump/加密metadata/反汇编产物、shader.a及提取bundle、游戏still/bg/flare/UI提取图、cri_auth、sound_proj.acf、游戏原生CySpringPlugin.dll。
**发布副本的 Config.cs 四组本地游戏密钥数组已清空,保留现有配置API;原master7不改。** 不新增密钥、不复制本地Config.json,不声称存在可运行fallback。音频源码中的既有公共常量文件与远端完全相同,未新增或变更该常量;既有Git历史未重写。
因此这不是开箱即用的二进制发行版。使用者必须自行合法取得所需游戏数据、授权音频资产与原生CySpring插件,并自行填写正确密钥/路径;缺省密钥不提供解密能力。排除的游戏UI纹理亦可能造成缺图,需要使用者自行提供。源工程所用Unity版本见 `ProjectSettings/ProjectVersion.txt`;本次不触发master/tag release工作流、不发布二进制、不声称新克隆无依赖即可构建运行。
远端已有历史保留;原本地项目无.git,本次Git集成在独立发布副本进行,避免覆盖正在调查的源码与用户状态。旧远端独有、与当前项目目录不兼容的源码以本冻结树为准迁移;旧提交仍可访问。历史文档可能描述较早状态,本页是本次冻结发布的状态入口。
+326
View File
@@ -0,0 +1,326 @@
# UmaViewer Live 杩樺師鎵ц�璁″垝
> 鐩�爣鐩�綍锛歚D:\Projects\UmaTools\UmaViewer-master7`
> 鐩�爣瀵硅薄锛氬凡缂栬瘧鐨� `D:\Projects\UmaTools\UmaViewer`
> 寤虹珛鏃ユ湡锛�2026-09-25
> 褰撳墠鐘舵€侊細闃舵�涓€鎵ц�涓�
## 鎬荤洰鏍�
鎶� master7 浠庘€滆兘鍔犺浇骞舵挱鏀� Live 鐨勫眬閮ㄦā鎷熲€濇帹杩涘埌鈥滆祫婧愰泦鍚堛€佸�璞$敓鍛藉懆鏈熴€佹椂闂磋酱銆佺浉鏈恒€佹覆鏌撻摼鍜屽悗澶勭悊閮芥湁鍙�拷婧�瘉鎹�殑 Live 澶嶇幇鍣ㄢ€濄€傛渶缁堥獙鏀朵互鍚屾瓕鏇层€佸悓鑸炲彴銆佸悓瑙掕壊銆佸悓甯с€佸悓鏈轰綅銆佸悓鍒嗚鲸鐜囩殑鐪熷疄绱犳潗鎴�浘涓哄噯锛涢殧绂� Shader/GPU 娴嬭瘯鍙�兘璇佹槑灞€閮ㄥ�绾︼紝涓嶅緱浣滀负瀹屾暣杩樺師璇佹槑銆�
## 涓嶅彲鐮村潖鐨勭害鏉�
- 涓嶄慨鏀圭墿鐞嗗疄鐜帮紱鐢ㄦ埛宸茬粡纭��褰撳墠鐗╃悊姝e父銆�
- 涓嶄慨鏀圭敤鎴峰凡缁忕‘璁ゅ熀鏈��甯哥殑鏅�繁绠楁硶锛岄櫎闈炲緱鍒版柊鐨勮繍琛屾椂/浜岃繘鍒惰瘉鎹�€�
- 涓嶇洿鎺ュ�鍒� master5 鐨� HDR 璁剧疆銆丏irector 鎴� Config锛涘厛纭�� RT銆侀�鑹茶浆鎹㈠拰璋冪敤椤哄簭銆�
- 涓嶅嚟鎴�浘鐩茶皟 Bloom銆丏iffusion銆丳ostFilm銆佹洕鍏夋垨棰滆壊寮哄害銆�
- 涓嶆妸 `GetAllAssetNames` 鐨勬綔鍦ㄨ祫浜ф暟閲忓啋鍏呭疄闄呭姞杞芥暟閲忋€�
- 涓嶅叧闂�€侀噸鍚�垨鎺ョ�鐢ㄦ埛涓� Unity Editor锛涢殧绂� GPU 娴嬭瘯鍙�娇鐢� `tmp\dof-focus-test-project`锛屼笖鍚屼竴鏃堕棿鍙�繍琛屼竴涓�€�
- 涓嶈�鍙栨垨杈撳嚭璐﹀彿銆佷护鐗屾垨 `Config.json` 鍐呭�銆�
## 鍥涢樁娈电洰鏍囦笌浜х墿
### 闃舵�涓€锛氬缓绔嬪彲閲嶅�鐨勭湡瀹� Live 鍩虹嚎涓庨€愬抚璇婃柇锛堝綋鍓嶏級
**鐩�殑**锛氬厛鍥炵瓟鈥渕aster7 瀹為檯鍔犺浇浜嗕粈涔堛€佸疄渚嬪寲浜嗕粈涔堛€佺敤鍝�釜鐩告満銆佹瘡甯х殑娓叉煋杈撳叆鏄�粈涔堚€濓紝鍋滄�鐢ㄦ埅鍥剧寽娴嬫牴鍥犮€�
**浜х墿**锛�
- `docs/LIVE_RENDER_PLAN.md`锛氭湰璁″垝鍜屾瘡杞�瘉鎹��褰曘€�
- 鍙�紑鍏崇殑 Live 杩愯�鏃惰瘖鏂�紝璁板綍 JSONL 浼氳瘽锛氭椂闂磋酱甯�/绉掓暟銆佹椿鍔ㄧ浉鏈恒€佺浉鏈哄弬鏁般€佽�鑹�/鑸炲彴/鐗规晥瀵硅薄瑙勬ā銆佸凡鎵撳紑 Bundle銆佸彞鏌勫�鐢ㄣ€佺己澶�/澶辫触銆佸悗澶勭悊鐘舵€佸拰鐩告満鐩�爣淇℃伅銆�
- 鐪熷疄 Live1176 鍩虹嚎鎹曡幏绾﹀畾锛氭瓕鏇� 1176銆佽垶鍙� 10148銆�14 涓��鑹叉Ы銆�60 FPS銆�1920脳1080锛屼紭鍏堝抚 308銆�868銆�3848銆�
- 缂栬瘧鍜岄殧绂� GPU 鍥炲綊鏃ュ織锛涙槑纭�€滃眬閮ㄦ祴璇曢€氳繃鈥濅笌鈥滅湡瀹� Live 鏈�獙璇佲€濈殑杈圭晫銆�
**楠屾敹鏍囧噯**锛�
1. 鍚屼竴浼氳瘽鑳藉�鍑哄姞杞介樁娈靛拰鎾�斁闃舵�鐨勫彲姣旇緝鏃ュ織锛�
2. 杩涘害鏉℃暟瀛楄兘鎷嗗垎涓烘牴鏉$洰銆佷緷璧栧睍寮€銆侀噸澶嶈�姹傘€佸疄闄呮墦寮€銆佸彞鏌勫�鐢ㄥ拰杩愯�鏈熼棿鎸夐渶鍔犺浇锛�
3. 璇婃柇榛樿�鍏抽棴锛屽紑鍚�椂涓嶆敼鍙樼墿鐞嗐€佹櫙娣卞拰鍚庡�鐞嗗弬鏁帮紱
4. 鑳芥寚鍑轰笅涓€姝ラ渶瑕佽ˉ璧勬簮闆嗗悎杩樻槸琛ユ覆鏌撻摼锛岃€屼笉鏄�彧缁欏嚭鈥滅敾闈㈡洿浜�/鏇存殫鈥濄€�
### 闃舵�浜岋細瀵归綈璧勬簮鍔犺浇銆佸満鏅��璞″拰瀹炰緥鍖栫敓鍛藉懆鏈�
**鐩�殑**锛氭妸浜岃繘鍒剁増鐨勨€滄暟鍗冪骇璧勬簮鍔犺浇鈥濊浆鍖栦负鍚屽彛寰勬暟鎹�紝纭�� master7 鏄�惁缂哄皯瑙掕壊鍔ㄤ綔銆佽垶鍙板瓙瀵硅薄銆佺伅鍏夈€佸睆骞曘€佺壒鏁堛€丼hader/绾圭悊鎴栧彧鏄�粺璁″彛寰勪笉鍚屻€�
**浜х墿**锛�
- 浜岃繘鍒剁増涓� master7 鐨勮祫婧愯�鏁板彛寰勮〃锛�
- Live1176 鐨勬牴鏉$洰銆佷緷璧栧浘銆佸疄闄呮墦寮€ Bundle銆乣LoadAsset`/`LoadAllAssets` 璇锋眰鍜屽疄渚嬪寲瀵硅薄娓呭崟锛�
- 渚濇嵁璇佹嵁淇��鐨勮祫婧愰泦鍚�/鎸夐渶鍔犺浇椤哄簭銆�
**楠屾敹鏍囧噯**锛氬姞杞芥暟宸茶兘瑙i噴涓哄悓涓€缁熻�鍙e緞锛涚己椤瑰彲钀藉埌鍏蜂綋 Bundle/璧勪骇/璋冪敤鐐癸紱涓嶄互 UI 鏀惧ぇ鏁板瓧浠f浛淇��銆�
### 闃舵�涓夛細瀵归綈鐪熷疄娓叉煋閾俱€佺浉鏈哄拰 RT 鏍煎紡
**鐩�殑**锛氱‘璁ゆ瘡涓�浉鏈哄拰姣忎釜 Render Feature 鐨勮緭鍏�/杈撳嚭銆丷T 鏍煎紡銆佹繁搴︾汗鐞嗐€丮SAA銆丠DR/LDR 杞�崲涓庢渶缁� Blit锛屽畾浣嶈繃浜�槸鍚︽潵鑷�噸澶嶅悎鎴愭垨閿欒�棰滆壊绌洪棿銆�
**浜х墿**锛�
- 涓荤浉鏈恒€侀暅闈�/鐩戣�鍣�/鍙嶅皠鐩告満鐨勬覆鏌撴竻鍗曪紱
- `SourceSetup -> DOF/Diffusion/Bloom/Overlay -> RadialBlur -> ColorCorrection -> FinalBlit` 鐨勫疄闄呰繍琛屾椂璇佹嵁锛�
- 杩囦寒甯х殑杈撳叆杈撳嚭绾圭悊涓庡弬鏁板揩鐓с€�
**楠屾敹鏍囧噯**锛氭瘡涓�彲瑙佸悗澶勭悊鏈夌湡瀹炶緭鍏�/杈撳嚭鍜屽惎鐢ㄦ潯浠讹紱纭��鏄�惁瀛樺湪绗�簩娆″悎鎴愩€佸�鐩告満璇�叆鎴栫己澶辨渶缁堣浆鎹�紱涓嶅嚟鎴�浘璋冨己搴︺€�
### 闃舵�鍥涳細浜岃繘鍒惰皟鐢ㄩ摼銆佸惎鐢ㄦ潯浠跺拰绾圭悊浜ゆ帴纭��
**鐩�殑**锛氬皢闈欐€侀€嗗悜璇佹嵁涓庤繍琛屾椂鏃ュ織瀵瑰簲璧锋潵锛岀‘璁よ祫婧愰泦鍚堛€佹椂闂磋酱 key銆佺浉鏈哄垏鎹€€佸悗澶勭悊鍙傛暟鍜岀汗鐞嗕氦鎺ョ殑璋冪敤椤哄簭銆�
**浜х墿**锛�
- `D:\Projects\UmaTools\UmaViewer-master5\tmp\render-*.txt`銆佽繍琛屾椂鏃ュ織銆丟ameAssembly/Shader 璇佹嵁鐨勬槧灏勮〃锛�
- 鏈�‘璁ら」鐩�槑纭�爣璁颁负鈥滄湭鐭モ€濓紝涓嶅緱鐢ㄧ浉杩戝彉閲忓悕浠f浛璇佹嵁锛�
- 鍙�湁缁忚繃璋冪敤閾惧拰鍚屽抚鎴�浘鍙岄噸楠岃瘉鐨勬簮浠g爜淇��銆�
**楠屾敹鏍囧噯**锛氭瘡椤逛慨澶嶈兘鍥炵瓟鈥滃摢涓�嚱鏁�/鍝�釜 key/鍝�釜鏉′欢/鍝�釜绾圭悊/鍝�釜甯р€濓紱瀹屾暣绱犳潗鍚屽抚鏍¢獙鍚庢墠鎶ュ憡鐢婚潰鏀瑰杽鎴栬繃浜�粨璁恒€�
## 褰撳墠鎵ц�璁板綍
### 2026-09-25锛氶樁娈典竴绗� 1 涓�彲娴嬮噺澧為噺
- 鏂板缓鏈��鍒掓枃妗o紝纭��鍥涢樁娈电洰鏍囧拰楠屾敹杈圭晫銆�
- 涓嬩竴姝ュ疄鐜板彧璇� Live 杩愯�鏃� JSONL 璇婃柇锛氫笉鏀瑰彉鐗╃悊銆佹櫙娣辨垨鍚庡�鐞嗗弬鏁帮紱鍏堟妸鍔犺浇璁℃暟鍜屾挱鏀炬椂鐨勫�璞�/鐩告満/RT 蹇�収鍒嗙�璁板綍銆�
- 褰撳墠涓� Unity Editor 宸叉�娴嬪埌杩愯�涓�紝涓嶅叧闂�€佷笉閲嶅惎锛涙湰杞�笉鍚�姩涓婚」鐩�殑鎵瑰�鐞嗗疄渚嬨€�
- 褰撳墠鍩虹嚎浠嶄繚鎸� HDR 鍏抽棴锛涘緞鍚戞ā绯� bit17/bit18 鐭╁舰鏍囧織淇濇寔鏈�‘璁わ紝涓嶅惎鐢ㄣ€�
### 2026-09-25锛氶樁娈典竴绗� 2 涓�彲娴嬮噺澧為噺
- 淇�� `LiveRuntimeDiagnostics.cs` 鐨勫懡鍚嶇┖闂村紩鐢�紱`tools/check_live_compile.ps1` 閫氳繃锛屼粎淇濈暀鍘熸湁璀﹀憡銆�
- 鍦ㄩ殧绂� `tmp/dof-focus-test-project` 涓�ˉ榻愭湰鍦扮湡瀹炲弬鑰� manifest銆丩ive1176 鏇茬嚎 fixture銆丩ive1001 radial fixture 鍜� shader bundle 鍚庯紝瀹屾暣鍚庡�鐞嗗洖褰掗€氳繃锛�
- LiveCaptureContract锛氫袱浠界湡瀹炲弬鑰� manifest 鐨勮韩浠姐€佸抚閫夋嫨銆佺ǔ瀹氭€ч棬鎺ч€氳繃锛涙湭鍔犺浇瀹屾暣 Live銆�
- ColorCorrection锛�1176 鍏�粍鏇茬嚎銆佸瓧鑺傛墦鍖呫€�54 涓� GPU 棰滆壊/Alpha 妫€鏌ラ€氳繃銆�
- Bloom/Diffusion锛氭彁鍙栥€丅loom銆丏iffusion 鏂圭▼鍙婁笁灞� PostFilm 涓€娆� Bloom 鍚堟垚妫€鏌ラ€氳繃銆�
- RadialBlur锛歀ive1001 鏃堕棿杞� 7901 涓�牱鏈�€丟PU 妫€鏌ラ€氳繃锛沚it17/bit18 鏈��鐚滄祴鍚�敤銆�
- PostFilm锛氭椂闂磋酱涓� GPU 妫€鏌ラ€氳繃銆�
- DOF锛氱劍鐐硅矾鐢卞拰鍓嶆櫙/杩滄櫙 CoC GPU 妫€鏌ラ€氳繃銆�
- 涓哄凡鎵撳紑鐨� Unity Editor 澧炲姞鏈�湴 `tmp/enable-live-diagnostics` 鏍囪�鍏ュ彛锛岄伩鍏嶄緷璧栧惎鍔ㄥ墠鐜��鍙橀噺锛涘畠鍙�惎鐢� JSONL 瑙傛祴锛屼笉鏀瑰彉鐗╃悊銆佹櫙娣便€丠DR銆丅loom銆佸緞鍚戞ā绯婃垨棰滆壊鍙傛暟銆傝�鏍囪�褰撳墠宸插垱寤猴紝寰呯敤鎴峰湪缂栬緫鍣ㄤ腑鍔犺浇涓€娆� Live1176 鍚庤�鍙� `tmp/live-diagnostics-*.jsonl`銆�
- 褰撳墠涓� Unity Editor 浠嶄负 PID 22128锛屾湭鍏抽棴銆佹湭閲嶅惎锛涢殧绂绘壒澶勭悊楠岃瘉宸茬粨鏉熴€�
**鏈�樁娈电粨璁�**锛氶殧绂绘祴璇曞凡缁忚瘉鏄庘€滃凡鎺ュ叆鐨勬柟绋嬨€佹椂闂磋酱瑙f瀽鍜屽弬鏁拌矾鐢扁€濆湪鐙�珛娴嬭瘯涓�彲澶嶇幇锛屼絾涓嶈兘鏇夸唬鐪熷疄 Live 鐨勫畬鏁存覆鏌撳抚銆傝祫婧愭暟閲忓樊寮傘€佹寜闇€鍔犺浇瑙勬ā銆佺湡瀹炵浉鏈�/RT 鏍煎紡鍙婂�鐩告満鍙犲姞浠嶆湭鍙栧緱杩愯�鏃惰瘉鎹�紝闃舵�涓€灏氭湭楠屾敹銆�
## 璇佹嵁涓庢湭瑙e喅闂��
- 鐪熷疄娓告垙鍔犺浇杩涘害涓衡€滄暟鍗冪骇鈥濈殑瑙傚療灏氭湭鏈夊悓鍙e緞鏃ュ織锛屼笉鑳界洿鎺ョ瓑鍚屼簬 master7 灏戝姞杞借祫婧愩€�
- master7 褰撳墠棰勮浇璺�緞鍙��鐩栬�闊炽€丆utt銆佹瓕鏇� part 鍜屽彲閫夎垶鍙扮洰褰曪紱瑙掕壊銆佸姩浣溿€佸睆骞曘€佺伅鍏夊拰鐗规晥瀛樺湪棰勮浇鍚庢寜闇€璺�緞銆�
- `D:\Projects\UmaTools\UmaViewer-master5\captures\reference\live1176-content-aligned-20260912\manifest.json` 鏄�紭鍏堢殑鐪熷疄鐢婚潰鍙傝€冿紱灏氭湭瀹屾垚瀹屾暣绱犳潗鍚屽抚鎹曡幏銆�
- `D:\Projects\UmaTools\UmaViewer-master5\tmp\render-analysis.txt`銆乣render-call-map.txt`銆乣render-disassembly.txt`銆乣render-pipeline-api.txt` 鏄�凡鏈夐€嗗悜璇佹嵁锛涚�鐩樺師濮� metadata 浠� 21 瀛楄妭锛屾殏涓嶉噸澶嶆櫘閫� Cpp2IL 娴佺▼銆�
## 鎵ц�椤哄簭
1. 瀹屾垚闃舵�涓€璇婃柇骞堕€氳繃 `tools\check_live_compile.ps1`锛�
2. 鐢ㄧ湡瀹� Live1176 浼氳瘽瀵煎嚭璇婃柇锛岀‘璁ゅ姞杞界粺璁″彛寰勫拰瀹為檯瀵硅薄闆嗗悎锛�
3. 鍙�慨闃舵�浜屼腑鏈夎瘉鎹�殑璧勬簮/鐢熷懡鍛ㄦ湡缂洪」锛屽啀缂栬瘧鍜岄殧绂诲洖褰掞紱
4. 璁板綍鐪熷疄鐩告満/RT/Feature 椤哄簭锛岃繘鍏ラ樁娈典笁锛�
5. 鐢ㄦ湰鍦颁簩杩涘埗鍜岃繍琛屾椂鏃ュ織瀹屾垚闃舵�鍥涜皟鐢ㄩ摼鏄犲皠锛�
6. 鏈€鍚庣敤鍚屽抚鎴�浘鏍¢獙锛屼笉浠ュ眬閮ㄥ悎鎴� Shader 娴嬭瘯瀹gО瀹屾暣杩樺師銆�
### 2026-09-25锛氶樁娈典竴绗� 3 涓��閲忊€斺€斿姞杞藉彛寰勪笌瀹炰緥鍖栧彇璇侊紙鏈�獙鏀讹級
- 淇��涓婅疆涓�柇鐨� `RecordProgress` 缂栬緫锛氱Щ闄よ�鍐欏叆鐨勫瓧闈㈣浆涔�/鍗曞紩鍙凤紝杩涘害璁板綍鍙�彇绗� 1 椤广€佹瘡 64 椤瑰拰鏈�」浠ュ強瀹屾垚浜嬩欢锛岄伩鍏嶆瘡涓€椤归兘鍚屾�鍐欑洏銆傛棩蹇楀瓧娈垫槑纭�负 `progressCurrent/progressTarget/progressMessage`銆傝繘搴︽潯鏈�韩涓嶆敼鍔ㄣ€�
- 鍦ㄩ粯璁ゅ叧闂�殑 JSONL 涓�尯鍒� `UmaDatabaseEntry.Get/GetAll` 瀹為檯鐗╁寲鐨勮祫浜с€侀樁娈�/Part 鐨勯儴鍒嗙洿鎺� `LoadAsset`锛屼互鍙� Live 瑙掕壊瀹瑰櫒銆丆utt銆佽垶鍙板�璞$殑瀹炰緥鍖栥€傚崟娆� `LoadAllAssets` 杩斿洖鏁般€佺被鍨嬪尮閰嶆暟銆侀€変腑璧勪骇涓庡疄渚嬪寲鐨� Transform/Renderer/Light/ParticleSystem 鏁板垎鍒��褰曪紱**杩欏彧鏄�凡鎸傞挬璺�緞鐨勮�娴嬶紝涓嶆槸鏁翠釜搴旂敤鐨勮祫浜у姞杞芥€绘暟**銆傛病鏈夊姞杞芥柊璧勬簮锛屼篃娌℃湁鏀瑰姩鐗╃悊銆佹櫙娣便€丠DR 鎴栧悗澶勭悊璁$畻銆�
- 鏂板� `tools/summarize_live_diagnostics.py`锛氬�鍗曟� JSONL 杈撳嚭棰勮浇鏍�/渚濊禆灞曞紑/鍚�噸澶嶈�姹傘€佸疄闄呮墦寮€/澶嶇敤/澶辫触銆侀�杞藉悗鐨勬寜闇€ Bundle銆佸凡瑙傛祴璧勪骇鑾峰彇銆佸�璞″疄渚嬨€佹挱鏀剧浉鏈哄強鍙傝€冨抚 308/868/3848銆傜敤鍚堟垚鐨勮�鏁版牱鏈��鏌ヤ簡鍒嗙被杈撳嚭锛涙病鏈夋妸鍏舵暟鍊煎綋浣滅湡瀹� Live 璇佹嵁銆�
- `tools/check_live_compile.ps1` 閫氳繃锛屾棩蹇� `tmp/stage1-assets-compile-20260925.log`锛屼粎鏃㈡湁璀﹀憡銆傞殧绂� `tmp/dof-focus-test-project` 鐨� GPU/鏅�繁鍥炲綊鏈€缁� exit 0锛屾棩蹇� `tmp/stage1-assets-gpu-verified-20260925.log`銆傞�娆¢殧绂诲皾璇曞洜涓烘湭鎻愪緵鐪熷疄鍙傝€� manifest 鐜��鍙橀噺鑰屾寜棰勬湡鍦ㄥ�绾﹂棬鎺у�閫€鍑� 1锛涜ˉ榻愬凡瀛樺湪鐨勬湰鍦板弬鑰冦€亀orksheet銆乺adial fixture銆乻hader bundle 鍚庨噸璺戦€氳繃銆傞殧绂婚獙璇佷笉绛夊悓浜庡畬鏁� Live銆�
- 涓� Unity Editor 淇濇寔鍘熻繘绋嬫湭鍏抽棴/鏈�噸鍚�紱闅旂�鎵瑰�鐞嗗凡閫€鍑恒€俙tmp/enable-live-diagnostics` 鏍囪�浠嶅湪銆傚埌鏈��缁撴潫浠�**娌℃湁** `tmp/live-diagnostics-*.jsonl`锛屽洜姝ゅ皻涓嶈兘瑙i噴鐢ㄦ埛瑙傚療鍒扮殑鈥滄暟鍗冪骇 vs 涓や綅鏁扳€濓紝鏇翠笉鑳藉0绉扮敾闈㈡敼鍠勬垨闃舵�涓€楠屾敹銆�
**涓嬩竴姝ョ‖闂ㄦ�**锛氬湪涓荤紪杈戝櫒鍔犺浇銆佹挱鏀句竴閬嶇湡瀹� Live1176锛堣垶鍙� 10148銆佸弬鑰冮樀瀹� 14 妲斤級锛涘畬鎴愬悗鐢� `python tools/summarize_live_diagnostics.py tmp/live-diagnostics-<浼氳瘽>.jsonl` 鍒嗘瀽銆傚悓娆′細璇濊�鍖呭惈棰勮浇鍜屾挱鏀惧抚銆備笉鑳藉畨鍏ㄩ┍鍔ㄦ�鍦ㄤ娇鐢ㄧ殑缂栬緫鍣�紝鍥犳�闇€瑕佺敤鎴疯嚜宸辫Е鍙戜竴娆★紱闅忓悗瀵圭収浜岃繘鍒剁増鍚屽彛寰勫姞杞借瘉鎹�紝鑰岄潪澶嶅埗杩涘害鏁板瓧銆俙AssetBundle.LoadAsset` 鐨勫叾浠栫洿鎺ヨ皟鐢ㄧ偣锛堝寘鎷�叾浠栫洃瑙嗗櫒銆佺壒鏁堣矾寰勶級浠嶉渶鎸夊疄闄呰瘖鏂�己鍙h拷鍔狅紝涓嶈兘鎶婂綋鍓� `asset_load` 鏁板綋鎬绘暟銆�
### 2026-09-25锛氱紪璇戠増瑙掕壊 flare-collision 璧勬簮閾鹃潤鎬佹牳瀵癸紙闃舵�浜屽彇璇侊紝鏈�疄鏂斤級
- 宸茬紪璇戠洰鏍� `D:\Projects\UmaTools\UmaViewer\GameAssembly.dll` 涓庡厛鍓嶇敤浜庢仮澶嶇殑 `D:\Download\UmaViewer\GameAssembly.dll` 鐨� SHA256 鐩稿悓锛坄d678a071...15b28b78d`锛夈€俙master5/tmp/scan_target_memory.py` 浠庡彟璧风殑鐩�爣杩涚▼鍙��杞�偍杩愯�鏃舵槧鍍忥紝`convert_memory_image.py` 灏嗘槧鍍忛噸鎺掓垚 `target-gameassembly-unpacked.dll`銆傝繖涓嶆槸鍘熷�纾佺洏 DLL 鐨勭洿鎺ュ弽缂栬瘧銆俙tools/inspect_live_native_calls.py` 鐜板湪鏍¢獙鍘熷�鍜屾仮澶嶆枃浠剁殑瀹屾暣 SHA256锛岀増鏈�笉绗﹀垯鎷掔粷杈撳嚭鍦板潃缁撹�銆�
- 鎭㈠�鐗� `Gallop.Live.Director.GetLivePreloadEntries`锛圧VA `0x1a5be60`锛夊湪瑙掕壊寰�幆涓�簬 `0x181a5c1ee` 璋冪敤 `TryGetCharacterFlareCollisionPaths`锛涗粎鍦ㄨ繑鍥炴垚鍔熸椂锛屼簬 `0x181a5c21c`銆乣0x181a5c22e`銆乣0x181a5c240` 灏嗕笁涓�緭鍑洪€愪竴浜ょ粰 `AddByOfficialPath`銆俙InitializeTimeline` 浜� `0x181a5e755` 璋冪敤 `InitializeCharacterFlareCollision`锛岃�鏂规硶鍙堣皟鐢ㄥ悓涓€璺�緞瑙f瀽鍣ㄥ苟涓夋�璋冪敤 `AddCharacterFlareCollision`銆傝繖璇佹槑棰勮浇鍜屽疄渚嬪寲澶嶇敤鍚屼竴瑙掕壊璧勬簮瑙f瀽娴佺▼锛屼笉璇佹槑姣忎釜瑙掕壊涓夋潯閮藉疄闄呭瓨鍦ㄦ垨鎴愬姛鍔犺浇銆�
- `TryGetCharacterFlareCollisionPaths`锛圧VA `0x1a68610`锛夊湪鏋勯€犺緭鍑轰箣鍓嶆湁绌鸿�鑹�/鏈嶈�妫€鏌ャ€乣TryGetMasterDressData`銆佸�涓� `TryReadMasterInt` 鍜� `TryResolveNormalHeadModel` 鐨勬垚鍔熷垎鏀�紱澶辫触鍒欒繑鍥� false銆傛仮澶嶇殑 IL2CPP metadata v31 鐨勫瓧绗︿覆瀛楅潰閲� 1460鈥�1464 鍖呭惈 `3d/Chara/{Body,Head,Tail}/.../Flares/ast_..._flare` 浜斾釜妯℃澘銆傛瀯閫犲嚱鏁扮洿鎺ヨ皟鐢ㄧ殑涓変釜鏍煎紡鍖栧嚱鏁板湴鍧€涓� `0x1819ba670`銆乣0x1819bac20`銆乣0x1819bb080`锛�**灏氭湭纭��鏍煎紡鍑芥暟涓庝簲涓�瓧闈㈤噺鐨勯€愪竴鏄犲皠銆佸疄闄呮湇瑁呭瓧娈靛€煎強瀹樻柟璺�緞鍒拌祫婧愮储寮曠殑瑙f瀽缁撴灉**銆備笉鍙�妸杩欎簺纰版挒璧勬簮褰撴櫘閫氬彲瑙� flare 璐村浘鍔犺浇銆�
- master7 鐨� `Director.GetLivePreloadEntries` 褰撳墠娌℃湁杩欎竴瑙掕壊鍒嗘敮锛涗絾棰勮浇閮ㄥ垎鏈€澶氭瘡瑙掕壊涓変釜璺�緞锛屽崟鍑�畠鏃犳硶瑙i噴鐢ㄦ埛瑙傚療鐨勨€滄暟鍗冪骇 vs 涓や綅鏁扳€濄€傚畠鍙�兘褰卞搷 flare 閬�尅锛岃€屼笉鏄� Bloom 閲嶅�鍚堟垚鎴栨€讳綋浜�害銆傜幇闃舵�娌℃湁琛屼负鏀瑰姩銆傝瘖鏂�爣璁颁粛鍦�紝鍒版湰娆℃牳瀵逛粛鏃� `tmp/live-diagnostics-*.jsonl`锛涗富缂栬緫鍣ㄦ病鏈夎�鍏抽棴鎴栭噸鍚�€備笅涓€姝ョ户缁�В鏋愭牸寮忓嚱鏁扮殑 IL2CPP 瀛楅潰閲忓紩鐢ㄥ強鐪熷疄璧勪骇绱㈠紩锛屽苟鍙栧緱涓€娆″悓涓€浼氳瘽鍖呭惈鍔犺浇涓庢挱鏀剧殑 Live1176 璇婃柇锛屽啀鍐冲畾鏄�惁瀹炴柦銆�
### 2026-09-25锛氶樁娈典竴绗� 4 涓��閲忊€斺€旀墿澶у疄闄呰祫浜ц皟鐢ㄨ�娴嬶紙浠嶆湭楠屾敹锛�
- 榛樿�鍏抽棴鐨勮瘖鏂�幇鍦ㄤ篃璁板綍鑸炲彴 flare 鐨� `LoadAllAssets<GameObject>` 鍜岀汗鐞�/鏉愯川銆丩iveFlash 鐩存帴璧勪骇/鍏滃簳鍏ㄩ噺鑾峰彇銆佺洃瑙嗗櫒 livesettings/uvmovie銆佺伅妫� CSV/鍥炬�绾圭悊銆佹棫妯″紡鍔ㄤ綔鐨勭洿鎺� `LoadAsset`銆傝�褰曡�姹傝祫浜ц矾寰勩€佽繑鍥炶祫浜у悕绉般€佺被鍨嬪拰缁撴灉锛屼笉澧炲噺鍔犺浇鎴栧疄渚嬪寲銆備互 `AssetBundle.name` 鏍囪�鐨勮矾寰勫彲鑳戒笉鏄�畼鏂圭储寮曞悕绉帮紱`GetAllAssetNames` 浠嶄笉璁′綔宸插姞杞借祫浜с€傚畬鏁村簲鐢ㄨ繕鏈夊叾瀹冭皟鐢ㄧ偣锛屽洜姝ゆ眹鎬荤粺璁℃槑纭�负宸茶�娴嬩笅鐣岃€岄潪璧勬簮鎬绘暟銆�
- `tools/check_live_compile.ps1` 宸查€氳繃锛屼粎鐜版湁璀﹀憡銆傜嫭绔嬮」鐩� `tmp/dof-focus-test-project` 鐨� D3D11 鍥炲綊鏃ュ織 `tmp/stage1-coverage-gpu-20260925.log` 鏄剧ず鐪熷疄鍙傝€� manifest 濂戠害銆侀�鑹层€丅loom/Diffusion銆丳ostFilm銆丷adialBlur銆佹櫙娣辩劍鐐瑰拰 80 涓�墠鏅�/杩滄櫙 GPU 鏍锋湰鍧� PASS锛屾壒澶勭悊鎴愬姛閫€鍑恒€傛�娴嬭瘯椤圭洰娌℃湁瀹屾暣 Live 鍦烘櫙鍙婅�鑹茶祫婧愶紝**涓嶆瀯鎴愯�瑙夊�榻愰獙鏀�**銆傛病鏈変慨鏀圭墿鐞嗐€佹櫙娣辩畻娉曘€丠DR 寮€鍏虫垨鍚庡�鐞嗗己搴︺€�
- 浠嶉渶鐢ㄦ埛鍦ㄤ富缂栬緫鍣ㄨЕ鍙戜竴娆� Live1176锛堣垶鍙� 10148銆佸弬鑰� 14 妲斤級鐨勫畬鏁村姞杞藉拰鎾�斁銆傝瘖鏂�爣璁板凡瀛樺湪锛涙�娆℃病鏈変細璇� JSONL锛屾湭鍏抽棴/閲嶅惎涓荤紪杈戝櫒锛屼篃鏈�0绉扮敾闈㈠彉鍖栥€傞殢鍚庡厛鐢� `tools/summarize_live_diagnostics.py` 鍒嗚В杩涘害鏁板瓧涓庡凡瑙傛祴璧勪骇锛屽啀閫夊叿浣撶己椤圭户缁�煡浜岃繘鍒躲€�
- 璇婃柇姹囨€诲�鏍镐慨姝d簡涓ょ�缁熻�鍋囪薄锛歚LoadAsset` 杩斿洖 null 涓嶅啀璁′负 1 涓�疄闄呯墿鍖栬祫浜э紱鎴愬姛鐨� `LoadAllAssets` 涓嶅啀琚�爣鎴� empty銆傛渶缁堥噸鏂拌繍琛岀紪璇戦€氳繃锛岀嫭绔� D3D11 鍥炲綊 `tmp/stage1-coverage-gpu-final-20260925.log` 閫€鍑虹爜 0锛孊loom銆丳ostFilm銆佸緞鍚戞ā绯婂拰鏅�繁鐢ㄤ緥鍧� PASS銆備粛鏈�彇寰楃湡瀹� Live 鏃ュ織鎴栧畬鏁寸敾闈�紝涓嶈兘鎹��鎺ㄦ柇璧勬簮鎬绘暟鍙婅�瑙夋敼鍠勩€�
### 2026-09-25锛氶樁娈典竴绗� 5 涓��閲忊€斺€旇祫婧愮储寮曚笌鍦烘櫙瑙勬ā鍒嗗彛寰勫揩鐓�
- 榛樿�鍏抽棴鐨勭湡瀹� Live 璇婃柇鍦� `preload_callback`銆乣director_initialized`銆乣characters_loaded`銆乣timeline_music_initialized` 鍥涗釜杈圭晫璁板綍 `bundle_inventory` 鍜� `scene_inventory`锛涙瘡涓� Bundle 鍙﹁� `bundle_index`銆傜粺璁″凡鍔犺浇鍙ユ焺銆佹湁鏁� AssetBundle銆侀潪 Bundle 鍙ユ焺銆乣GetAllAssetNames()` 鐨勭储寮曞€欓€夋暟鍜岀储寮曢敊璇�紝骞剁粺璁″凡鍔犺浇鍦烘櫙鐨勬牴瀵硅薄銆乀ransform銆丷enderer銆丩ight銆丳articleSystem銆丆amera銆乂ideoPlayer銆傚畠浠�兘涓嶆槸瀹為檯 `LoadAsset` 鎴愬姛鏁帮紱`DontDestroyOnLoad` 涓庣紪杈戝櫒瀵硅薄涓嶈�鍏ュ満鏅�揩鐓с€傛壂鎻忓彧鍙戠敓鍦ㄩ樁娈佃竟鐣岋紝涓斿彧鍦ㄨ瘖鏂�紑鍚�椂锛涗笉閫愬抚鎵�弿銆�
- 姹囨€诲伐鍏锋柊澧炴寜闃舵�鐨勭嫭绔嬪彛寰勶紝淇濈暀鍘熸湁棰勮浇璇锋眰銆佸疄闄呮墦寮€銆佸凡瑙傛祴璧勪骇璇锋眰璁℃暟锛涘悎鎴� JSONL fixture 楠岃瘉瑙f瀽閫氳繃銆俙tools/check_live_compile.ps1` 閫氳繃锛屼粎鐜版湁璀﹀憡銆傚綋鍓嶄粛娌℃湁鐪熷疄浼氳瘽 `tmp/live-diagnostics-*.jsonl`锛屾墍浠ヨ繖浜涚粺璁″皻鏃犲疄闄� Live 鍊笺€�
- 閽堝�鎭㈠�鐗� IL2CPP metadata/binary 澧炲姞 hash 鏍¢獙鐨勫彧璇� `tools/TargetMethodLookup`銆傚湪鐩�爣 `Director.GetLivePreloadEntries` 鍑芥暟鑼冨洿鍐咃紝`0x181a5c18f` 璋冪敤 `Gallop.ResourcePath.GetCyalumeScorePath`锛圧VA `0x19ba070`锛夛紝杩斿洖鍊煎湪 `0x181a5c19f` 浜ょ粰 `AddByKey`銆傜洰鏍� metadata 鏈夊瓧闈㈤噺 `Live/MusicScores/m{0:0000}/m{0:0000}_cyalume`锛沵aster7 鍘熸潵鍙��杞� part锛屾病鏈夐�杞� cyalume銆傜幇鍦ㄤ粎鍦� `AbList` 鐪熸�瀛樺湪瀵瑰簲 key 鏃跺皢鍏跺姞鍏ョ幇鏈夊幓閲嶉�杞藉垪琛�紱娌℃湁娣诲姞鍑�┖璧勬簮锛屼篃娌℃湁淇�敼娓叉煋鍙傛暟銆傝繖鏄�彲瀹氫綅鐨勪竴椤归�杞界己鍙o紝涓嶈冻浠ヨВ閲婃暟鍗冧笌涓や綅鏁板樊寮傘€�
- **闈欐€佽寖鍥寸籂姝�**锛歚GetLivePreloadEntries` 鐨� RVA 璧风偣涓� `0x1a5be60`锛屽叾鍑芥暟杈圭晫鍓嶇殑鐩存帴璋冪敤搴撳瓨鍒� `0x1a5c681` 涓烘�銆傛�鍓嶅緟鏌ュ垪琛ㄤ腑 `LiveTimelineData.GetWorkSheetBySheetIndexAndVariationId`锛坄0x1af2a20`锛夈€乣UmaAssetManager.LoadAssetBundle`锛坄0x1b5c300`锛夈€乣AssetBundle.LoadAsset`锛坄0x459a00`锛夈€乣PartEntry..ctor`锛坄0x1b7a930`锛夊苟闈炶繖涓€棰勮浇鍑芥暟鐨勭洿鎺ヨ皟鐢�紱涓嶈兘鎹��澹扮О棰勮浇鍑芥暟浜茶嚜瑙f瀽 worksheet 鎴栨墦寮€ Bundle銆傞渶瑕佸垎鍒�拷鏌ュ畠浠�殑鐪熷疄璋冪敤鏂广€�
- 浠嶇劧闇€瑕佸悓涓€娆$湡瀹� Live1176 鍔犺浇/鎾�斁璇婃柇纭��绱㈠紩鍊欓€夈€佸疄闄呭凡瑙傛祴鍔犺浇涓庡�璞℃暟閲忋€傛柊澧� Cyalume key 鏄�惁瀛樺湪銆佹槸鍚︿粠鎸夐渶鍔犺浇杞�负棰勮浇锛屼篃蹇呴』浠ュ疄闄呮棩蹇椾负鍑嗭紱瀹屾暣鐢昏川杩樺師涓庤繃浜�粨璁哄潎鏈�獙鏀躲€傜墿鐞嗐€佹櫙娣便€丠DR 鍙婂悗澶勭悊寮哄害淇濇寔涓嶅彉銆�
- 闅旂� `tmp/dof-focus-test-project` 鐨� D3D11 GPU/鏅�繁鍥炲綊 `tmp/stage1-inventory-gpu-20260925.log` 瀹屾垚锛孶nity batchmode return code 0锛涢�鑹层€丅loom/Diffusion銆丳ostFilm銆丷adial 鍜屾櫙娣辩敤渚嬪潎 PASS銆傝繖浠呴獙璇佺幇鏈夊眬閮� Shader/绠楁硶鍒嗘敮锛屾湰娆$湡瀹� Live 鐨勬柊棰勮浇鍜岃祫婧愬揩鐓ф病鏈夊湪璇ョ簿绠€娴嬭瘯椤圭洰閲屾墽琛屻€�
### GLM 閫嗗悜璧勬枡瀹¢槄锛坄D:\Projects\UmaTools\umaviewer_re`锛�
- 瀹為檯鐩�綍鍚嶄负 `umaviewer_re`锛屼笉鏄� `umaviewer\_re`銆傚凡闃呰� `REPORT.md` 骞舵娊鏌� `out/Gallop_Live_disasm.txt`銆乣out/Gallop_RenderPipeline_disasm.txt` 涓庡伐鍏锋簮鐮侊紱涓嶆槸鍙�浆杩版姤鍛娿€傝�宸ュ叿鐢ㄨ繍琛屾椂瑙e瘑 metadata + 瑙e寘 GameAssembly 鍋氭柟娉曞湴鍧€/瀛楁�/瀛楅潰閲忔敞閲婏紝浜х墿鍙�互鎸� RVA 鍐嶆牳瀵广€傛姤鍛婃墍鍒� `D678鈥�78D` 鏄�**纾佺洏涓婂姞澹� GameAssembly.dll** 鐨� SHA256锛岃繍琛屾椂瑙e寘鏄犲儚鐨� SHA256 涓嶅悓锛屼笉鑳芥妸浜岃€呭綋浣滈€愬瓧鑺傚悓涓€鏂囦欢銆�
- **楂樺彲淇′笖鏈夌珛鍗充环鍊�**锛氱洰鏍� `Director.GetLivePreloadEntries` 鐨� `0x181a5c1ee` 璋� `TryGetCharacterFlareCollisionPaths`锛屾垚鍔熷悗 `0x181a5c21c/22e/240` 涓夋�璋冪敤 `AddByOfficialPath`銆俶aster7 鐨� `Director.GetLivePreloadEntries` 鐜版湁 voice/cutt/part/cyalume/鑸炲彴鐩�綍锛屽嵈娌℃湁杩欐潯鎸夎�鑹查�杞介摼銆傚厛鏍稿�瀹樻柟璺�緞瑙f瀽鍜屼娇鐢ㄦ潯浠讹紝鍐嶈€冭檻琛ラ綈锛涘畠鏈€澶氭瘡瑙掕壊涓夐」锛�**涓嶈兘瑙i噴鏁板崈涓庝袱浣嶆暟宸�紓**銆�
- **鏋舵瀯缂哄彛**锛氱洰鏍囨湁 `MultiCamera.MakeRenderTexture`锛圧VA `0x1a7c710`锛夈€乣MultiCameraComposite.Initialize`/`AfterRenderingCallback`/`UpdateCameraDepthRenderOrder`锛坄0x1a7ad70/0x1a7a810/0x1a7b3e0`锛夊強 `MultiCameraFinalComposite`銆俶aster7 鐨� `MultiCameraComposite.cs` 鍙�湁鏋氫妇锛宍MultiCamera.Initialize()` 鐢熸垚绂佺敤鐩告満鑰屾湭寤虹珛鍚堟垚绾圭悊/鏉愯川閾撅紱`Director.InitializeMultiCamera` 鍙�槸鍒涘缓瀵硅薄銆傜湡瀹� Live 鏄�惁瑙﹀彂椤荤粨鍚堟椂闂磋酱鍜屼細璇濊瘉鏄庯紝涓嶈兘鎶娾€滃瓨鍦ㄦ柟娉曗€濈洿鎺ュ綋浣滄瘡甯ф墽琛屻€�
- **娓叉煋閾捐瘉鎹�**锛歚DofDiffusionBloomOverlayPass.Execute` RVA `0x1a19b90` 纭�湁妯″紡鍒嗘敮鍜� `_Bloom` 榛樿�榛戠汗鐞嗙粦瀹氾紱`PostImageEffectFeature.AddRenderPasses` RVA `0x1a342c0` 鍙�敤浜庢牳瀵逛富鐩告満杩囨护鍜� RT 浜ゆ帴銆侱XBC 鍏�紡鏄� Shader 灞傞潤鎬佽瘉鎹�紱鎶ュ憡涓�€滀竴甯у畬鏁磋矾寰勨€濇贩鍚堜簡璋冪敤鐐广€佷笉鍚屾ā寮忓垎鏀�笌鎺ㄨ�锛�**涓嶆槸鏌愪釜鐪熷疄 Live 甯х殑閫� pass 鎹曡幏**銆俶aster7 鐨� `PostImageEffectFeature` 鑷�敞灏氭湁鏈�疄鐜扮殑鐩�爣 pass锛屼笖鐢ㄤ簡 `ColorChainSchedule` / early resolve 绛夋湰鍦伴€傞厤锛岄』瀹炴祴杈撳叆/杈撳嚭鍚庡垽鏂�繃浜�紝涓嶇洿鎺ュ姞鍑� Bloom 寮哄害銆�
- **鏈�敱杩欎唤璧勬枡瑙e喅**锛氱洰鏍� UI 杩涘害鏁板瓧鐨勮�鏁板疄鐜般€佺洰鏍囧疄闄呮墦寮€/鐗╁寲璧勪骇鏁伴噺銆丩ive1176 鏌愬抚鏄�惁鍚�敤 MultiCamera/flare/鍚勫悗澶勭悊銆佺浉鏈� RT 鏍煎紡鍜屽畬鏁村彲瑙佺敾闈㈢殑鍚屽抚宸�紓銆傚綋鍓嶆病鏈� `tmp/live-diagnostics-*.jsonl` 瀹為檯浼氳瘽锛涙姤鍛婁笉鑳借瘉鏄庢暟鍗冩暟瀛楃殑鍙e緞鎴栫敾闈㈠凡缁忓�榻愩€�
- **涓嬩竴椤哄簭**锛氣憼 杩界洰鏍囧姞杞借繘搴︽洿鏂板嚱鏁板強璁℃暟鍙e緞锛屽苟閲� master7 瀹屾暣 Live 浼氳瘽锛涒憽 瀵圭収瀹為檯姝屾洸鐨勬椂闂磋酱鍜屽満鏅��璞★紝浼樺厛楠岃瘉骞惰ˉ MultiCamera/鐩戣�鍣�/鐏�厜缂虹幆锛堥檺纭�疄鍚�敤鑰咃級锛涒憿 缁欐覆鏌� pass 杈撳叆/杈撳嚭銆佺浉鏈鸿繃婊ゃ€佷簨浠堕『搴忓姞鍚屽抚鍙��娴嬭瘉鎹�紝鎺掗櫎閲嶅�鍚堟垚锛涒懀 鏈€鍚庡悓甯ф埅鍥炬牎楠屻€傜墿鐞嗐€佸凡纭��鏅�繁鍜� HDR 鐘舵€佷笉鍔ㄣ€傞潤鎬佸弽姹囩紪鏌ョ殑鏄�€滃彲鑳借矾寰勨€濓紝涓嶈兘浠f浛杩愯�鏃惰Е鍙戣瘉鎹�€�
### 2026-09-25锛欸LM 杩涘害璁℃暟鍙嶆眹缂栧悗鐨勮祫婧愭牴娉ㄥ唽淇��锛堥樁娈典簩锛屽緟鐪熷疄 Live 楠岃瘉锛�
- GLM 鐨� `<PreLoadAsset>d__35.MoveNext`锛圧VA `0x1b564c0`锛変笌鏈�湴浠g爜浜ゅ弶鏍稿�锛氳繘搴﹀垎姣嶆槸姣忎釜 root 缁� `SearchAB` 灞曞紑鐨� `loadItems.Count`锛岄噸澶嶄緷璧栧強缂撳瓨鍛戒腑浠嶈�鍏ワ紱涓嶆槸 Bundle 鍐� `LoadAsset` 鏁般€俶aster7 鐨勫垎姣�/閫掑�璺�緞鍘熸湰宸插熀鏈�悓鍙e緞锛屼笉鑳介€氳繃淇�敼 UI 鏁板瓧瑙e喅宸�窛銆�
- 鏌� `D:\Projects\UmaTools\umaviewer_re\out\global_disasm.txt`锛氱洰鏍� `LiveResourceRegister.RegisterDownload`锛坄0x1ab98b0`锛夊湪 `Director.GetLivePreloadEntries` 鍚庨€愯�鑹茶�鍙� `ReadCharaData`锛岃皟鐢� `CharacterResourceRegister.RegisterNormal`锛坄0x1ab2130`锛�/`RegisterMob`锛坄0x1ab1e60`锛夈€俙RegisterFolder`锛坄0x1ab1910`锛夐亶鍘� AbList.Values锛屼互 `OrdinalIgnoreCase` 鍖归厤璺�緞鍓嶇紑锛沗RegisterFaceRuntime`锛坄0x1ab15e0`锛夋敞鍐� driven-key銆乼ear銆乪ye-emotion 绛夊瓨鍦ㄧ殑璺�緞銆俙DownloadPathRegister.RegisterEntries`锛坄0x1c0a240`锛夊彇 Entry.Name锛宍RegisterPathWithoutInfo`锛坄0x1c0a410`锛夊綊涓€鍖栧苟鍘婚噸锛屾渶鍚� `ResolveEntries`锛坄0x1c0a710`锛夎В鏋愩€傚洜姝� master7 鍘熷厛鍙�敤 Director roots 鏄�槑纭�殑涓婃父缂哄彛銆�
- 鏂板� `Assets/Scripts/umamusume/Gallop/Live/LiveResourceRegister.cs`锛屾寜瑙掕壊娉ㄥ唽鍏冩暟鎹�腑瀹為檯瀛樺湪鐨勮韩浣撱€佸ご閮ㄣ€佸熬宸村墠缂€涓庡叡浜�〃鎯呰祫浜э紝鍏� Director 鍚庤�鑹诧紝鎸� Name 鍘婚噸銆傛櫘閫氳�鑹茬殑鐗瑰畾澶�/榛樿�澶淬€佷笓鐢ㄥ熬/榛樿�灏惧垎鏀�強 Mob 鐨勫浐瀹氬ご/灏捐矾寰勪緷鎹�笂杩� RVA锛涗粎瀵瑰綋鍓嶉€夋嫨鐨勮�鑹插仛鎵�弿锛屼笉铏氭瀯鏉$洰銆佷笉鍏ㄥ簱棰勮浇銆俙LoadLive` 鐜版敼涓虹敤姝ょ粨鏋滃惎鍔ㄥ師鏈� `PreLoadAndRun`銆傜洰鏍囧彲閫� idle motion 鏉′欢鍥犺皟鐢ㄦ柟浼� false 鏈�惎鐢ㄣ€�
- JSONL 鏂板� `resource_roots` 鍒嗙被锛圖irector銆佹櫘閫氳�鑹层€丮ob銆佽烦杩囪�鑹层€佺嫭绔嬫€绘暟锛夛紱`tools/summarize_live_diagnostics.py` 杈撳嚭鍒嗙被锛屽悓鏃朵繚鐣� `preload_counts`銆侀噸澶嶈�姹傘€佸疄闄呮墦寮€鍜岀紦瀛樺懡涓�€傜紪璇� `tools/check_live_compile.ps1` 閫氳繃锛屽彧鏈夋棫璀﹀憡锛涘悎鎴� JSONL 鎽樿�娴嬭瘯閫氳繃銆傜墿鐞嗐€佹櫙娣便€丠DR銆佸悗澶勭悊 Shader 涓庡己搴︽湭淇�敼锛涚敤鎴蜂富 Unity Editor 鏈�叧闂�/閲嶅惎銆�
- **灏氭湭楠屾敹**锛氭病鏈夌湡瀹� `tmp/live-diagnostics-*.jsonl`锛屾棤娉曞0绉版暟鍗冪骇鏁板瓧宸茬粡瀵归綈銆佹墍鏈夐�杞� Bundle 宸叉垚鍔熸墦寮€鎴� Live 鐢婚潰鏈夋彁鍗囷紱闅旂� GPU Shader 鍥炲綊涓嶈�鐩栨�鏂拌祫婧愭敞鍐屽垎鏀�€傞渶瑕佸湪宸叉湁 Editor 涓�惎鐢ㄦ爣璁板悗鍔犺浇涓€娆$洰鏍� Live锛岃�鍙栧悓涓€浼氳瘽鐨� `resource_roots` 鈫� `preload_counts` 鈫� `preload_complete` 鈫� 鎾�斁甯т笌缂哄け/澶辫触椤广€傛瘮杈冪洰鏍囦簩杩涘埗鍦ㄧ浉鍚屾瓕鏇�/瑙掕壊/鑸炲彴涓嬬殑鍒嗘瘝锛屽啀缁х画杩藉樊寮傦紱鑻ュぇ瑙勬ā缂哄け鍏堜慨鍏蜂綋璧勬簮璺�緞/涓嬭浇閾撅紝鑰岄潪涓婅皟鍚庡�鐞嗐€俙SearchAB` 闂�寘缁嗚妭鍜岀洰鏍� `ResolveEntries` 杩囨护/鎺掑簭浠嶆湁寰呯簿纭�牳瀵广€�
### 2026-09-26: Per-root preload accounting (stage 1/2)
- Cross-checked the supplied progress chain: target `PreLoadAsset` invokes `SearchAB` for each root at RVA `0x1b56cdf`; after `AcquireOne` at `0x1b56dff`, completed increments unconditionally at `0x1b56e07`. The denominator counts dependency-expanded **bundle requests**, including repeat requests and cache hits, not inner assets.
- Target `SearchAB` RVA `0x1b5d6a0` reads the semicolon-separated dependencies at `entry+0x58`, caches them at `entry+0x70`, and returns root plus dependencies. Master7 is substantially similar, but contains an extra `ResolveLaserCandidateIfMissing` fallback. Whether it triggers in this Live is unverified; do not remove it just to change the progress number.
- Target excludes an unready optional audio request during `loadItems` construction via `IsOptionalAudioEntry` RVA `0x1b5c210` and `UmaViewerDownload.IsAssetReady` RVA `0x1bab1a0`. The latter calls `TryGetReadablePath` RVA `0x1bab710`, which also checks pending download state and integrity metadata. It is NOT equivalent to `File.Exists`. Master7 currently has no such filter, so its denominator may be too high when optional audio is absent. This round does not guess at that behavior or change loading.
- Added opt-in `preload_root` JSONL records: root name/index, expanded request count, and repeated requests across roots. The summary lists the 20 largest contributors and checks the sum against master7's UI denominator. This is measurement, not a fabricated load count. C# compile passed with prior warnings; synthetic JSONL accounting passed. No real `tmp/live-diagnostics-*.jsonl` exists yet; numerical and visual parity are unverified.
- Next: load Live1176 once in the already-open Editor, inspect `perRootCoverage`, root sources, and missing bundles. Compare the same song/characters/stage against target root and `SearchAB` counts. Only then repair a specific missing root/dependency. Physics, DOF, HDR, and post-effect strengths were unchanged.
### Real Live preload validation: sessions 20260925-170518 and 20260925-170638
- The first opt-in real session is song 1176, stage 10148, 14 selected characters. It completed preload with 1,207 distinct roots (18 Director + 1,189 character roots), 1,388 unique dependency-expanded entries and **1,757 request attempts / UI target**. The per-root sum is exactly 1,757; 369 are repeated names across expansions. Outcomes: 1,373 bundle opens, 14 non-bundle loads, 370 handle reuses; no recorded missing files, load failures or exceptions in this preload. Count units are requests, not 1,757 distinct assets.
- A second real session is song 1001, stage 10102, 18 selected characters: 1,300 roots (20 Director + 1,280 character), 1,495 unique expanded entries, **1,882 request attempts / UI target**; 387 repeats. Outcomes: 1,473 bundle opens, 16 non-bundle loads, 393 handle reuses; no recorded preload failure. This independently confirms the request-count arithmetic, not target-binary parity.
- The Live1176 `preload_callback` inventory reports 2,690 loaded handles, which includes handles that were loaded before the counted preload; do not mislabel this snapshot as 2,690 opens by this session. Its sampled playback ran through frame 1830 (~30.5s), with `CameraTimeline1` and the `DiffusionDofBloom` mode in sampled frames. It does not cover reference frame 868 exactly or frame 3848 (~64s), nor does a pass log prove pixel equivalence.
- Result: the former two-digit progress was substantially due to missing selected-character resource roots, now corrected structurally. The counts are in the same *order of magnitude* as the user's observation of the binary viewer, but there is no exact same-config binary numerator/denominator or matched-frame visual test yet. Stage 1 resource-count measurement and stage 2 root-accounting portions have real evidence; full visual/render-chain acceptance remains open. Do not raise Bloom or change physics/DOF based on this count alone.
- Next checkpoint: obtain a target-viewer load count for song 1176/stage 10148 with identical 14-character selections, then capture master7 at frames 868 and 3848 and inspect actual active camera/RT/pass sequence and output. Keep registration as-is unless those measurements reveal a specific missing resource class.
### 2026-09-26: Render-pass execution and RT handoff checkpoint
- Native disassembly `D:\Projects\UmaTools\umaviewer_re\out\Gallop_RenderPipeline_disasm.txt` confirms that `DofDiffusionBloomOverlayPass.Execute` (RVA `0x1a19b90`) dispatches `DiffusionDofBloom` to `OnRenderImageDiffusionDofBloom` (RVA `0x1a1bbb0`), and calls `PostImageEffectFeature.SetSourceRT` at `0x181a1a661` in the temporary-output branch before `ExecuteCommandBuffer` at `0x181a1a691`. Target `RegisterPass` (RVA `0x1a35ac0`) contains conditional exposure and grading branches not yet present in master7's reduced feature. These are static branch/order facts, **not** proof of which branch executes at any particular Live frame.
- Audited master7's scheduling: `SourceSetup` sets the current camera target; DOF at event <=550 hands its temporary RT to the feature and at event >550 writes back to camera; radial and color each replace the feature's source RT; `FinalBlit` copies the remaining RT back and releases it. With color at 550 and a later DOF event, `ColorEarlyResolve` is a separate pre-DOF camera handoff. The current code contains no evident unconditional second DOF composite, but static inspection cannot rule out frame-specific duplicate composition elsewhere (e.g. URP post-processing or other renderer features).
- Added **opt-in, read-only** `render_execute` JSONL records to `LiveRuntimeDiagnostics`. These are emitted from the pass `Execute` methods **after command-buffer submission**, recording `renderStep`, pass event, input/output RT identifiers and IDs, camera, song, Live frame and Unity frame. Unlike the existing `render_pass` record, this establishes that the managed execution path ran; it still does **not** establish GPU completion or pixel equivalence. `ColorEarlyResolve` and final resolve have distinct labels.
- Activate only when ordinary Live diagnostics are enabled **and** `tmp/enable-live-pass-trace` exists (or `UMA_LIVE_PASS_TRACE=1` was inherited by the Editor). The marker is currently **absent**, so this addition does not alter the user's running playback. It samples only selected Live frames (defaults 308, 868, 3848, accepting a one-frame timing offset). After the Editor recompiles, run Live1176, stage10148 with the same 14-character configuration and capture frames 868 and 3848. Compare all `render_execute` entries for the same `unityFrame` and `camera` with `render_pass` records; only then investigate over-bright compositing. Do not increase or decrease Bloom merely from the old enqueue count.
- `tools/check_live_compile.ps1` passed (pre-existing warnings). No Shader, physics, DOF, HDR or effect intensity was changed; no isolated GPU or real Live playback was run in this round. Remaining: the binary viewer's same-configuration RT trace and matched screenshots, and runtime master7 execution data at 868/3848.
- The `render_pass` record now also includes URP's actual `cameraData.postProcessEnabled` flag (`urpPostProcessing`). The serialized Live prefab has `m_RenderPostProcessing: 0` on its camera entries, but only a same-frame runtime record can establish whether that remained off; do not infer URP Bloom absence from the prefab alone.
### 2026-09-26: third real Live1176 session and follow-up
- Inspected `tmp/live-diagnostics-20260925-172955-249.jsonl`: song1176/stage10148/14 character slots, 1,224 roots, 1,417 unique expanded entries, **1,803** requests; preload complete reports zero missing files and zero load failures. The 14 selections are not proven identical to the earlier 1,757-request session; the count difference must not be attributed to a regression without the character IDs/configuration.
- Across 543 `render_pass` records for `CameraTimeline1`, `cameraData.postProcessEnabled` is **false**; descriptor `R8G8B8A8_UNorm`, 941?488, event `BeforeRenderingPostProcessing`. This excludes URP's built-in post-process pass as a likely *second* composite for this session, not the custom feature or any other renderer feature. Existing `render_pass` data still only represents enqueue.
- There were zero `render_execute` records because the additional trace marker was absent for that run. Sparse `live_frame` samples include 60..2670, then 7230 and 9240, but not 868/3848. Since observed playback may advance about five Live frames per Editor frame, the execution trace now accepts samples within ?6 Live frames of each selected target and records the actual frame rather than claiming exact parity. C# compile passed; `tmp/enable-live-pass-trace` is now present for the **next** Live session. This opt-in logging does not change effect values or the renderer. Run/seek to ~14.47s and ~64.13s after recompilation; stop the playback once both points have been crossed, then inspect the resulting JSONL. Do not call the missing records a render failure.
### 2026-09-26: real submitted pass chains validated (session 20260925-173827-227)
- Real song1176/stage10148/14 slots produced **34 render_execute records across 8 camera/Unity frames**. At Live frames 302,308,867,865,870,874 the submitted chain is SourceSetup -> DofDiffusionBloomOverlay -> SimpleColorCorrection -> FinalBlit. At frames 3845,3850 it is SourceSetup -> DofDiffusionBloomOverlay -> RadialBlur -> SimpleColorCorrection -> FinalBlit. Revisits around 868 have different Unity frames and must not be mistaken for duplicate passes within one frame.
- All 8 groups match their scheduled pass counts (4 or 5), contain no repeated recorded step, have identical preceding output/current input RT identifiers, and end at the initial camera RT. All 279 enqueue records have URP built-in post-processing disabled. This is evidence against whole-pass repetition or lost radial output **in these sampled frames only**. Exact reference frames868/3848 and pixel luminance were not captured.
- Added execution-chain reporting to `tools/summarize_live_diagnostics.py`, grouping by Unity frame AND camera, checking counts, adjacent RT continuity and camera return. Validated against the actual 34 records and a deliberately broken-handoff fixture. Saved complete report to `tmp/live-diagnostics-20260925-173827-227-summary.json`. No runtime renderer changes in this round; no Unity compile/GPU regression needed for the offline reporting change.
- Continued native internal audit: `OnRenderImageDiffusionDofBloom` calls BlurBlt at VA0x181a1c240, DiffusionFilterProcess at0x181a1c2ae, conditionally CreateBloomTexture at0x181a1c3a7, and PostFilmBlit at0x181a1c5c4; the source follows this outline. Native PostFilmBlit submits/clears at0x181a4cfb3/0x181a4cfc9 and0x181a4d192/0x181a4d19c. The current source likewise clears after these internal submissions, so the outer submission does not by itself prove repeated Bloom commands. Internal shader variants/parameters and pixel output still require verification; this is not visual parity.
- Next investigation can proceed using the recovered assets/binary: trace Bloom/Diffusion/PostFilm enable flags and numerical parameters at these timeline points, and verify actual Shader pass selection and intermediate texture formats. There is no reason to request another identical outer-chain playback run. A future visual capture should include intermediate images and parameter evidence together.
### 2026-09-26:按 GLM 报告推进 MultiCamera 结构取证(诊断-only)
- 未直接实现未经验证的 MultiCameraComposite;先给实际 Live 帧增加只读字段 `multiCameraCount`、`multiCameraActive`、`multiCameraDetails`。
- 诊断现在可记录已创建的 MultiCamera 数量、时间轴是否在当前帧启用、每个相机的 enabled/depth/targetTexture,避免把“源码存在 MultiCamera”误判为“当前 Live 已参与最终合成”。
- 未改变物理、景深、HDR、Bloom、PostFilm、相机开关或屏幕材质;`tools/check_live_compile.ps1` 通过(仅已有 warning)。
- 下一硬门槛:用户在主 Editor 播放同配置 Live1176 一次,读取新 JSONL 的 `live_frame`;若 `multiCameraActive=1` 且相机无 target/composite 消费,则再实现有证据支持的合成路径;若始终为 0,则转查 Monitor/Particle/Spotlight 实际轨道。
### 2026-09-26:MultiCamera 真实 Live 取证结果
- 新会话:`tmp/live-diagnostics-20260926-003519-764.jsonl`。
- 11 个 `live_frame` 样本全部为 `multiCameraCount=2`、`multiCameraActive=0`;两个 MultiCamera 均 `off`、`depth=-3`、`targetTexture=screen`。
- 因此在本次 song1176/stage10148/14角色会话的采样帧中,不能把 MultiCameraComposite 作为当前画面缺失的首要修复项;暂不实现未经证实的合成器。
- 同一批样本稳定记录 `cameras=6`、`lights=0`、`particleSystems=0`、`videos=0`、`stageObjects=33`、`stageMapObjects=1466`、`renderers=846`。这使报告中的 Spotlight/Particle/Monitor/VolumeLight 缺口成为下一步更值得核对的方向,但计数本身仍不能证明目标同帧一定启用了这些对象。
- 下一步:审计当前舞台/时间轴资源是否有 particle、spotlight、monitor、light-shaft 数据,并在目标二进制中追对应资源消费入口;优先实现有当前 Live 数据和调用链双重证据的轨道。
### 2026-09-26:时间轴特效实际数据取证(等待用户运行)
- 扩展 `live_frame` 只读诊断:`timelineSheets`、`particlePrefabNames`、`spotlightPrefabNames`、`lensFlareGroups`、`monitorCameraEnabled`、`monitorPosTracks`、`monitorLookAtTracks`。
- 这些字段只读取已加载 `LiveTimelineData`/首个 worksheet,不实例化任何特效,不改变时间轴和画面。
- 编译通过。下一步需要用户在主 Editor 再运行一次同配置 Live;通过真实数据判断报告列出的 Particle/Spotlight/LensFlare/MonitorCamera 哪些确实属于当前 Live,而不是仅存在于类型定义或二进制通用路径。
### 2026-09-26:当前 Live 时间轴特效数据结果
- 新会话:`tmp/live-diagnostics-20260926-004117-663.jsonl`,8 个 `live_frame` 样本。
- 全部样本:`timelineSheets=1`、`particlePrefabNames=0`、`spotlightPrefabNames=0`、`lensFlareGroups=0`、`monitorCameraEnabled=false`。
- `monitorPosTracks=1`、`monitorLookAtTracks=1`,说明时间轴保留 MonitorCamera 轨道结构,但当前 Live 的纹理模式开关关闭,不能据此实现 MonitorCamera 捕获回路。
- 开头 1/4/7 秒出现 `particleSystems=104`,之后为 0;这更像开场/Flash 资源短时存在,而不是当前整曲缺失的 Particle timeline。当前数据没有 particlePrefabNames,不能将报告的 Particle 系统作为本曲首要修复项。
- 真实运行样本未支持在当前 Live 直接实现 Spotlight3d、LensFlare、MonitorCamera 或自定义 Particle 轨道;避免了无证据新增光源/特效。
- 下一步转向静态核对现有 `GallopImageEffectParameter`/timeline 后处理参数来源和 `PostFilmBlit` gate;若需同帧最终视觉确认,再请求一次带 pass trace 和参考帧的运行。
### 2026-09-26:后处理时间轴字段审计入口(诊断-only)
- 追加 `live_frame` 字段:`postFilm1Keys/2Keys/3Keys`、`bloomKeys`、`dofKeys`、`radialKeys`、`colorCorrectionGroups`。
- 目的:在继续改参数前确认当前 Live 的实际后处理轨道数量,区分“轨道存在但未启用”和“master7 缺少轨道消费”。
- 当前源码已确认 PostFilm 三层由 `AlterUpdate_PostFilm` 每帧评估并在 layer 2 后发布;ColorCorrection/RadialBlur 也有明确事件消费。尚未实现目标二进制中的 Exposure/Grading,因为当前 master7 没有同等时间轴数据结构和运行时参数证据。
- 编译通过;下一次真实运行需要用户操作,以取得轨道数量并继续定位过亮帧的参数来源。
### 2026-09-26:后处理轨道与实时参数采样
- 新会话 `tmp/live-diagnostics-20260926-004823-272.jsonl` 显示当前 Live 有 70/129/106 个 PostFilm key,Bloom 72,DOF 113,Radial 78,ColorCorrection 1;采样帧中 DOF/Bloom/Diffusion/ColorCorrection 持续有效,Radial 按时间轴间歇启用。
- 这证明当前 Live 确实依赖三层 PostFilm 和 Bloom/Diffusion/DOF,不应关闭整类效果;也说明过亮问题必须按实时数值和目标二进制混合方式定位。
- 诊断已追加 Bloom threshold/intensity/blur/DOF weight 与 Diffusion bright/threshold/blur/saturation/contrast 数值字段;不修改数值。
- 编译通过。下一硬门槛:用户需再运行一次,获取这些数值(尤其参考帧 868/3848 附近,如能覆盖),然后才能与目标二进制默认值/参数来源核对。
### 2026-09-26:PostFilm/Bloom 参数取证继续推进
- 用户上一轮日志覆盖了 Live frame 3848(64.132s),确认 BloomIntensity=6.69、Threshold=0.95、BlurSize=2、DofWeight=1;Diffusion 为 Bright=1、Threshold=.075、Blur=1、Saturation=1、Contrast=1,DOF/Bloom/Diffusion/Radial 全部有效。
- 追加只读字段:三个 PostFilm 的 mode、Validity、Power、ColorBlend;用于确认过亮帧是否由真实层叠加、Add/Multiply/Screen 模式或默认残留引起。
- `tools/check_live_compile.ps1` 通过。没有修改效果参数。下一次真实运行才需要用户操作,当前继续静态核对目标 PostFilm pass/Blend 与 master7 实现。
## 2026-09-26: autonomous continuation, provenance audit and corrections
This entry supersedes the overly broad exclusions in the preceding sampling notes.
### Corrections to prior conclusions
- `monitorCameraEnabled` was populated from `MonitorCameraSettings.IsEnabledTextureWidthRate`. It was NOT camera activation. Renamed the field to `monitorTextureWidthRateEnabled`; old logs cannot exclude monitor capture/compositing.
- `live_frame` formerly required an exact frame multiple of 30. Playback skipping those frames produced extremely sparse samples. Sampling now records the first observed frame in each 30-frame bucket (plus exact target frames), including backward bucket transitions. It still is not an exhaustive per-frame activation trace.
- Particle/Light counts are scoped to Director children, not the entire scene. The earlier session had 104 particles at 1/4 seconds, zero from 7 seconds in the observed samples. Neither result excludes particles elsewhere.
- PostFilm key counts prove track presence, not valid/enabled layers at a given time. The null camera targetTexture label likewise does not prove absence of SetTargetBuffers.
### Work performed without another user playback
- Exported all Bloom and three PostFilm tracks directly from the local game's son1176_Camera typetree to `tmp/live1176-effect-source.json` using master5's read-only asset utility. No Config.json was read.
- Added `tools/audit_live_bloom_source.py`: checks nine numerical fields against held-key intervals, uses the NEXT key's interpolation mode, skips curves instead of approximating them, and filters song identity. Six existing live_frame records in session20260926-005328-470 match all nine fields within 0.0001. Saved `tmp/live1176-bloom-source-comparison.json`. Injected-value mismatch and wrong-song negative controls pass.
- At frame3848 the bounding keys are3819/3972; next-key interpolation is None. Asset key3819 has threshold0.949999988, intensity6.690000057, blur2, weight1, diffusion threshold0.075000003, brightness/saturation/contrast1. Thus these sampled numbers were not invented intensity settings. This does NOT establish target-viewer evaluation parity, intermediate image correctness or absence of internal double composition.
- BloomBlendMode on this key is0 (Screen); master7 maps0 to `_BloomIsScreenBlend=1`. Added the runtime enum name to future diagnostic snapshots. Existing logs do not measure this uniform's actual draw-time GPU value.
- At the same interval PostFilm layer1 mode5/power4.159999847, layer2 mode5/power0.059999999; layer3 mode0 (disabled), although it retains a nonzero stored power. Counts alone were misleading.
- Replaced DofDiffusionBloomOverlayPass's reflection-based PostFilm dispatch with the concrete public typed method/ref arguments. Native direct-call evidence includes VA0x181a1c5c4 to0x181a4cad0. Retained null/error fallback and existing command ordering. Removes boxing/method discovery, NOT a claim of brighter/darker visual improvement.
- Removed an accidental literal-backslash-n diagnostic insertion from the disabled LegacyCompatibility timeline file. Active timeline accessors are retained.
- Investigated the missing movie/blend-factor transfer in Parameter.Setup but did NOT change it without target nested-method evidence; the renderer disassembly file does not contain this nested Setup implementation. Current color-only timeline bypasses UV movie tracks, so wiring texture fields alone would not restore movie rendering.
### Tests and remaining boundary
- `tools/check_live_compile.ps1`: passed (existing warnings).
- Isolated project, refreshed umamusume.dll: PostFilm timeline/GPU passed; DOF focus passed; foreground DOF80 GPU samples passed; Bloom/Diffusion24 extraction +9 Bloom +27 diffusion cases passed, including existing Bloom-once layer checks. These tests are NOT an end-to-end execution of the changed typed wrapper in a real Live scene.
- Initial PostFilm GPU invocation lacked UMA_POSTFILM_TEST_BUNDLE and failed its precondition. Retried with existing local tmp/postfilm-shaders.unity3d and passed. No shader assets downloaded.
- Added an explicit user-invoked menu `UmaViewer/Rendering/Capture current Live diagnostic frames (308,868,3848)`. It uses the actual currently loaded song/stage/cast, unlike the reference menu's default song1001 preset. It delegates to the existing settled off/on capture and restores playback/render-feature state afterwards. It is a same-session diagnostic capture, NOT a matched game-reference comparison. Not auto-invoked on the user's Editor.
- New capture entry compiled in the isolated Editor. Capture-contract test initially lacked its two reference-manifest environment paths; retry uses existing master5 live1001/live1176 manifests.
- Physics, DOF math, HDR state, Bloom/Diffusion strengths and radial unknown bits unchanged. Main Unity not closed/restarted/controlled.
- Next actual acquisition: in the loaded Live1176 choose the new diagnostic menu once. It saves six off/on images plus parameters/identity under captures/render-smoke. This is the first pixel-input/output checkpoint, not another full-song counter-only run. It does not yet capture individual internal Bloom textures. Before using game-reference images, verify exact identity and alignment.
- Final capture-contract retry: PASS, exit0 (tmp/continuation-capture-contract-retry.log). New menu was compiled; actual interactive capture remains unexecuted. All isolated Unity instances exited; main Editor remained running.
## 2026-09-26: capture identity failure fixed; session011553 examined
- User invoked diagnostic capture, but no captures/render-smoke directory was created. Editor exception points to LiveCapturePlan.Validate from BeginCurrentLiveCapture line106: Invalid reference character/costume identity. Builder retains full generic costume IDs with underscores; capture validation incorrectly allowed exactly one separator for the entire character+costume string.
- LiveCapturePlan.ParseCharacterIdentity now splits only at the FIRST underscore, validates numeric nonempty costume components, and retains the complete costume. Both validation and isolated automatic character selection use the same parser (the old selection also truncated costumes). Exact cast comparison remains strict; no costume normalization/guessing.
- Regression covers short and generic costume identities, invalid/empty/path-like values, serialization roundtrip, and rejection of a different costume. Runtime compile passed; isolated Editor compiled all changed editor sources and LiveCaptureContractRegression.Run passed, exit0 (tmp/capture-identity-regression.log). This verifies parsing, not successful real scene capture. No physics/DOF/render strength changes.
- Session live-diagnostics-20260926-011553-248 provides309 live_frame snapshots, showing the new sampling is substantially less sparse. Offline held-key audit compares300 snapshots:299 match all nine Bloom/Diffusion values; the sole mismatch is frame0 with initial/default parameters. This is not evidence by itself that the default was actually drawn, and it is retained in the report instead of silently excluded. Nine remaining frame snapshots are outside this held-key comparison coverage.
-30 submitted pass records form7 camera/frame groups; the existing chain checker reports no issues for these sampled outer chains. Still no pixel capture and no exclusion of internal composition faults.
- Correction to preceding note: PostFilm key3819 layer1 raw power4.16 is NOT the evaluated power at frame3848. The next key3874 selects Curve interpolation; actual sampled frame3844 power0.7138 and frame3870 power0.3087. Bloom's next key differs and selects None. Do not apply Bloom's held-key reasoning to PostFilm. At frame3844 recorded BloomBlendMode=Screen, film validity True|True|False, corroborating layer3 disabled in that sample.
- Required next user action: after editor script compilation, load Live1176 and invoke the same diagnostic capture menu. Successful completion must log [LiveRenderCapture] Completed and save six PNGs; an ordinary complete-song playback does not substitute for this capture. Main Editor was not controlled; only isolated verification was launched.
## 2026-09-26: successful real capture and off-screen preview UX
- Latest session captures/render-smoke/20260926_092541_878 completed all six PNGs and per-frame metadata (308/868/3848 off/on). Earlier incomplete folder is not the accepted set. User's "No cameras rendering" screenshot is explained by capture assigning the sole display camera's targetTexture to an off-screen RT; timeline is deliberately held for the 60-render stability gate. No Editor pause is requested by this tool. Completion is confirmed in Editor log, not inferred from the image.
- Added a utility preview showing the captured RT, target frame, off/on state and saved count, plus cancel/restore button and menu. Closing preview cancels. Added cleanup before script reload and guard against starting during delayed restoration. Game view itself still has no display-target camera during capture; this deliberately avoids injecting a second camera/composite pass into measurement. Preview UI has only compile validation, not interactive verification.
- Runtime compile passed; isolated Editor compiled the changed capture script; capture-contract regression passed exit0 in tmp/capture-preview-regression.log. No renderer/physics/DOF math changes; no need for another real acquisition solely to validate preview.
- Created comparison.png and pixel-summary.json in the successful capture folder. All source PNGs are1920x1080. Post-effects visibly add blue coloration/glow; pre-post frame868 already contains extensive white stage panels. Near-white(all RGB>=250) percentages off/on:308=6.92/4.08,868=24.46/18.34,3848=12.70/7.03. At868 any-channel>=250 rises30.43->36.54 percent. These are encoded output pixel counts, NOT linear luminance or proof of overexposure. White area alone cannot diagnose repeated Bloom.
- Off/on toggles the entire custom feature including DOF/color/film, not Bloom alone. Current real cast includes full0002_00_00 costumes; do not claim parity to reference manifests with different cast/costumes. Need internal-effect attribution and matched reference before changing strengths.
### 2026-09-26: stage 4, evidence-backed film source/enable synchronization
- Completed the local portion of a missing parameter-source chain: native RVA `0x1ae70c0` PostFilm four-corner BlinkLight sync, key brightness/adjustment, alpha-preserving RGB and next-sync hold are implemented and fixture/GPU tested. A real captured pre-post PNG film-only attribution demonstrates that the next-sync correction changes frame3848 output without altering any effect strength; it is **not** a full Live visual comparison.
- Created a reproducible SHA-pinned attribution fixture generator and isolated GPU experiment; kept existing physical simulation, DOF math and HDR settings intact. Capturing synced Live1176 windows at frames900/1240/3900, checking `filmBlinkLookup`/`filmColor0`, then comparing same-identity full frames is the next runtime validation boundary. Do not mark stage4 complete until the stage lookup/time-owner and complete rendering are checked.
- Previous basic GPU tests cannot establish full-stage lighting/RT parity. Native mixed ARGBHalf/default temporary RT formats and `Parameter.Setup`'s omission of `ColorBlendFactor` have direct disassembly evidence; do not alter these speculatively.
### 2026-09-26锛氶樁娈靛洓缁х画鈥斺€旂湡瀹炲悓姝ョ獥鍙e強涓夋€佸綊鍥�
- 瀹屾垚鍚屼竴浼氳瘽 900/1240/3900 鐨勭湡瀹� off/on 鎹曡幏鍜岃韩浠藉�鏍革紱Stage Blink RGB 鍚屾�鍦ㄨ繖涓変釜绋冲畾甯у潎鍛戒腑锛屽眰1鍦�1240鍔熺巼0銆佸眰3鍦�3900 mode=None銆傛棫鍙傝€冭�鑹�/鏈嶈�涓庢湰娆′笉鍚岋紝浠嶄笉鑳戒綔閫愬儚绱犻獙鏀躲€�
- 鎵╁厖 SHA 閿佸畾鐨� Film-only 瀹樻柟 Shader GPU 褰掑洜锛氫節涓�姛鐜囧強涔濅釜 Color0 涓庡厓鏁版嵁涓€鑷达紝钃濊壊鍙犲姞鏃犻渶鍋囪� Bloom 閲嶅�涔熻兘鍑虹幇锛屼絾瀹為獙娌℃湁瀹為檯娣卞害/Bloom锛屼笉鑳戒綔涓哄畬鏁存覆鏌撹繕鍘熻瘉鏄庛€�
- 鏂板�浠呰瘖鏂�敤 off/noFilm/on 涓夋€佽彍鍗曪紝闅旂� PostFilm 涓庡叾浠栭摼鏉★紱鑴氭湰缂栬瘧鍜岄殧绂婚噰闆嗗�绾﹂€氳繃銆備笅涓€姝ュ彧闇€涓€娆�**涓嶅悓浜庢�鍓嶅叚寮犲浘鐨勪笁鎬佺湡瀹為噰闆�**鏉ュ垽鏂�繃浜�殑褰掑睘锛涜浆鎹㈠抚鐏�壊鏃堕挓鍙婂悓韬�唤娓告垙鐢婚潰瀵归綈渚濈劧鏈�畬鎴愩€傞樁娈靛洓灏氭湭楠屾敹锛岀墿鐞�/DOF 淇濇寔涓嶅彉銆�
### 2026-09-26: three-state capture reliability gate
- Verified URP 14 begin/AddRenderPasses/Execute/Submit/end ordering against local package source and shared runtime parameter routing. Added a per-render `noFilm` callback-success gate and mode-only restoration, plus isolated Editor contract coverage. Runtime compile and `tmp/film-isolation-scope-contract.log` succeeded. No physics/DOF/render-strength changes.
- Stage 4 remains in progress. The nine-image real-Live three-state comparison is not yet acquired. The available six off/on frames and synthetic film-only GPU experiment do not establish full-chain or reference parity. Next required observation: one real run of the new `off/noFilm/on (900,1240,3900)` menu; do not repeat the completed off/on acquisition.
### 2026-09-26 Stage 4: Live1093 stage geometry/shafts branch
- User visual feedback selects Film-only as a useful target but not full-chain proof; actual Live1093 shows front orange translucency and reported floor depth fighting, while original has warm atmospheric shafts.
- Fixed a definite stage-ground-panel exclusivity ordering/depth-visibility bug; compile and isolated DOF regression pass, but Live1093 runtime resolution is **unverified**. Added opt-in stage-renderer/possible coplanar-pair snapshot at 20 s; use existing diagnostic workflow on next natural playback, not a new nine-frame capture request.
- Open: identify exact translucent object and floor mesh pair; check live1093 authored shafts/fog keys plus original pass flow. Do not suppress stage geometry or add speculative fog until those are evidenced. Stage 4 remains open.
- Isolated synthetic ground-panel regression passed (Unity exit0); this narrows one provable depth-writing bug but does not establish the user's entire floor z-fight is fixed. Native SunShafts pass/initialization confirmed; authored settings will be logged at next natural playback before any implementation.
### 2026-09-26 Stage 4: Live1093 natural playback interpretation
- Frame1201 confirms mirror/shadow coplanar **bounds**, not overlapping triangles. `_blinklight_ground_panel` is absent: its previous fix is not a Live1093 repair. Main ground meshes escaped the thin-AABB filter. The next natural playback can supply triangle-height and material/mirror bindings through the extended read-only diagnostic.
- SunShafts settings exist (intensity0.5, sunPower0), but active enable and RT flow remain unproven. Keep Stage 4 open; no speculative geometry shift, fog or strength changes.
+913
View File
@@ -0,0 +1,913 @@
# Live render restoration — 2026-09-20
## Goal (still active)
Restore the Live appearance of `D:/Projects/UmaTools/UmaViewer` in master7. Full visual parity is NOT established.
## Reference identity
Installed GameAssembly.dll SHA256:
`D678A0713257AF45A6CD499854A7C8A80CB5999F5CB79E320FD12E315B28B78D`
Matches master5 `tmp/reference-inventory-20260905.json`. Its previous D:/Download reference path therefore does not invalidate the GameAssembly evidence. Other files have not yet been re-hashed.
Reuse master5 `tmp/render-{analysis,call-map,disassembly}.txt`, `tmp/render-pipeline-api.txt`, runtime metadata and unpacked DLL. The original on-disk metadata was only 21 bytes; repeating a naive Cpp2IL run is not the next useful step.
## Baseline findings
- PostImageEffectFeature and DofDiffusionBloomOverlayPass were empty MonoBehaviours.
- GallopImageEffect only mapped Bloom into a non-global Volume without adding a collider. Diffusion never rendered via that adapter.
- Director cached the first effect camera without checking camera changes.
- Active UMA URP asset has HDR disabled. Do not silently change this before comparing reference buffer formats.
- master5 is not a finished solution: latest character GlobalLight writes were disabled after an A/B isolated washout, and several passes remain unimplemented. Do not copy its Director/config wholesale.
## Changes
- Reused master5 recovered Bloom/DOF/Diffusion pass and minimal dependencies; kept master7 existing metas. Added CameraData and GallopImageEffectParameter with source metas.
- Removed the uncompiled historical block from PostImageEffectFeature and dependencies on master5 LiveRenderConfig. Rendering enabled with a serialized switch for A/B.
- Feature only runs during play on the active Director presentation camera; excludes non-game/monitor/reflection cameras.
- Replaced Volume adapter with direct timeline -> recovered parameter routing. Explicit DecideDrawType is essential: Setup deliberately does not select a mode.
- Shared runtime state resets on subsystem initialization, Live initialize and Director destruction. No old camera LateUpdate re-publishes stale timeline values.
- Added Editor LiveRenderSetup.Install (idempotent, uses AssetDatabase); ran it successfully to register the feature in UMAUniversalRenderPipelineAsset_Renderer.
- Added LiveRenderSetup.Validate contract checks.
- Added tools/check_live_compile.ps1 from master5, fixed its extra-source discovery to respect nested asmdef/asmref boundaries. The unmodified script incorrectly included disabled Gallop.Legacy sources and reported duplicate types; that was a harness error, not a baseline project error.
## Verification
- Baseline and migrated runtime assembly Roslyn compilation pass (existing warnings only).
- Full Unity 2022.3.62f1 batch import/compile/install completed with exit 0: tmp/live-render-install.log.
- Unity batch validation completed with exit 0: tmp/live-render-validation.log; look for [LiveRenderValidation] PASS.
- Checks: idempotent registration, default None bypass, Bloom mode, unscaled intensity, DiffusionBloom mode, disabled-key reset, fresh shared state.
- `-nographics` checks cannot prove shader execution or pixel changes. NO rendered-image improvement claimed yet.
- Original overwritten source backups: tmp/live-render-baseline (including Director/GallopImageEffect and initial compile log).
## Next critical actions
1. Create/adapt a minimal Live capture harness. master5 Assets/Editor/LiveCaptureAutomation.cs and Assets/Scripts/umamusume/Gallop/Live/LiveFrameCapture.cs exist but depend on its expanded Director/config; do not copy blindly.
2. Run a real graphics device, load shader.a and a deterministic Live/characters/frame. Capture feature off/on and ensure recovered enqueue/execute/material diagnostics accompany output images.
3. Audit actual source/temporary RT formats, pass indices and source bindings against reverse evidence before tuning brightness.
4. Add missing DOF timeline dispatch/focus and other tracks only with reference-backed mappings. Current transplant supports backend modes but Director only routes existing Bloom/Diffusion track.
5. Investigate stage/lens flare/GlobalLight separately; do not mask lighting errors by lowering Bloom or disabling global light.
## Commands
```powershell
& tools/check_live_compile.ps1
# Launch helper processes with Start-Process -WindowStyle Hidden.
# Unity args for validation:
# -batchmode -nographics -projectPath D:/Projects/UmaTools/UmaViewer-master7 -executeMethod LiveRenderSetup.Validate -quit -logFile D:/Projects/UmaTools/UmaViewer-master7/tmp/live-render-validation.log
```
## Resumed after confirmed physics repair — 2026-09-20
Target images are actual-game video extracts under master5/captures/reference, NOT images
rendered by master5. Inspected live1001-dof-cuts-20260906/frame_001740.png and its manifest:
1920x1080, 60 fps, Live1001 / stage10102, cast 1068_00,1006_00,1030_00, then 1003_00.
The video offset is 1.5 seconds; named frame indices are timeline frame indices, not raw
video frame indices. Do not compare arbitrary cast/costume or unaligned camera cuts.
Found master7 missing even the serialized postEffectDOFKeys field and DOF timeline dispatch.
Added master5 DOF key schema (adapted abstract dataType), worksheet field, interpolated
DOF dispatch after camera and Bloom updates, and Director routing into the existing pass.
Disabled/missing tracks clear DOF instead of retaining the previous camera's state.
Focus uses master5's screenshot-tested inference: bit17=metric focal distance; otherwise
bit16=current camera look-at; otherwise character-mask head average. Failed positional
focus disables DOF instead of focusing at the common one-metre default. These flag names
are NOT proven reverse-engineered semantics. See master5/docs/LIVE_DOF_TIMELINE_2026-09-06.md.
Dedicated multi-camera DOF tracks, flags 18/19, and exact original interpolation semantics
remain unverified; main-track integration is not complete game parity.
The renderer now explicitly requests URP depth when the selected mode needs it.
Capture harness updated to reference cast and unique costume 00, 1920x1080, frames
1710/1732/1740/1755/3000; records focus/camera/actual cast diagnostics. Added opt-in menu
UmaViewer/Rendering/Capture current Live post-effects off-on. This operates on a loaded
Live and does not close the user's Editor. Off/on refers to the entire recovered feature,
not DOF alone. No automatic capture has been initiated in the user's existing session.
Standalone executeMethod capture still exits its own batch Editor after completion.
Validation: runtime and Editor Roslyn compilation passed. Extended state-contract checks
for composed DOF mode/depth/focus, not yet executed in Unity. No new rendered images or
pixel-equivalence result is claimed. PostFilm/color correction/other tracks are still pending.
Physics files untouched in this rendering pass.
## DOF full-screen blur follow-up — 2026-09-20
User reported intermittent full-frame blur after enabling DOF. Found a concrete depth
routing bug: the recovered Parameter.IsDepthTexture only covers temporary-disable and
overlay conditions; the URP adapter incorrectly treated it as the full depth requirement.
Ordinary DOF without overlays therefore did not necessarily request depth. Fixed the URP
adapter to request depth for all five DOF modes in addition to overlay depth requirements.
Updated contract checks to assert the adapter property, not the recovered property.
Also tracked which Camera owns the main DOF track and the cached look-at. Bypass DOF
(not Bloom/Diffusion) when rendering a different camera whose dedicated DOF track is not
implemented. Reject missing/nonfinite/behind-near/out-of-range positional focus, and
nonpositive normalized metric focus before it enters the CoC calculations. No replacement
focus distance or arbitrary blur multiplier is introduced. Transition warnings include
Live time, camera, key frame and attributes for diagnosis.
Runtime and Editor Roslyn builds pass. These changes address verified code defects, not
proof that every reported blurry frame is fixed. No screenshot validation was performed.
Native flag semantics, mult-camera tracks and shader/depth-buffer correctness remain to
be verified; multi-camera bypass is a conservative partial implementation, not parity.
## Startup blur isolation and playback time — 2026-09-20
- Added a runtime uGUI seconds readout in the existing right-hand progress-bar margin:
current seconds / total seconds, one decimal, updated in LateUpdate including scrubbing.
Text does not intercept pointer events; it follows the existing bottom-panel animation.
- Added `DOF: OFF` / `DOF: ON (test)` button in the left-hand margin. DOF defaults OFF
at subsystem registration. This is a diagnostic safety bypass, NOT a DOF parity fix.
- GallopImageEffect applies the user gate after copying timeline parameters, disabling
both DOF flags and selecting a non-DOF draw path without mutating authored parameters.
Bloom/Diffusion settings are preserved. Clicking re-applies the active camera adapter
immediately, including while paused; subsequent timeline updates honor the same gate.
- Runtime and Editor Roslyn compilation passed (runtime has existing warnings).
No in-Editor UI or rendered-image validation performed. Re-enter Live after Unity
imports the scripts so Awake creates the controls. If startup blur remains with DOF
off, next inspect Diffusion/Bloom composition instead of assuming a focus error.
## DOF source-parameter focus-mode regression fixed — 2026-09-20
Compared master5 and master7, including the actual parameter types rather than only
matching assignment statements. The recovered render pass is identical except for its
logging interval; the important difference is the timeline-to-renderer adapter:
- master5 writes `DofDiffusionBloomOverlayPass.Parameter` directly. Its focal-position,
focal-transform and focal-distance setters only write values.
- master7 writes `DofDiffusionBloomOverlayParam` before `GallopImageEffect` copies it.
Those setters ALSO select Position, Transform and Point, respectively.
- The migrated Director selected the intended mode FIRST, then assigned position,
null transform and finally focal distance. Thus ALL otherwise valid look-at/character
keys became Point keys. `Setup` faithfully copied the wrong mode to the renderer.
- live1001's dumped frame-0 key in master5/tmp/dof-keys-1001.json has attribute 0x50000,
focalPoint=1, focalSize=30 and spread=1.75. It is a look-at key under the existing
inferred flag mapping, not an instruction to focus one metre away. The previous
user's `target=point, focus=0.2m, near=0.8` log is consistent with this exact defect.
Fix: assign the resolved DofFocalType LAST, after all three focus-value setters. Keep
existing focus validity guards, units, blur strength and native preparation formulas.
No additional arbitrary focal-distance clamp or blur attenuation was introduced.
DOF is enabled by default again on a new Play session; the ON(test)/OFF A/B button
remains. Bloom/Diffusion and physics are unchanged by this fix.
### Executed regression validation
Added `Assets/Editor/LiveDofFocusRegression.cs`, available outside Play Mode from
`UmaViewer/Rendering/Validate DOF focus routing`. It invokes the production Director
callback, GallopImageEffect adapter and PrepareDofParam rather than reproducing the
production assignment logic in the test. Restores global runtime state afterward.
Executed with Unity 2022.3.62f1 in `tmp/dof-focus-test-project` (a separate minimal
project loading the actual compiled runtime and dependencies). The user's open editor
was not stopped or restarted.
- Before fix: failed with `expected Position, got Point`; log `tmp/dof-focus-before.log`.
- After fix: exit 0; log `tmp/dof-focus-after.log`. Passed startup camera look-at,
metric-distance focus, switching back at a camera cut, missing target bypass,
URP depth requirement, prepared focal depth/sharp interval, DOF-only toggle and
re-enabling while paused.
- Synthetic fixture results through actual PrepareDofParam: positional target 25m
produces focus 25m / sharpTo 40m, authored metric distance 8m produces focus 7.2m
with near=0.8 (existing native formula), and subsequent positional target produces
focus 4m. These are test-fixture values, NOT captured Live camera measurements.
- Runtime and Editor Roslyn compiles pass, with existing runtime warnings only.
This establishes and repairs a concrete migration regression, but does not constitute
pixel validation against the game. Full-scene captures, multi-camera DOF tracks and
native flag semantics remain separate work. The previous default-OFF mitigation is
superseded by this fix; a manually toggled OFF state can still be enabled with the UI.
## 2026-09-20 — foreground DOF sharp interval (live1001, ~50s)
The reference game image `master5/captures/reference/live1001-dof-cuts-20260906/frame_003000.png`
has sharp supporting performers, while `master5/captures/runs/20260906_131230_343_146781/frame_003000.png`
already has the same foreground overblur reported in master7. Copying master5's backend is not a fix.
Evidence:
- Key2963: quality=5 (background + foreground), focalSize=30m, foregroundSize=1,
smoothness=.5, character mask=7. Capture focal depth=40.81587m; supporting performer
depths include 29.23675m, 31.04587m, 34.40935m. Previous focus-mode fix remains intact.
- Extracted local `shader` bundle with UnityPy; disassembled the actual D3D bytecode
using Windows D3DDisassemble (no shader-source reconstruction assumed).
PostDiffusionDofBloom_Rich pass10 COCBGFG uses fragment blob19. Constants:
cb0[140]=_CurveParams; cb0[164].y=_dofForegroundSize; cb0[23]=_ZBufferParams.
Its alpha is max(saturate((curve.z-depth)*curve.x)*foregroundSize,
saturate((depth-curve.z)*curve.y)), clamped to 1. Both sides use curve.z.
- Native PrepareDofParam evidence matches recovered C#: curve.z=(focus+size/2)/(far-near).
Consequently this binary/backend + current game shader combination has no sharp band
on the foreground side: those 29–34m supporting performers receive full foreground CoC.
This proves the local contract mismatch; it does NOT prove the current game's own
CPU implementation uses the same contract as the older reference binary.
Correction:
- Add `_GallopDofFocalStart=max(0,(focus-size/2)/(far-near))` in PrepareDofParam.
- New Resources shader `RenderPipeline/LiveDofCoC` uses that near edge only for foreground.
Retain original background edge/slope, foreground strength, depth linearization,
depth UV scroll, source RGB, blur and composition. It replaces ONLY CoC generation
in the three modern quality5 paths (Dof, DofBloom, DiffusionDofBloom).
- Background-only mode still invokes the official shader. Old DOF remains untouched.
Material is cached per pass and disposed with the pass; no additional blit/RT.
- This is a reference-guided compatibility correction, not a claim of byte-identical
native reconstruction. No timestamp/song/character-specific runtime override.
Validation:
- Runtime Roslyn compile and Editor compile passed.
- Isolated Unity 2022.3.62f1 GPU run, production PrepareDofParam -> BlitDofCoc -> shader
-> floating-point readback: 80 samples passed, exit0 (`tmp/dof-foreground-gpu.log`).
Includes normal/reversed Z, zero-width sharp band, foreground strength0, preserved RGB.
With frame3000 parameters: CoC at 5m=1, 15m=.5306, 25m=.0410,
29.24/31.05/34.41/40.82m=0, 65m=.4475, 90m=1.
- Test menu: `UmaViewer/Rendering/Validate DOF foreground (GPU)` outside Play Mode.
- Still requires visual confirmation in the user's running Live around 49–53 seconds;
synthetic GPU readback does not establish a full-frame match (depth coverage/UVs,
transparent stage props, lighting and other post effects remain separate concerns).
## 2026-09-20 — PostFilm color timeline / native Overlay integration
Scope: restore the three main-sheet color PostFilm tracks without modifying the
accepted physics or DOF algorithms. This is not a claim that all remaining effects
or full-frame game parity have been achieved.
Evidence and implementation:
- Live1001 main camera has 162/72/12 keys in postFilmKeys/postFilm2Keys/postFilm3Keys.
They were not serialized/dispatched in master7. Added the list wrapper, worksheet
fields, timeline evaluation and Director -> existing ScreenOverlay forwarding.
- Key field order follows the local game bundle TypeTree (including BlinkLight fields).
- Reference binary LiveTimelineKeyPostFilmData.isInverseVignette RVA 0x1af62d0 tests
attribute 0x100000. 231/246 inspected keys use it. This selects inverse-vignette
shader passes, NOT depth disable. Native SetupPostFilmUpdateDataInfo RVA 0x1ae70c0
confirms raw power, signed depthPower, linear parameter interpolation and direct
RollAngle forwarding. The color layout is All=(0,0,0,0), TopBottom=(0,0,1,1),
LeftRight=(0,1,0,1), Four=(0,1,2,3).
- Unlike master5's approximation, no arbitrary power multiplier/cap or new vignette
shader is used. The existing official PostBlit_Rich/ScreenOverlay chain owns blend
math, depth mask, inverse pass and three-layer composition.
- Evaluates in cached objects. Missing, disabled and pre-first-key tracks reset to
None; seeks use the existing key lookup/interpolation. A zero/invalid scale falls
back to 1 to prevent invalid reciprocal shader coordinates.
- No additional renderer feature or duplicate full-screen postprocessing chain.
Validation:
- tools/check_live_compile.ps1: runtime compilation passed (existing warnings only).
- LivePostFilmRegression timeline PASS in isolated Unity 2022.3.62f1: worksheet JSON,
four color mappings, unclamped power, signed depth, exact cuts, reverse seek,
absent/disabled tracks, movie bypass and zero-scale guard.
- Actual locally extracted game PostBlit_Rich shader GPU readback PASS:
Add (0.2,0.3,0.4)+(0.4,0.2,0.1)*0.5=(0.4,0.4,0.45);
explicit COLOR_ONLY on/off produced the same result, so the recovered keyword
adapter was deliberately left unchanged. First/later inverse passes both changed
the spatial mask; ordered Add then Lerp returned (0.2,0.2,0.225).
Log: tmp/postfilm-final-gpu.log, Unity exited successfully.
- The current game shader's _PostFilmIsWithoutDepth=1 suppresses the color contribution
in the tested Add variant. Keep native IsEnableDepth=true; depthPower=0 is sufficient
for these synthetic color tests. Do not reinterpret inverseVignette as this flag.
- CPU menu: UmaViewer/Rendering/Validate PostFilm timeline. GPU test is deliberately
batch-mode-only; UMA_POSTFILM_TEST_BUNDLE must point to the user's locally extracted
shader bundle. No proprietary shader bundle is copied into Assets.
Remaining limits / visual acceptance:
- Re-enter Live after compilation so the added worksheet fields deserialize anew.
- UV movie tracks conservatively bypass (movie texture/time ownership is not wired).
BlinkLight-synchronized colors currently use authored key colors, and loop metadata
is not executed here. All inspected Live1001 tracks are color mode with no loops.
- Uses the main camera worksheet; dedicated multi-camera PostFilm tracks remain pending.
- Actual game screenshot parity, Bloom/diffusion strength, sun shafts, lens flares and
other effects still need separate inspection. GPU tests validate this adapter, not
all effects or an entire real Live frame.
- Combined isolated regression also passed after the PostFilm integration:
LivePostFilmRegression CPU/GPU, LiveDofFocusRegression and
LiveDofForegroundRegression (80 GPU samples), with successful Unity exit.
Log: tmp/post-effects-regression.log.
## 2026-09-20: radial blur restoration (not DOF)
Implemented:
- Deserialize radialBlurKeys using the shipped TypeTree field order; reuse existing
timeline interpolation and playback filtering. Director publishes a value-type
sample after PostFilm; absent/off/pre-first/disabled tracks clear the effect.
- RadialBlurPass uses the locally loaded Cygames/ImageEffects/RadialBlur shader,
not a substitute blur. Native OnRadialBlur RVA 0x1a3d340 evidence gives five
blur/composite pairs (0/1, 2/3, 4/5, 6/7, 8/9), direct downsample divisors,
ping-pong iterations, original full-resolution source for final composition,
signed 0.0001 area-difference guard, raw strength, normalized depth distances,
rectangle bounds and expansion by blend length. Roll uses -degrees*Deg2Rad.
- Same feature owns SourceSetup -> Dof/Diffusion/Bloom/Overlay -> Radial -> FinalBlit.
DOF setup failure no longer suppresses an independently valid radial pass.
Registration evidence: native RegisterPass accesses the DOF/tilt/radial fields
in that order around RVA 0x1a36379 / 0x1a364ac / 0x1a365a0.
- Lazy material lifetime, matching active presentation camera only, explicit depth
request, keyword reset, release of temporary textures, descriptor format retained.
Malformed downsample/iteration values are guarded; iterations capped at 32 (actual
Live1001 uses 1/2, divisors 2/3/4). Physics/DOF algorithms were not modified.
Evidence and tests:
- tmp/radial-native.txt, radial-param.txt, radial-execute.txt, feature-register.txt,
radial-program-*.txt are local disassembly evidence; none are new bundled assets.
- Actual Live1001: 28 keys, onset frame729 (12.15s), mode2 power0.5 depthBack38;
off frame988; mode1 impact frame3965 (66.083s). Runtime compile passed.
- Assets/Editor/LiveRadialBlurRegression.cs tests worksheet loading, discrete
cuts/seeking, missing/disabled tracks, pass mapping, signed area guard, depth
normalization, rectangle expansion and parameter copying. Optional locally
exported UMA_RADIAL_TEST_KEYS fixture validates all 7901 frames of Live1001.
- Isolated Unity GPU test uses actual game shader and production Render method:
zero-strength identity; all five modes change a stripe pattern with finite output;
multiple iterations/downsampling; normal and reversed-Z near-depth protection
(maximum error 5.96e-8), far-depth blur, rectangle overriding depth protection,
and stale keyword/uniform reset. Shader bundle supplied only by environment path
UMA_POSTFILM_TEST_BUNDLE, never copied into Assets.
- Combined suite PASS: radial CPU/real keys/GPU, PostFilm CPU/GPU, DOF focus,
DOF foreground (80 GPU samples). tmp/radial-final-regression.log, Unity successful
exit. The minimal isolated test project still logs existing Burst runtime folder
and DOTween module warnings/errors on import; no test or C# compilation failures.
Known limitations (do NOT claim complete visual parity):
- Depth bit16 is inferred from real track data; original key accessors were not
present in the inspected reference binary. Bits17/18 are unresolved: frame5989
contains bit18 and a nonzero rectangle without bit17. To avoid shipping a guessed
activation rule, timeline rectangle enable/expand are currently false. The native
rendering implementations are present and GPU tested, ready for verified mapping.
- Dedicated multicamera radial tracks and complete real-Live capture comparison
remain pending. Synthetic shader tests are not whole-frame acceptance.
- Newly added serialized fields require re-entering Live after editor compilation.
- Restore process must leave the user's main Unity editor running; tests above use
only tmp/dof-focus-test-project and do not restart the main editor.
- Follow-up source-ownership audit: radial-only setup uses the current configured
render event rather than a stale DOF pass event. For events >550, radial reacquires
camera color after DOF's direct writeback; radial output always enqueues FinalBlit.
This closes the late-event missing-writeback/resource-retention case without
modifying the DOF algorithm. Runtime compile rerun passed.
- A thread heartbeat named "Live 渲染持续还原" (id live) was enabled at the user's
request for continued unattended work, every 30 minutes. It should read this
document before progressing and notify only meaningful results or required action.
## 2026-09-20 heartbeat: Bloom / diffusion shader-contract audit
Scope and result:
- Audited local native CreateBloomTexture (RVA 0x1a18aa0) and
OnRenderImageDiffusionFastBloom (RVA 0x1a1c8b0), together with the locally
extracted FastBloom, PostBloom_Rich and PostDiffusionBloom_Rich DXBC.
- No evidence from this stage justifies changing the current Bloom strength or
replacing diffusion with a generic blur. Runtime rendering, physics and DOF
algorithms are unchanged. This is a verification stage, not a visual upgrade.
- Positive-radius Bloom deliberately uses a neutral first reduction (threshold=0,
intensity=1). FastBloom pass2 subtracts threshold per tap; pass3 applies intensity.
Both nine-tap kernels have weights .225, +/- .15, +/- .11, +/- .075,
+/- .0525, summing to 1. Applying threshold/intensity in all three passes would
incorrectly suppress highlights. Current production ordering matches this.
- Zero-radius Bloom pass1 performs max(average4(source)-threshold,0)*intensity.
- Bloom composition is Add: S+B*w, or Screen: 1-(1-S)*(1-B*w), selected by
_BloomIsScreenBlend. There is no saturate in these native shader expressions;
tests therefore include source RGB >1 and intensity >1, not only LDR colors.
- Diffusion first composites Bloom into C, then computes component-wise
max(C,max(0,C*C+R-R*C*C-threshold)), where R is the separately blurred RGB.
Color controls follow in brightness -> saturation -> contrast order; luminance
coefficients are (.2125,.7154,.0721), contrast pivots around .5. This is not a
simple interpolation between sharp and blurry images.
- Uniform mapping confirmed: _ColorParam=(bright,saturation,contrast,threshold).
Existing adapter matches; no arbitrary gamma conversion or artistic multiplier
was added based solely on screenshot impressions.
Persistent validation:
- Added Assets/Editor/LiveBloomDiffusionRegression.cs (isolated batch mode only).
Uses actual shipped shaders from UMA_POSTFILM_TEST_BUNDLE, not replacement
shaders; restores touched shader globals, destroys RTs/materials, unloads bundle.
- 24 extraction checks (zero-radius and two-axis paths), 9 Add/Screen composition
checks including on/off transition, 27 diffusion/color-order checks all PASS.
Expected values are independently calculated from DXBC, RGB tolerance .00015.
- tools/check_live_compile.ps1 passed; tmp/bloom-audit-compile.log.
- Combined isolated suite passed and Unity exited successfully:
tmp/bloom-audit-regression.log. Includes the new 60 shader-contract checks,
radial 7901 actual-key timeline samples and GPU suite, PostFilm timeline/GPU,
DOF focus and 80 foreground GPU samples. Existing minimal-project import/Burst
warnings remain outside this audit; do not call the entire console error-free.
- Local-only evidence: tmp/create-bloom-audit.txt, tmp/diffusion-bloom-audit.txt,
tmp/FastBloom-pass*-audit.txt, tmp/PostBloom_Rich-pass*-audit.txt,
tmp/PostDiffusionBloom_Rich-pass*-audit.txt; extraction helper
tmp/disassemble_bloom_audit.py. No proprietary bundle was added to Assets.
Limits / next work:
- These GPU tests verify shader equations using constant-color HDR fixtures; they
do NOT execute the full production ScriptableRenderContext chain, validate blur
radius on a real scene, check complete camera/RT ownership, or demonstrate
screenshot parity. Real Live captures and spatial-response validation remain.
- No new claim about radial key bits17/18: their timeline mapping remains disabled.
- Do not retune established physics/DOF to compensate for unmeasured differences.
Next useful work is real-Live capture plumbing or remaining-light-effect evidence.
- Main Unity editor and unrelated physics-test editor were left running. Isolated
validation completed; no isolated Unity test remains running at this checkpoint.
## 2026-09-20 heartbeat: missing Live1176 color curves, verified LUT foundation
Actual-asset inventory (local TypeTrees, not inferred from screenshots):
- Live1001 has no colorCorrectionDataLists or preColorCorrectionDataLists.
- Live1093 has one color-correction group with three keys (0,157,8287), all disabled.
- Live1176 has one group with SIX ENABLED simple/non-selective keys at frames
0,836,3819,5294,5597,7066. Master7 previously had no matching worksheet field,
so these authored RGB curves could not survive deserialization or affect rendering.
This establishes a missing effect for Live1176; it does not explain Live1001 gaps.
- Live1176 also has authored distance/height fog and tilt-shift keys. A generic
bloom-strength increase is not a substitute for restoring these independent tracks.
Evidence and implementation (preparatory, NOT enabled in the render chain yet):
- Added LiveTimelineColorCorrectionData.cs and the worksheet colorCorrectionDataLists
field. Unlike master5's placeholder, the key inherits LiveTimelineKey, not
LiveTimelineKeyWithInterpolate: the actual keys contain NO interpolateType,
curve or easingType fields. No guessed cross-key interpolation was introduced.
- Added ColorCorrectionCurveLut.cs: a reusable, disposable 256x4 linear ARGB32
no-mipmap texture, R/G/B grayscale rows at y=.125/.375/.625 and an unused zero row.
Texture/pixel storage is reused on update; there is no per-frame allocation loop.
- Native ColorCorrectionPass evidence: GetCurveTime RVA 0x1a10820 uses i/255;
FloatToByte RVA 0x1a107e0 clamps then truncates(value*255), NOT rounds;
MakeGrayColor RVA 0x1a10ad0 replicates this byte into RGB with alpha255;
SetupInstance RVA 0x1a10e70 allocates 256x4 texture format5, mip=false, linear=true;
UpdateTextureParameter RVA 0x1a11770 clamps each source/target curve sample,
blends samples before byte quantization, and fills row offsets0/256/512.
RIP constants verified at VA 0x182291b64=1 and 0x182291d90=255.
- The shipped ColorCorrectionCurvesSimple shader samples those three rows and then
applies saturation about luminance (.2126729,.7151522,.072175), preserving alpha.
PostFilm mask power0 gives full correction, not disabled correction. Mask variants,
advanced depth curves, selective correction and stencil integration remain pending.
- No render pass or timeline callback was registered in this stage. This deliberately
avoids guessing the ordering relative to prepare-screen/mask passes. Runtime visual
output, physics and DOF algorithms remain unchanged. Do not describe this as a
completed color-correction restoration.
Validation:
- Assets/Editor/LiveColorCorrectionRegression.cs reads actual six-key Live1176 fixture
through JsonUtility and verifies key count, cut frames, enable flags and authored
AnimationCurve tangents. It tests byte truncation, row packing, pre-quantization
blending, texture reuse/disposal/recreation, plus 54 actual shipped-shader GPU
checks (six keys x three saturations x three input colors, including out-of-range
HDR channels and nonopaque alpha).
- First test run exposed a TEST ORACLE error: Texture2D.GetPixelBilinear's CPU lookup
did not match D3D's normalized texel-center sampling. Replaced the oracle with
explicit x=u*256-.5, clamped indices and exact row lookup. Did not weaken the
tolerance or alter native LUT construction to make the test pass.
- Runtime compile passed: tmp/color-lut-compile.log. Corrected full isolated suite
passed: tmp/color-lut-regression2.log, Unity exit successful. Includes color LUT54,
Bloom/diffusion60, radial real-key7901+GPU, PostFilm, DOF focus+foreground80.
- Actual fixture is local-only tmp/color1176-worksheet.json, supplied via
UMA_COLOR_TEST_KEYS; shader bundle still only UMA_POSTFILM_TEST_BUNDLE, not Assets.
- Local evidence: tmp/color-curve-utils.txt, color-gray.txt, color-update-texture.txt,
color-setup-instance.txt, ColorCorrectionCurvesSimple-pass0-audit.txt,
color-native-types.txt and register-full-color-audit.txt. Investigation helpers:
tmp/inspect-color-correction.py, inventory-camera-tracks.py, disassemble-color-audit.py.
PostFilmInspect/Program.cs now filters ColorCorrection; radial version preserved
as Program.radial-backup.txt. Native metadata lacks original color timeline methods.
Next concrete work:
- Trace native RegisterPass color-correction ownership/order and its PrepareScreenMakeup
masks before registering a simple-mode pass. Decode ApplyParameter/Execute and
selective/advanced bypass conditions. Use six real Live1176 keys as a regression.
- The new helper is ready to be reused by that pass; do not rebuild LUT every frame
when the selected discrete key has not changed. Main-track/simple mode can be
delivered separately from advanced/multicamera paths once ordering is established.
- Full Live captures remain absent. No screenshot parity claim; no changes to the
confirmed physics/DOF or the unresolved radial rectangle flags. Main editor kept
running, and isolated validation has finished with no test process left active.
## 2026-09-20 heartbeat: color-pass order/RT evidence and spatial LUT regression
Native dispatch and ownership evidence (not merely feature field order):
- Extended tmp/register-full-color-audit.txt through RVA 0x1a38670. The previous
0x23b0-byte dump ended inside RegisterPass; that was not the full function.
- Updated the local LibCpp2IL inspection to resolve actual native field offsets
via GetFieldOffsetFromIndex; tmp/color-native-offsets.txt now records them.
PostImageEffectFeature fields: DOF +0x50, radial +0x60, exposure +0x80,
color correction +0x88, prepare-last +0x90, grading +0x98.
- Normal RegisterPass path loads DOF at RVA 0x1a364ac, radial at 0x1a36694,
exposure at 0x1a36a64, color at 0x1a36b5b, prepare-last at 0x1a36c52.
Color's reflected setup invocation is 0x1a36c1f, conditional successful append
is 0x1a36c3e. This establishes conditional registration after DOF/radial/exposure
and BEFORE prepare-last/grading, rather than guessing from metadata field order.
- Separate feature IsSimpleMode (Parameter +0x7e0, NOT color correction mode0)
branches at 0x1a36063 to 0x1a370b8: color/grading-only registration path.
Do not confuse the two meanings of simple mode or assume all passes always run.
- ColorCorrectionPass.Setup RVA 0x1a11570 reads Parameter.ColorCorrection +0x5d0,
checks enable, updates LUT, and sets its OWN RenderPassEvent from +0x6c8.
Its nested Parameter.Default RVA 0x1a243c0 writes event550 at 0x1a245de and
clears MaskType/MaskPower. Event is not inherited from DOF in the native pass.
- Execute RVA 0x1a0fcd0 explicitly compares event with550 at 0x1a10109:
<=550 hands the temporary result back via Feature.SetSourceRT at 0x1a101c5;
>550 blits to the camera then releases its temporary (0x1a10167/0x1a10177).
A future integration must preserve preceding radial output and handle late-event
camera ownership; blindly copying radial's ResetSourceRT would discard its result.
- Evidence files: tmp/color-setup-dispatch.txt, color-execute-audit.txt,
color-default-audit.txt, color-native-offsets.txt, register-full-color-audit.txt.
These are local binary analyses, not proof that a complete scene already matches.
New spatial GPU test found an actual LUT defect missed by constant swatches:
- Extended Assets/Editor/LiveColorCorrectionRegression.cs with 257x9 independent
RGB ramps, varying alpha and HDR endpoints, using all six real Live1176 curves.
Tests curves alone and actual PostBloom_Rich -> ColorCorrectionCurvesSimple
composition for Add/Screen and saturations0/1/1.4, not CPU-only simulated passes.
- Default Texture2D anisotropy was1; this project's current quality level uses
ForceEnable. Under that setting a data-LUT lookup acquired spatial dependence
on neighboring scene colors. Example real-key frame0: red input .003125 should
map to0, but default anisotropy yielded .002655089 in the shipped GPU shader.
Disabling anisotropy on the LUT alone fixed the discrepancy without changing
curves, shader math, QualitySettings, or numeric tolerance.
- ColorCorrectionCurveLut now explicitly sets anisoLevel=0. This is a local
data-texture sampling safeguard justified by the GPU result; it is NOT claimed
to be an additional assignment recovered from native SetupInstance. Native
SetupInstance doesn't show this explicit override in the inspected path.
- Test forces AnisotropicFiltering.ForceEnable and restores the prior setting in
finally. It asserts the production LUT opts out; no test-only override hides
the production setting. RGB tolerance stays .0015 and alpha is checked too.
- The first chain oracle incorrectly assumed Bloom writes alpha1. Local DXBC
confirms PostBloom_Rich Add/Screen operates on xyzw, including alpha. Corrected
the independent oracle; the curves pass preserves that composed alpha. Runtime
Bloom/DOF code was NOT changed to accommodate the test.
Verification:
- tools/check_live_compile.ps1 PASS, tmp/color-spatial-compile.log.
- Final combined isolated GPU run PASS, tmp/color-spatial-final.log:
124902 RGBA pixel checks and7058 samples demonstrating that moving curves before
additive Bloom changes the result, plus previous54 curve swatches, Bloom60,
radial7901 timeline samples/GPU, PostFilm timeline/GPU, focus/foreground80.
- Earlier failing diagnostic logs retained: color-spatial-regression.log,
color-spatial-regression2.log, color-spatial-aniso0.log. Do not mistake these
for the final result. No tolerance loosening or shader retuning was used.
- These remain small GPU fixtures, not full production render-context tests or
real-Live screenshot parity. Color correction still has NO runtime timeline
callback/pass registration; do not tell the user it is already visible.
- Next: implement main-camera simple/nonselective color dispatch with cut/seek/reset
tests and native ordering/RT handoff now established. Authored blendCurve timing,
advanced/depth/selective modes, masks/stencil, and multicamera require more evidence.
Full real-Live capture work remains outstanding. Physics, DOF and unresolved
radial rectangle timeline flags were not changed; main editors left running.
- Final isolated editor exited successfully (return code0); no isolated test process remains at this checkpoint.
## 2026-09-20 — Simple color correction connected to runtime Live chain
Scope and evidence:
- Implements the simple/nonselective/unmasked main-camera subset established by
the previous native RegisterPass/Setup/Execute audit (see preceding section).
Color keeps native default event550. Default ordering is DOF/Bloom/overlay ->
radial -> color -> final camera resolve. This is no longer just a LUT fixture.
- New LiveColorCorrectionTimeline evaluates one authored group with discrete cuts.
Uses active camera worksheet; absent/disabled tracks, pre-first time, invalid time,
advanced/selective/masked keys or multiple groups bypass rather than guess.
No blendCurve time interpolation was invented. Its meaning remains unresolved.
- LiveTimelineControl dispatches sampled state and Director subscribes/unsubscribes
beside radial. Runtime reset and parameter shallow-copy include color state.
Feature global IsEnable defaults true, so color readiness is independent of DOF
readiness. Existing global rendering/active presentation camera gates still apply.
Implementation:
- New SimpleColorCorrectionPass owns a reusable linear RGB LUT and native kind159
material. Curve-reference changes (cuts, seeks, re-enable) rebuild LUT; stable
curves and saturation-only changes avoid re-upload. Disposal releases LUT/material.
Authored curves are treated immutable; editing curve keys in-place at runtime is
not supported by this cache contract.
- Production CommandBuffer draw explicitly sets LUT/saturation/mask-power0, disables
mask keywords, sets neutral stencil, then unbinds LUT. It preserves prior source
instead of discarding radial output. Unsupported/missing shader bypasses the pass.
- Color-only source/final passes run at550. For custom existing-effect events later
than550, a color resolve at550 restores camera ownership before late DOF/radial;
this avoids losing correction when radial resets source, or retaining a stale temp.
GetColorChainSchedule exposes the actual production scheduling policy to tests.
- Fixed compiler namespace collision (Gallop.Math vs System.Math) during integration.
Physics and DOF algorithms, Bloom constants and radial bit17/18 flags unchanged.
Verification:
- tools/check_live_compile.ps1 PASS: tmp/color-integration-final-compile.log.
- tmp/color-integration-gpu.log PASS: timeline six-key cut/backseek/cache/disposal,
54 GPU swatches and124902 spatial RGBA checks now invoke the PRODUCTION
SimpleColorCorrectionPass.Render command-buffer helper, not a direct-only Blit.
Tests poison prior global uniforms and check LUT global unbinding after each draw.
- tmp/color-integration-final-gpu.log PASS, successful batch exit: adds21 combinations
of DOF/radial/color readiness and events500/550/600. This checks source ownership
using a stable-order model, NOT a full actual URP camera/render-context execution.
Disabled-list, invalid-mode, multi-group, reset and cache tests also pass.
- Both combined runs also pass Bloom/diffusion60, radial7901 real timeline samples
plus GPU, PostFilm timeline/GPU, DOF focus and foreground80 GPU regressions.
- Final parameter-copy assertion rerun PASS: tmp/color-integration-copy-gpu.log;
successful batch exit with all combined regressions. No concurrent isolated runs;
main Unity and physics editors untouched.
Limitations / next work:
- Full scene Live1176 screenshot comparison has NOT been run. Fixture success is
not proof of matching the real game, actual camera orientation, or complete URP
RT handoff. Existing real reference captures still need matching timeline/camera.
- Live1001 lacks a color group; do not expect this effect to change that track.
Live1093 authored color keys are disabled. Live1176 is the useful enabled fixture.
- Unsupported color depth/selective/masks/multiple groups, blendCurve semantics,
fog/tilt-shift, and radial rectangle flags remain separate evidence work.
- Next priority: real-Live isolated render-context/capture validation of the expanded
chain; avoid claiming complete restoration or tuning against synthetic swatches.
## 2026-09-25 — Resume and close reference-capture contract validation
Recovered the interrupted Sep20 capture-preparation work and verified its final
isolated run completed successfully. No Unity process (main or isolated) was
running at this checkpoint; no editor was stopped or restarted.
Changes already present, now verified and recorded:
- LiveRenderCapture now accepts UMA_LIVE_CAPTURE_REFERENCE pointing specifically
to a reference manifest.json, plus optional comma-separated
UMA_LIVE_CAPTURE_FRAMES restricted to that manifest's timeline frames.
- LiveCapturePlan uses real manifest song/stage/cast/costume/fps/resolution data.
This enables Live1176 preparation instead of always loading Live1001. Identity
mismatches and frames beyond the loaded song duration fail explicitly.
The manifest's video extraction offset is NOT applied again to timeline seeks.
- Saved capture plan and batch-exit intent survive the initial play-mode domain
reload via SessionState. Start is batch-only; interactive use remains explicit
Capture current Live. Neither entry point was invoked in the user's editor.
- Capture requires60 distinct camera-render frames at the requested timeline time
(within0.1 timeline frame), with shader readiness and expected feature state.
Duplicate callbacks, stale time, camera changes and unavailable shader state
cannot satisfy settling. This prevents labeling an old rendered frame with a
newly requested time. It does not establish deterministic cloth/particle history.
- Output includes capture-plan.json and per-frame requested/actual time diagnostics.
Off/on still toggles the recovered feature as a whole, not all renderer features.
- New editor-only files: LiveCaptureContract.cs and LiveCaptureContractRegression.cs.
Physics, DOF and rendering algorithms were not modified by this stage.
Verification actually completed (not pending):
- tools/check_live_compile.ps1 PASS, tmp/capture-contract-compile.log.
- First editor compilation detected ambiguous Gallop.Math/System.Math in the
capture harness; fixed by qualifying System.Math.Max. Failed diagnostic is
tmp/capture-contract-gpu.log; do not use it as final validation.
- tmp/capture-contract-final-gpu.log, Sep20 20:44 local: successful batch exit.
Includes compilation of LiveRenderCapture/LiveRenderSetup and the new contract,
actual Live1001 and1176 reference manifest parsing, identity/subset/reload checks,
stale-frame/duplicate/readiness gate checks; all PASS.
- Same final run: color21 schedule combinations,54 swatches and124902 spatial
pixels; Bloom/diffusion60; radial7901 samples andGPU; PostFilm timeline/GPU;
DOF focus and foreground80 GPU samples all PASS. No new code changed after that
successful run during this resume, so a redundant GPU run was not started.
Still outstanding:
- NO real full-scene Live was loaded or captured in this stage. The minimal GPU
project lacks full Assets/resources and is only a regression harness.
- Next stage needs a separate full-asset isolated project and a local asset-loading
path that does not access account/token configuration. Do not run Start with
-quit: it launches asynchronous play-mode capture and exits itself on completion.
- Suggested first reference: master5/captures/reference/
live1176-content-aligned-20260912/manifest.json, small subset308,868,3848 to cover
authored color changes before expanding the full sequence. Compare actual cast,
camera and time diagnostics before treating pixel differences as effect defects.
- Actual URP render-context handoff, camera orientation and real-game screenshot
parity remain unverified. This checkpoint improves trustworthy capture plumbing;
it is not a new claim of visual parity or a measured improvement in appearance.
## 2026-09-25: overbright-frame composition audit
- Traced authored Bloom/Diffusion worksheet key -> interpolation in
LiveTimelineControl.SetupBloomDiffusionUpdateInfo -> Director callback ->
GallopImageEffect.ApplyBloomParameter -> the active camera's shared
PostImageEffectFeature.RuntimeParameter. Enabled flags and GraphicSettings
choose one DofDiffusionBloomOverlay mode. Missing/disabled/no-current-key
worksheet paths currently skip update; the matching game's reset behavior
remains unproven, so these paths were not retuned or cleared speculatively.
- In DofDiffusionBloomOverlayPass.Execute, the Bloom/Diffusion/DOF modes are
mutually exclusive switch cases. CreateBloomTexture applies the extraction
once and hands its _Bloom RT to the selected composite. ScreenOverlayRender
uses the Bloom-containing base or first-film pass only for layer1; layers2/3
ping-pong the previous result through filmPass2nd, which does not re-sample
_Bloom. The temporary result is handed to the feature at event <=550 and
copied (not additively blended) to camera color by FinalBlit; late-event
output writes camera color directly. The configured renderer asset lists
exactly one Gallop post-effect feature and no URP Bloom Volume is created by
GallopImageEffect. This excludes a second Bloom *in the inspected main-camera
path*, not every possible bright scene source or untested camera transition.
- Added isolated actual-shader/production-Render.Blit RGB checks for first
Bloom+Add film, followed by two Lerp film passes without another Bloom sample.
Expected values: (.45,.5,.6), (.225,.25,.3), (.1125,.125,.15).
Capture-side diagnostics now include Bloom/Diffusion enable flags, weight,
radius, blend, diffusion controls and all three film modes/powers beside the
time/camera/cast identity. These fields are not proof of pixel parity.
- tools/check_live_compile.ps1 passed (pre-existing warnings only). Isolated
D3D11 batch test tmp/bloom-layer-d3d11.log exited0: capture contract,
color/LUT, Bloom/diffusion, radial timeline/GPU, PostFilm timeline/GPU, DOF
focus and 80 foreground GPU samples all passed. First isolated compile
found a test-only missing namespace (fixed). A -nographics run used the Null
device and yielded invalid GPU pixels; neither failed run is acceptance.
Only tmp/dof-focus-test-project was run, and the user's main editor was not
stopped/restarted. The main project lacks a Git metadata directory here.
- No strength, physics, DOF, or unresolved radial-rectangle flags changed.
A full-asset isolated Live1176 off/on capture aligned to the master5
reference manifest has NOT run: the minimal test project contains no Live
scene/cast/stage resources. Do not claim the reported overbright frames are
fixed. Next, capture matching real Live frames and compare camera/cast/time
and these runtime parameters before interpreting luminance differences.
## 2026-09-25: post-film variant and Bloom-off follow-up
- Rechecked the four shipped Rich combination shaders directly from their D3D11
fragment DXBC with `tmp/audit_postfilm_variants.py`. For every inspected
ColorOnly, movie/mask, vignette, monochrome and inverse-vignette variant,
the first film pass has one more *sampled texture register* than its paired
second/third film pass. This includes PostDiffusionDofBloom_Rich passes
11/12 versus 13/14. Its pass 8 base combination lists `_Bloom`, `_MainTex`
and `_TapLowBackground`; the film-pass serialized `m_NameIndices` is
incomplete, so register counts alone do NOT establish each register's name.
Exact slot/name mapping remains unverified. All these official overlay passes
have target blend Src=One/Dst=Zero, i.e. overwrite, not hardware additive
framebuffer blending. The runtime PostFilmBlit uses first-pass output followed
by second-pass ping-pong; it does not invoke the base pass as an extra step.
- In the Bloom-off DiffusionDofBloom branch, Execute queues a black `_Bloom`
binding before the selected switch, and OnRenderImageDiffusionDofBloom does
not replace it when `IsEnableBloom` is false. Its first film pass is still
selected when layer1 is valid. This excludes one obvious previous-frame
texture leak by code inspection and the isolated shader fixture below; the
complete production render-context path has not been exercised by that test.
- Expanded `Assets/Editor/LiveBloomDiffusionRegression.cs` to put a bright
texture in `_Bloom`, explicitly replace it with black, and check the first
DiffusionDofBloom film pass. The fixture sets neutral diffusion parameters
and restores `_TapLowBackground` plus other global state. Production shader
and effect strengths were not modified. `tools/check_live_compile.ps1`
passed; the isolated Editor assembly also compiled from its response file.
- The isolated Unity D3D11 process PID 21560 again stopped before creating its
requested log, with CPU unchanged. Only that isolated process was ended; the
user's editor PID 15476 was not touched. Consequently the new GPU assertion
could not run in that sandboxed attempt. A subsequent approved, isolated
D3D11 run did produce `tmp/bloom-disabled-gpu-approved.log` and exited
successfully: the new Bloom-disabled DiffusionDofBloom first-film check,
Bloom extraction/composition, three-layer PostFilm, radial, color and DOF
GPU regressions passed. Only the user's editor PID 15476 remains. This
validates the tested shader branch, NOT a full production frame.
- No full-asset isolated Live1176 frame exists yet. The reference manifest and
PNGs (candidate frames 308, 868, 3848) are available in master5, but a
legitimate parity check needs the matching cast/stage/song, timeline frame,
camera and effect diagnostics from a separate full-asset capture first.
Static evidence narrows duplicate composition in the inspected main-camera
path; it cannot rule out another camera/feature, the authored Bloom intensity,
HDR source values, color transforms or incorrect runtime RT handoff in an
actual overbright frame. Do not lower strengths or claim parity based on this.
## 2026-09-25: confirmed active URP HDR baseline mismatch (evidence-based)
- `ProjectSettings/GraphicsSettings.asset` selects the GUID `be7a0efb84976e141aca289da4fd7832`, which resolves to `Assets/Resources/RenderPipeline/UMAUniversalRenderPipelineAsset.asset` in master7.
- The same asset GUID is active in master5. A line-by-line comparison of that asset found exactly one difference: master5 has `m_SupportsHDR: 1`, while master7 had `m_SupportsHDR: 0`.
- The Live prefab cameras already have HDR enabled (`m_HDR: 1`), and the inspected active asset is the one requiring depth/opaque textures and MSAA 4. Therefore the project-level HDR mismatch was a concrete render-baseline difference, not a Bloom strength guess.
- Changed only the active asset's `m_SupportsHDR` from `0` to `1`. No Bloom, DOF, physics, radial-rectangle flags, or shader strengths were changed.
- `tools/check_live_compile.ps1` had already passed before this asset-only change; it will be rerun after the change. A full Live frame comparison is still required. The open user Unity editor was not stopped or restarted.
- Interpretation remains conditional until a real Live capture is taken: this aligns master7's serialized baseline with master5, but does not by itself prove the overbright frame is fixed or prove complete game parity.
## 2026-09-25: continued from Claude session — character Toon property-block ordering
- Read the Claude session `b9c624ba-2c4a-4708-9d8a-320cb91d7634.jsonl` through its final 403 interruption. Its last useful direction was to verify the active URP/Cy baseline rather than tune effects from screenshots.
- Compared the corresponding `Director.cs` code in master5 and master7. Master5 explicitly uses `Renderer.GetPropertyBlock -> modify -> SetPropertyBlock` for GlobalLight and later character color tracks. Master7's Claude-edited code created a fresh block for each handler, set GlobalLight values, then let BgColor1 replace the whole block later in the same frame; it also wrote directional-light values through `renderer.materials` every update.
- Changed master7 to reuse one character MPB, call `GetPropertyBlock` before each handler update, and write `_UseOriginalDirectionalLight` / `_OriginalDirectionalLightDir` into the same MPB. This preserves rim/light values across timeline handlers and avoids per-frame material instantiation. This is a source-level alignment with master5, not a screenshot-based intensity adjustment.
- `tools/check_live_compile.ps1` passes after the change with only pre-existing warnings.
- Full Live visual validation remains pending; this change should be judged with a real Live capture, especially the formerly overbright frames. Physics, DOF, Bloom strengths, and radial blur rectangle flags were not changed.
## 2026-09-25: real-frame rollback after HDR test produced catastrophic clipping
- The user tested the HDR baseline change and supplied a real Unity Game view at approximately 23.3 seconds. The frame showed near-total white/clipped highlights, severe chroma expansion and loss of scene detail. This is a decisive negative result for enabling HDR in the current master7 runtime.
- Immediately reverted `Assets/Resources/RenderPipeline/UMAUniversalRenderPipelineAsset.asset` to `m_SupportsHDR: 0`.
- Also reverted the experimental Director MPB ordering change to the pre-test state so the user returns to the last known visual baseline rather than mixing two unvalidated changes. The MPB alignment remains a source-level hypothesis for a later isolated A/B test, not an active production change.
- `tools/check_live_compile.ps1` passes after the rollback with only the existing warnings.
- Conclusion: master5's serialized HDR flag cannot be copied directly into master7. The custom post chain or its intermediate RT/tone mapping differs at runtime; HDR must remain disabled until the actual target format, shader expectations and final conversion path are traced.
## 2026-09-25: bounded target preload evidence and phase inventories
- Added phase-only opt-in `bundle_inventory`, per-bundle `bundle_index`, and loaded-scene `scene_inventory`; counts distinguish opened handles, AssetBundle catalog entries, observed `LoadAsset` returns, and instantiated scene components. `GetAllAssetNames()` only enumerates catalog candidates. No physical, DOF, HDR, shader, or post-effect parameters were altered.
- Hash-verified target `GameAssembly` + metadata pointer lookup finds `Gallop.ResourcePath.GetCyalumeScorePath` at RVA `0x19ba070`. In `Director.GetLivePreloadEntries` the direct call at RVA `0x1a5c18f` feeds `AddByKey` at `0x1a5c19f`. Metadata literal: `Live/MusicScores/m{0:0000}/m{0:0000}_cyalume`. Master7 now conditionally adds that key to its existing preload list. Whether the key exists for a particular Live and how many dependencies it expands to need a real session log.
- Corrected attribution of earlier nearby native calls: `GetWorkSheetBySheetIndexAndVariationId`, `UmaAssetManager.LoadAssetBundle`, `AssetBundle.LoadAsset` and `PartEntry..ctor` were listed as targets to investigate, but are outside the bounded `GetLivePreloadEntries` function and must not be claimed as its direct callees.
- C# compile and a synthetic JSONL summary fixture passed. Real Live1176 full-load/playback log and same-frame visual parity remain unavailable, so this is an evidence/coverage increment, not a claim of visible quality improvement.
- Isolated D3D11 shader/DOF regression `tmp/stage1-inventory-gpu-20260925.log` completed with Unity batch exit code 0. It does not exercise the new full-Live preload/inventory path and does not establish real-frame parity.
### 2026-09-25 — Live resource root registration
The compiled viewer's progress denominator is expanded Bundle requests, not assets inside Bundles. Disassembly of `LiveResourceRegister.RegisterDownload` (RVA 0x1ab98b0) establishes that it registers the Director's roots **plus** each selected character's body/head/tail folders and face runtime resources before preloading. master7 used only the Director roots. `LiveResourceRegister.cs` now adds only metadata-present entries for the selected characters, with a `resource_roots` diagnostic category. This is a structural preload correction, not a cosmetic progress-counter adjustment. `check_live_compile.ps1` passed; no real Live session has verified resulting counts or visual impact. See `docs/LIVE_RENDER_PLAN.md` for exact reverse-engineering evidence, limitations and next measurements.
## 2026-09-26: per-root preload accounting (no rendering change)
Cross-checked the GLM progress disassembly against target `SearchAB` RVA 0x1b5d6a0 and master7's loop. The denominator counts dependency-expanded bundle requests per root, including repeated dependencies and cache hits, not assets inside a bundle. Target optional audio is omitted only when its `IsAssetReady -> TryGetReadablePath` test fails; that test includes pending/integrity handling and cannot be replaced with a naive `File.Exists`. Master7 does not yet implement that omission. Its extra laser-dependency fallback also remains unverified for the current song.
Added opt-in `preload_root` JSONL records and a summary of the 20 largest contributors with an accounting check against the progress denominator. `tools/check_live_compile.ps1` passed (existing warnings only); a synthetic JSONL summary assertion passed. This diagnostic-only change neither loads more resources nor affects physics, DOF or post-processing. There is still no real Live diagnostics session or full-frame comparison, so the actual gap to the binary viewer remains unmeasured. Run Live1176 in the already-open main Editor and compare root counts and repeated requests before making another loading or rendering change.
### Real Live preload validation: sessions 20260925-170518 and 20260925-170638
- The first opt-in real session is song 1176, stage 10148, 14 selected characters. It completed preload with 1,207 distinct roots (18 Director + 1,189 character roots), 1,388 unique dependency-expanded entries and **1,757 request attempts / UI target**. The per-root sum is exactly 1,757; 369 are repeated names across expansions. Outcomes: 1,373 bundle opens, 14 non-bundle loads, 370 handle reuses; no recorded missing files, load failures or exceptions in this preload. Count units are requests, not 1,757 distinct assets.
- A second real session is song 1001, stage 10102, 18 selected characters: 1,300 roots (20 Director + 1,280 character), 1,495 unique expanded entries, **1,882 request attempts / UI target**; 387 repeats. Outcomes: 1,473 bundle opens, 16 non-bundle loads, 393 handle reuses; no recorded preload failure. This independently confirms the request-count arithmetic, not target-binary parity.
- The Live1176 `preload_callback` inventory reports 2,690 loaded handles, which includes handles that were loaded before the counted preload; do not mislabel this snapshot as 2,690 opens by this session. Its sampled playback ran through frame 1830 (~30.5s), with `CameraTimeline1` and the `DiffusionDofBloom` mode in sampled frames. It does not cover reference frame 868 exactly or frame 3848 (~64s), nor does a pass log prove pixel equivalence.
- Result: the former two-digit progress was substantially due to missing selected-character resource roots, now corrected structurally. The counts are in the same *order of magnitude* as the user's observation of the binary viewer, but there is no exact same-config binary numerator/denominator or matched-frame visual test yet. Stage 1 resource-count measurement and stage 2 root-accounting portions have real evidence; full visual/render-chain acceptance remains open. Do not raise Bloom or change physics/DOF based on this count alone.
- Next checkpoint: obtain a target-viewer load count for song 1176/stage 10148 with identical 14-character selections, then capture master7 at frames 868 and 3848 and inspect actual active camera/RT/pass sequence and output. Keep registration as-is unless those measurements reveal a specific missing resource class.
## 2026-09-26: actual pass execution tracing (diagnostic-only)
The previous `render_pass` data only proves renderer enqueue. An additional opt-in `render_execute` record now marks command-buffer submission for SourceSetup, DOF/Diffusion/Bloom, RadialBlur, SimpleColorCorrection, ColorEarlyResolve and FinalBlit. It records per-camera/frame RT ownership transitions, without reading back pixels. Default is off unless `tmp/enable-live-pass-trace` (plus ordinary diagnostics) or the matching environment flag is set. The target disassembly confirms DOF's conditional `SetSourceRT` before command-buffer execution (RVA 0x1a19b90, call at VA 0x181a1a661); target RegisterPass has conditional exposure/grading branches that master7 does not yet implement. No runtime pass trace or matched screenshot has yet been collected. Compile passed; existing physics, DOF, HDR state and post-effect strengths remain untouched. See `docs/LIVE_RENDER_PLAN.md` for the acquisition plan and limits.
- The `render_pass` record now also includes URP's actual `cameraData.postProcessEnabled` flag (`urpPostProcessing`). The serialized Live prefab has `m_RenderPostProcessing: 0` on its camera entries, but only a same-frame runtime record can establish whether that remained off; do not infer URP Bloom absence from the prefab alone.
### Real Live1176 session 20260925-172955
The latest log confirms 1,803 bundle-request attempts and no preload failures, with URP built-in post-processing disabled on all 543 sampled pass-enqueue frames. It contains no per-pass execution records, because the optional trace marker was not enabled during that session. The marker has now been enabled for the next run and the target-frame execution window widened to ?6 Live frames to accommodate actual Editor playback cadence. No visual change or duplicate custom Bloom conclusion follows from this log alone. See `docs/LIVE_RENDER_PLAN.md`.
### 2026-09-26: real submitted pass chains validated (session 20260925-173827-227)
- Real song1176/stage10148/14 slots produced **34 render_execute records across 8 camera/Unity frames**. At Live frames 302,308,867,865,870,874 the submitted chain is SourceSetup -> DofDiffusionBloomOverlay -> SimpleColorCorrection -> FinalBlit. At frames 3845,3850 it is SourceSetup -> DofDiffusionBloomOverlay -> RadialBlur -> SimpleColorCorrection -> FinalBlit. Revisits around 868 have different Unity frames and must not be mistaken for duplicate passes within one frame.
- All 8 groups match their scheduled pass counts (4 or 5), contain no repeated recorded step, have identical preceding output/current input RT identifiers, and end at the initial camera RT. All 279 enqueue records have URP built-in post-processing disabled. This is evidence against whole-pass repetition or lost radial output **in these sampled frames only**. Exact reference frames868/3848 and pixel luminance were not captured.
- Added execution-chain reporting to `tools/summarize_live_diagnostics.py`, grouping by Unity frame AND camera, checking counts, adjacent RT continuity and camera return. Validated against the actual 34 records and a deliberately broken-handoff fixture. Saved complete report to `tmp/live-diagnostics-20260925-173827-227-summary.json`. No runtime renderer changes in this round; no Unity compile/GPU regression needed for the offline reporting change.
- Continued native internal audit: `OnRenderImageDiffusionDofBloom` calls BlurBlt at VA0x181a1c240, DiffusionFilterProcess at0x181a1c2ae, conditionally CreateBloomTexture at0x181a1c3a7, and PostFilmBlit at0x181a1c5c4; the source follows this outline. Native PostFilmBlit submits/clears at0x181a4cfb3/0x181a4cfc9 and0x181a4d192/0x181a4d19c. The current source likewise clears after these internal submissions, so the outer submission does not by itself prove repeated Bloom commands. Internal shader variants/parameters and pixel output still require verification; this is not visual parity.
- Next investigation can proceed using the recovered assets/binary: trace Bloom/Diffusion/PostFilm enable flags and numerical parameters at these timeline points, and verify actual Shader pass selection and intermediate texture formats. There is no reason to request another identical outer-chain playback run. A future visual capture should include intermediate images and parameter evidence together.
## 2026-09-26: autonomous continuation, provenance audit and corrections
This entry supersedes the overly broad exclusions in the preceding sampling notes.
### Corrections to prior conclusions
- `monitorCameraEnabled` was populated from `MonitorCameraSettings.IsEnabledTextureWidthRate`. It was NOT camera activation. Renamed the field to `monitorTextureWidthRateEnabled`; old logs cannot exclude monitor capture/compositing.
- `live_frame` formerly required an exact frame multiple of 30. Playback skipping those frames produced extremely sparse samples. Sampling now records the first observed frame in each 30-frame bucket (plus exact target frames), including backward bucket transitions. It still is not an exhaustive per-frame activation trace.
- Particle/Light counts are scoped to Director children, not the entire scene. The earlier session had 104 particles at 1/4 seconds, zero from 7 seconds in the observed samples. Neither result excludes particles elsewhere.
- PostFilm key counts prove track presence, not valid/enabled layers at a given time. The null camera targetTexture label likewise does not prove absence of SetTargetBuffers.
### Work performed without another user playback
- Exported all Bloom and three PostFilm tracks directly from the local game's son1176_Camera typetree to `tmp/live1176-effect-source.json` using master5's read-only asset utility. No Config.json was read.
- Added `tools/audit_live_bloom_source.py`: checks nine numerical fields against held-key intervals, uses the NEXT key's interpolation mode, skips curves instead of approximating them, and filters song identity. Six existing live_frame records in session20260926-005328-470 match all nine fields within 0.0001. Saved `tmp/live1176-bloom-source-comparison.json`. Injected-value mismatch and wrong-song negative controls pass.
- At frame3848 the bounding keys are3819/3972; next-key interpolation is None. Asset key3819 has threshold0.949999988, intensity6.690000057, blur2, weight1, diffusion threshold0.075000003, brightness/saturation/contrast1. Thus these sampled numbers were not invented intensity settings. This does NOT establish target-viewer evaluation parity, intermediate image correctness or absence of internal double composition.
- BloomBlendMode on this key is0 (Screen); master7 maps0 to `_BloomIsScreenBlend=1`. Added the runtime enum name to future diagnostic snapshots. Existing logs do not measure this uniform's actual draw-time GPU value.
- At the same interval PostFilm layer1 mode5/power4.159999847, layer2 mode5/power0.059999999; layer3 mode0 (disabled), although it retains a nonzero stored power. Counts alone were misleading.
- Replaced DofDiffusionBloomOverlayPass's reflection-based PostFilm dispatch with the concrete public typed method/ref arguments. Native direct-call evidence includes VA0x181a1c5c4 to0x181a4cad0. Retained null/error fallback and existing command ordering. Removes boxing/method discovery, NOT a claim of brighter/darker visual improvement.
- Removed an accidental literal-backslash-n diagnostic insertion from the disabled LegacyCompatibility timeline file. Active timeline accessors are retained.
- Investigated the missing movie/blend-factor transfer in Parameter.Setup but did NOT change it without target nested-method evidence; the renderer disassembly file does not contain this nested Setup implementation. Current color-only timeline bypasses UV movie tracks, so wiring texture fields alone would not restore movie rendering.
### Tests and remaining boundary
- `tools/check_live_compile.ps1`: passed (existing warnings).
- Isolated project, refreshed umamusume.dll: PostFilm timeline/GPU passed; DOF focus passed; foreground DOF80 GPU samples passed; Bloom/Diffusion24 extraction +9 Bloom +27 diffusion cases passed, including existing Bloom-once layer checks. These tests are NOT an end-to-end execution of the changed typed wrapper in a real Live scene.
- Initial PostFilm GPU invocation lacked UMA_POSTFILM_TEST_BUNDLE and failed its precondition. Retried with existing local tmp/postfilm-shaders.unity3d and passed. No shader assets downloaded.
- Added an explicit user-invoked menu `UmaViewer/Rendering/Capture current Live diagnostic frames (308,868,3848)`. It uses the actual currently loaded song/stage/cast, unlike the reference menu's default song1001 preset. It delegates to the existing settled off/on capture and restores playback/render-feature state afterwards. It is a same-session diagnostic capture, NOT a matched game-reference comparison. Not auto-invoked on the user's Editor.
- New capture entry compiled in the isolated Editor. Capture-contract test initially lacked its two reference-manifest environment paths; retry uses existing master5 live1001/live1176 manifests.
- Physics, DOF math, HDR state, Bloom/Diffusion strengths and radial unknown bits unchanged. Main Unity not closed/restarted/controlled.
- Next actual acquisition: in the loaded Live1176 choose the new diagnostic menu once. It saves six off/on images plus parameters/identity under captures/render-smoke. This is the first pixel-input/output checkpoint, not another full-song counter-only run. It does not yet capture individual internal Bloom textures. Before using game-reference images, verify exact identity and alignment.
- Final capture-contract retry: PASS, exit0 (tmp/continuation-capture-contract-retry.log). New menu was compiled; actual interactive capture remains unexecuted. All isolated Unity instances exited; main Editor remained running.
## 2026-09-26: capture identity failure fixed; session011553 examined
- User invoked diagnostic capture, but no captures/render-smoke directory was created. Editor exception points to LiveCapturePlan.Validate from BeginCurrentLiveCapture line106: Invalid reference character/costume identity. Builder retains full generic costume IDs with underscores; capture validation incorrectly allowed exactly one separator for the entire character+costume string.
- LiveCapturePlan.ParseCharacterIdentity now splits only at the FIRST underscore, validates numeric nonempty costume components, and retains the complete costume. Both validation and isolated automatic character selection use the same parser (the old selection also truncated costumes). Exact cast comparison remains strict; no costume normalization/guessing.
- Regression covers short and generic costume identities, invalid/empty/path-like values, serialization roundtrip, and rejection of a different costume. Runtime compile passed; isolated Editor compiled all changed editor sources and LiveCaptureContractRegression.Run passed, exit0 (tmp/capture-identity-regression.log). This verifies parsing, not successful real scene capture. No physics/DOF/render strength changes.
- Session live-diagnostics-20260926-011553-248 provides309 live_frame snapshots, showing the new sampling is substantially less sparse. Offline held-key audit compares300 snapshots:299 match all nine Bloom/Diffusion values; the sole mismatch is frame0 with initial/default parameters. This is not evidence by itself that the default was actually drawn, and it is retained in the report instead of silently excluded. Nine remaining frame snapshots are outside this held-key comparison coverage.
-30 submitted pass records form7 camera/frame groups; the existing chain checker reports no issues for these sampled outer chains. Still no pixel capture and no exclusion of internal composition faults.
- Correction to preceding note: PostFilm key3819 layer1 raw power4.16 is NOT the evaluated power at frame3848. The next key3874 selects Curve interpolation; actual sampled frame3844 power0.7138 and frame3870 power0.3087. Bloom's next key differs and selects None. Do not apply Bloom's held-key reasoning to PostFilm. At frame3844 recorded BloomBlendMode=Screen, film validity True|True|False, corroborating layer3 disabled in that sample.
- Required next user action: after editor script compilation, load Live1176 and invoke the same diagnostic capture menu. Successful completion must log [LiveRenderCapture] Completed and save six PNGs; an ordinary complete-song playback does not substitute for this capture. Main Editor was not controlled; only isolated verification was launched.
## 2026-09-26: successful real capture and off-screen preview UX
- Latest session captures/render-smoke/20260926_092541_878 completed all six PNGs and per-frame metadata (308/868/3848 off/on). Earlier incomplete folder is not the accepted set. User's "No cameras rendering" screenshot is explained by capture assigning the sole display camera's targetTexture to an off-screen RT; timeline is deliberately held for the 60-render stability gate. No Editor pause is requested by this tool. Completion is confirmed in Editor log, not inferred from the image.
- Added a utility preview showing the captured RT, target frame, off/on state and saved count, plus cancel/restore button and menu. Closing preview cancels. Added cleanup before script reload and guard against starting during delayed restoration. Game view itself still has no display-target camera during capture; this deliberately avoids injecting a second camera/composite pass into measurement. Preview UI has only compile validation, not interactive verification.
- Runtime compile passed; isolated Editor compiled the changed capture script; capture-contract regression passed exit0 in tmp/capture-preview-regression.log. No renderer/physics/DOF math changes; no need for another real acquisition solely to validate preview.
- Created comparison.png and pixel-summary.json in the successful capture folder. All source PNGs are1920x1080. Post-effects visibly add blue coloration/glow; pre-post frame868 already contains extensive white stage panels. Near-white(all RGB>=250) percentages off/on:308=6.92/4.08,868=24.46/18.34,3848=12.70/7.03. At868 any-channel>=250 rises30.43->36.54 percent. These are encoded output pixel counts, NOT linear luminance or proof of overexposure. White area alone cannot diagnose repeated Bloom.
- Off/on toggles the entire custom feature including DOF/color/film, not Bloom alone. Current real cast includes full0002_00_00 costumes; do not claim parity to reference manifests with different cast/costumes. Need internal-effect attribution and matched reference before changing strengths.
## 2026-09-26: captured-film attribution and native PostFilm/BlinkLight color synchronization
- The accepted real in-project capture is `captures/render-smoke/20260926_092541_878`: six 1920x1080 off/on frames at 308/868/3848, not an identical character/costume configuration to the compiled game's reference. The capture tool deliberately redirects the sole display camera offscreen, temporarily showing "No cameras rendering" in Game; completion was logged and six images saved. No new capture is required merely for the earlier preview repair.
- Added `Assets/Editor/LiveCapturedFilmAttribution.cs`, a **film-only** GPU experiment on SHA-256 pinned real *pre-post* PNGs, using the shipped `PostBlit_Rich` passes 1/3 and checking the later-pass arithmetic against `PostDiffusionDofBloom_Rich` pass 13. The three tracks' authored `AnimationCurve`s produce all nine captured runtime powers within 0.0002. Four counterfactual **raw hardware depth samples**, ARGB32 ping-pong, ARGBFloat pre-clamp probes, and three omit-one-layer renders per frame generated 72 outputs. Initial report: `captures/render-smoke/20260926_092541_878/film-attribution/report.json`; reproducible input generator: `tools/prepare_live_film_attribution.py` (rebuilt input exactly equals the original fixture). `tmp/film-attribution-gpu.log` exited 0. This is **not** captured scene depth, final Bloom/DOF/color correction, or game-reference parity.
- In that counterfactual at rawDepth=0, frame868 layer2 authored Add puts 19.65% of pixels above 1 in at least one float RGB channel; after clamped layer2, layer3 Add puts 46.93% above 1 before its output clamp. Thus film arithmetic alone can contribute clipping **without Bloom**; it is not proof of actual overexposure or grounds to turn down Bloom blindly. The visual sheet is `captures/render-smoke/20260926_092541_878/film-attribution/contact-depth0.png`.
- Native `SetupPostFilmUpdateDataInfo` RVA `0x1ae70c0` (`tmp/postfilm-setup-update-audit.txt`) checks current-key sync bits `0x200000/0x400000/0x800000/0x1000000` for corners 0..3 (getter RVAs `0x1af7c30/0x1af6370/0x1af62e0/0x1af6330`). It fetches the current StageController BlinkLight RGB by key name/hash/container (`TryGetPostFilmBlinkLightColorRGB` RVA `0x1ae8420`, StageController lookup `0x1a8f110`), applies **the PostFilm key's** `BlinkLightBrightnessPower` and `IsAdjustedBlinkLightColor` (`ApplyOfficialBlinkLightColorRGB` RVA `0x1add210`), copies RGB only, and preserves each authored alpha (`CopyPostFilmColorRGB` RVA `0x1adf9f0`). Crucially, during interpolation **a next key with that corner's sync bit holds the current corner** rather than lerping to the next key's authored color. Previous master7 code always lerped and never resolved live BlinkLight RGB. This is a real source-backed omission, not an aesthetic adjustment.
- Implemented optional raw-color resolver and native sync/next-sync hold in `LivePostFilmTimeline`, bound it to the stage's existing `StageBlinkLightDriver` in `LiveTimelineControl` without an every-frame scene search or clock-order rewrite. Missing lookup falls back to authored current RGB; per-layer `none|resolved|missing` and color0 RGB are available in opt-in `LiveRuntimeDiagnostics`. The capture metadata now saves `filmBlinkLookup` and all three `filmColor0` RGBA. The dedicated user-facing menu `UmaViewer/Rendering/Capture current Live BlinkFilm diagnostic frames (900,1240,3900)` targets authored sync intervals for Live1176; its resulting identity and metadata must still be checked. These frames are **not** covered by the prior six PNGs.
- The original 3848 capture is in a **next-key sync transition**: even without dynamic Blink RGB, holding the current authored layer1 color changes the film-only rawDepth=0 output. Old vs new frame3848 layer3 encoded RGB absolute mean errors were ~13.68/8.69/0; frame308 and 868 outputs unchanged. New report and old/new side-by-side: `captures/render-smoke/20260926_092541_878/film-attribution-sync-v2/`; new GPU test exited 0 (`tmp/film-attribution-sync-v2-gpu.log`). This is a pre-Bloom film counterfactual, not evidence that the complete real Live frame now matches game reference.
- Native `DofDiffusionBloomOverlayPass.Allocate` RVA `0x1a16b50` explicitly requests ARGBHalf (format 7), whereas `RenderTextureHandle.GetTemporaryRT` RVA `0x1a47440` takes the default-format overload: **mixed internal formats are intentional**; disabling camera HDR is not a reason to force all intermediates to ARGB32. `ScreenOverlayRender.Parameter.Setup` RVA `0x1a46820` omits ColorBlendFactor/movie-info fields, as does the current implementation; native `Director.UpdatePostFilm` RVA `0x1a6aea0` sets the factor in its own path. Do not invent a Setup copy based on field names alone.
- Validation: `tools/check_live_compile.ps1` passed with only pre-existing warnings. Isolated Unity 2022.3.62f1 GPU/fixture regressions passed: PostFilm sync, nine film powers/72 counterfactual PNGs, 80 DOF foreground samples, DOF focus, Bloom/Diffusion, ColorCorrection, capture contracts (`tmp/postfilm-blink-sync-gpu.log`, `tmp/postfilm-sync-LiveDofForegroundRegression-Run.log`, `tmp/postfilm-sync-LiveDofFocusRegression-Run.log`, `tmp/postfilm-sync-LiveBloomDiffusionRegression-RunGpu.log`, `tmp/postfilm-sync-LiveColorCorrectionRegression-RunGpu.log`, `tmp/postfilm-capture-metadata-contract.log`). An intermediate Bloom invocation initially failed only because its required shader-bundle environment variable was absent; it passed on retry. **No complete Live scene ran in the isolated project.** Main Unity Editor PID22128 was neither closed nor restarted.
- Remaining: verify the stage driver actually resolves `pfb_env_live10148_blinklight_dummy_b` at sync frames and whether its LateUpdate cache is one frame behind the native StageController snapshot; do **not** reorder callbacks just by intuition. Real synced RGB and full-frame parity need an actual capture at the sync window with the above lookup/color metadata. Match character/stage/camera identity before making any visual claim. Bit17/18 radial rectangular flags remain unconfirmed and disabled. Physics, DOF algorithm, HDR switch, Bloom/PostFilm strengths unchanged.
- The existing `tmp/live-diagnostics-20260926-011553-248.jsonl` has a real `instance_create` for `pfb_env_live10148_blinklight_dummy_b` (two renderers). This supports its asset being present, **not** yet successful `StageBlinkLightDriver.TryGetCurrentBlinkColor` lookup or correct clock freshness. The new capture status distinguishes that runtime lookup from mere asset presence.
## 2026-09-26: BlinkFilm 真实帧取证与 PostFilm 单独归因
- 新会话 `captures/render-smoke/20260926_101523_651` 的计划和六张 PNG/元数据完整:Live1176、舞台10148、1920×1080、14 人、帧 900/1240/3900。`filmBlinkLookup` 分别为 `none|resolved|resolved`、`resolved|resolved|none`、`resolved|none|resolved`。因此原先“资源实例存在但不知灯色是否查到”的问题,在这些静止稳定帧已证实查到;**不代表播放中的转换帧时钟一致**。源数据 `tmp/live1176-effect-source.json`:900 层2/3 当前 key 均 bit21+bit20 且亮度1,实测 Color0 同为 (0.172549,0.466667,0.819608);1240 层1亮度0故 Color0黑、层2仍用相同 RGB;3900 层1 Color0=(0.570755,0.733868,1),层3 Color0=(0.194057,0.249515,0.34)=同一原始 RGB×0.34,**但层3 mode=None 不参与输出**。以上与实际 key 的同步位/亮度一致。
- `D:\Projects\UmaTools\UmaViewer-master5\captures\reference\live1176-content-aligned-20260912\manifest.json` 虽也有 10148/14人/1920×1080/60fps,身份却是 `1062_50,1067_02,1068_02,1006_00×11`,而本次是 `1086_0002_00_00,1034_0002_00_00,…`。它没有这三个目标帧(最近如 888/918 和 3898/3918),另外的 live1176 参考有18人,**不可据此做同身份、同相机逐像素一致性结论**。
- `captures/render-smoke/20260926_101523_651/blink-film-capture-pixel-summary.json` 与 `blink-film-capture-comparison.png`:off→on 的编码 RGB 均值分别由 (61.96,65.66,60.56)→(77.27,94.50,113.92),(54.69,59.60,54.07)→(71.79,94.64,124.16),(52.49,56.72,53.07)→(53.75,65.56,72.23)。这包含所有后处理和 DOF,不是 Bloom-only,也不是线性光照值。
- 扩充 `tools/prepare_live_film_attribution.py` 及 `Assets/Editor/LiveCapturedFilmAttribution.cs`:只从捕获元数据里亮度=1、未调整且当前 key 的 Color0 同步成功的层恢复原始舞台 RGB,再用官方 Shader 和真实预后处理图像复演三层;GPU 检查全部九个功率及九个 Color0 与真实元数据误差小于0.0002,官方 film variant parity 通过。输出 `film-attribution-blink/report.json`、72 张层/省略层图、`real-vs-film-depth0-contact.png`,隔离测试 `tmp/blink-film-attribution-gpu.log` exit0。rawDepth=0 仅**假设深度**,不代表本次 Live 的真实深度/叠加位置。视觉上 900/1240 的蓝色罩层在 Film-only 实验已显著出现,**不能直接归咎 Bloom 重复叠加**;on 帧仍比 Film-only 更发光/模糊,不能据此排除 Bloom/DOF/扩散误差。
- 静态次序复核:`LiveTimelineControl.AlterLateUpdate` 当前明确在 `AlterUpdate_PostFilm` 后才调用 `AlterUpdate_BlinkLight`;原生 RVA 0x1ac9460(GLM 报告 §10.3)亦列 PostFilm 在 BlinkLight 之前。报告同时将 master7 描述为 Blink→PostFilm 的那句话与实际代码冲突,不能以此为依据盲目重排。StageBlinkLightDriver 的 LateUpdate 缓存与原生 StageController 时钟的边界仍需过渡帧/运行时证据;静止60次渲染只能排除稳定帧 lookup missing。
- 增加独立的 **off/noFilm/on** 诊断菜单(900/1240/3900):在仅该主相机的 `beginCameraRendering` 与 `endCameraRendering` 间暂时把三层 PostFilmMode 置 None,保留 DOF/Bloom/Diffusion/ColorCorrection;离开该相机或异常结束立即还原原始结构体。原有 off/on 菜单行为不变。`on−noFilm` 能在完整后处理输入上归因 Film,`noFilm−off` 归因其它链条(**不是 Bloom-only**);目前尚未采集三态真实 Live,故没有新渲染改善结论。编译 `tmp/film-isolation-compile.log` 通过,隔离 Editor 脚本编译/采集契约 `tmp/film-isolation-contract.log` exit0;主 Editor PID22128 未控制/重启,物理/景深/强度未修改。
- 下一关键动作:等待三态菜单在主 Editor 同配置 Live 上运行,核对各帧九张 PNG 的身份/稳定门禁及 noFilm metadata,再定位过亮在 Film 还是其它链条。若想与游戏逐像素比较,还需另行制作**相同角色服装及准确帧/时钟**的原版参考;不以不匹配视频作“改善”的依据。
### 2026-09-26: three-state capture scope audit (no Live visual claim)
- Audited local URP 14 source: `beginCameraRendering` precedes `renderer.AddRenderPasses`; the renderer then runs `Setup`/`Execute` and calls `context.Submit()` before `endCameraRendering`. `PostImageEffectFeature.AddRenderPasses` binds its `CameraData.Parameter` to the shared runtime object; `DofDiffusionBloomOverlayPass.Execute` reads the same object's overlay modes. Thus camera-scoped `noFilm` mode suppression reaches pass selection and pixel rendering, rather than only a late metadata snapshot. This is a code-path argument, not a full-Live GPU observation.
- Hardened `Assets/Editor/LiveRenderCapture.cs`: `noFilm` stability gate now requires a matching begin/end camera suppression for *each* settled render; a missing callback cannot silently produce a mislabeled `noFilm` PNG. Restoration rewrites only the three `PostFilmMode` fields, preserving other timeline-owned parameters written by callbacks. Cancellation still restores before releasing the RT; on/off paths are unchanged. Suppressed mode is restored before metadata is written, so the metadata's `film1/2/3` fields continue describing the original authored modes; `filmIsolation=true` identifies the temporary render-only override.
- Added isolated `LiveCaptureContractRegression` assertions for all three overlay validity gates, retained strengths, nested suppression rejection, preservation of a concurrent Bloom field update and idempotent restoration. `tools/check_live_compile.ps1` passed (existing warnings); isolated Unity batch test exited successfully in `tmp/film-isolation-scope-contract.log`. The isolated test does **not** establish that all nine full-Live PNGs are distinct or visually correct.
- Next hard boundary: one actual Live1176/stage10148/14-cast run of `UmaViewer -> Rendering -> Capture current Live off/noFilm/on (900,1240,3900)`. Compare the nine PNGs and identity/`filmIsolation` metadata; interpret `on - noFilm` as film contribution only if the same-frame experiment succeeds. `noFilm - off` includes the entire remaining DOF/Bloom/Diffusion/ColorCorrection chain, not Bloom alone. Do not change effect strengths from unmatched reference images.
### 2026-09-26: Live1093 user-observed stage occlusion, haze and floor flicker
- The user prefers the **middle Film-only** panel of `captures/render-smoke/20260926_101523_651/film-attribution-blink/real-vs-film-depth0-contact.png`. That panel is a counterfactual official-Shader replay of pre-post frames with `rawDepth=0`, not a real full-Live post chain. Preserve this preference as a visual target, but do not turn off Bloom/DOF or dial brightness by eye on this basis.
- The two user images show our Live1093/stage10137 at roughly 20.1 s with a conspicuous orange semi-transparent surface over the front of the stage and blown-out highlights; the real-game example includes warm shafts/scattering and readable character detail. Their character outfits, camera clock and exact frame are not proven matched, so this is a strong *failure report*, not pixel-parity evidence. The user also reports persistent floor flicker consistent with depth fighting; the actual pair of triangles/materials is not yet identified.
- Existing live diagnostic `tmp/live-diagnostics-20260926-024319-599.jsonl` identifies stage10137 instances `alpha_mask`, `alpha_mask_side_stage`, `sunset`, `main000`, `horizon`, multiple blink lights. At frame1202 (20.027 s), the timeline reports BloomIntensity=7.36, diffusionBright=1 and PostFilm modes Add/Lerp/Add. These are authored/runtime values, **not** evidence that Bloom or one particular mask caused the orange overlay. `multiCameraActive=0` there. The diagnostic has no renderer-level geometry/material state, so it cannot identify the front surface or overlapping floor pair.
- Found a concrete defect in our *ground-panel exclusivity*, independently of the user's unidentified floor mesh: `StageBlinkLightDriver.LateUpdate` previously called `EnforceGroundPanelExclusive` **before** `ApplyToRootCached` for every cached root, so the losing panels were immediately re-enabled in the same frame. Also, `ApplyRootOffCached` set renderers enabled and usually only blackened MPB colors, which can still write depth. Moved exclusion after the per-root updates and set `forceRenderingOff=true` for non-selected ground-panel renderers. This affects only `_blinklight_ground_panel` groups; it is a candidate fix, **not yet a verified resolution** of the user's stage floor z-fighting. Other coplanar meshes can still conflict.
- Added a one-time, opt-in read-only stage-surface snapshot to `LiveRuntimeDiagnostics.RecordFrame` near frames 1190?1220: renderer hierarchy/name, mesh, material/shader, queue, ZTest/ZWrite when exposed, active/render-off flags, world bounds, plus bounded candidates for simultaneously visible thin coplanar renderers. It uses `sharedMaterials` and does not alter scene/material state. The next naturally occurring diagnostic Live1093 session can reveal the orange-mask state and candidate floor pair **without requiring the off/noFilm/on nine-image capture**. An identical-bounds candidate is not proof of coincident triangles; confirm mesh coordinates and material pass before moving or hiding other surfaces.
- `tools/check_live_compile.ps1` passed after both changes (`tmp/stage-ground-panel-compile.log`). In isolated `tmp/dof-focus-test-project`, copied the validated assembly and ran `LiveDofFocusRegression.Run` with Unity batch exit0, `tmp/stage-ground-dof-gpu.log`. This does not test full Live1093 rendering or verify the new ground-panel behavior in the loaded stage. Main Unity Editor was not closed/restarted; physical simulation and DOF algorithm were untouched.
- Remaining evidence path: obtain renderer-level snapshot on a *natural* next playback, distinguish `alpha_mask[_side_stage]` from `sunset` and translucent material render queues/depth tests, identify floor pair rather than offsetting the stage. Separately inspect actual Live1093 SunShafts/LightShafts/VolumeLight keys and the native pass texture handoff; the reference's haze is not license to add a generic fake beam. Do not ask the user to re-run a capture solely for this note; they explicitly declined another operation now.
- Added an isolated Unity Editor regression `tmp/dof-focus-test-project/Assets/Editor/StageGroundPanelRegression.cs`: two synthetic cached ground-panel roots sharing a mesh, distinct update frames, and a direct call to the exclusion method. `tmp/stage-ground-panel-regression.log` exits 0 and verifies the losing renderer has `forceRenderingOff=true` while the latest is not suppressed. This validates the corrected exclusion action, **not** the real Live1093 floor mesh identity, timeline order under gameplay, or the original game's rendering intent.
- Native disassembly corroborates an explicit `StageController.InitializeSunShaftsControl` (RVA `0x1a863b0`) and `SunShaftsPass.Execute` (RVA `0x1a4fe30`) pipeline with viewport projection, temporary RTs and source-RT handoff; master7 currently has serialized `sunShaftsSettings` but no attached equivalent pass. The next diagnostic `live_frame` now logs whether SunShafts settings exist, authored power/intensity/blur and indirect shaft texture count, without synthesizing new beams. No assertion yet that those settings are active for Live1093.
## 2026-09-26: Live1093 natural playback follow-up ? stage surface evidence
- Parsed the completed `tmp/live-diagnostics-20260926-032402-136.jsonl` session (song1093, stage10137, 51 sampled Live frames). The one-shot surface snapshot is at Live frame1201 / 20.022 s and contains 378 renderer/material records. Camera position was (7.145, 1.151, 12.183), FOV33.94; no active monitor camera in the sampled frame. Bloom intensity7.36, diffusion disabled, PostFilm Add/Lerp/Add powers1.4915/0.5720/0.0079. These are runtime state readings, **not** visual attribution of the blown-out pixels.
- **Correction to the prior floor hypothesis:** no `_blinklight_ground_panel` name occurs anywhere in this session's resource/instance/surface records. Thus the earlier ground-panel exclusivity fix is valid for stages using that family but cannot explain the reported Live1093 floor flicker. Do not cite it as a Live1093 visual repair.
- Only one coplanar-bounds candidate was emitted: `pfb_env_live10137_main000(Clone)/mirror000` versus `/shadow`. Both are enabled/visible, y=0.001 m, queue3000; mirror bounds X62.38/Z21.85, shadow X16.05/Z0.424 with XZ overlap. The pair consists of **different meshes** (`ReceiveMirror`, `Shadow`), so matching AABBs do not prove overlapping triangles or actual depth competition; it may be an intended reflection/shadow overlay. Main stage `/ground_top`, `/ground_front`, `/bg_ground` have tall AABBs and were deliberately excluded by the planar-bounds filter. They are not yet cleared as suspects. No arbitrary floor offset or renderer suppression has been applied.
- The stage includes transparent `light004_sunset_glow` (shader `LightBlinkBlend`, queue3000, bounds center (0,3.565,4.75), size (20.575,7.13,16)) and several side sunset planes. `alpha_mask` meshes use `Hidden/Gallop/3D/Live/Stage/Alpha`, queue3000. An AABB and shader name are insufficient to identify the orange foreground image; the supplied real-game example is not the same camera/character identity as the Unity screenshot.
- Live1093's static timeline settings have `sunShaftsSettings != null`, intensity0.5, **sunPower0**, blurRadius5/2 iterations; indirect shaft texture count0. This establishes data presence, not an active original SunShafts pass or a cause of the real game's visible haze. Avoid synthesizing fog/shafts based on the screenshot alone.
- Extended the opt-in, one-shot stage snapshot with effective material `_SrcBlend`/`_DstBlend`, `_ReflectionRate`/bound texture, `_Color`, sorting order and **world-space horizontal-triangle height histogram** for named ground/mirror/shadow meshes. This separates a tall floor AABB from true horizontal triangles and tests whether the mirror is actually bound; it does not alter rendered pixels. The next natural Live1093 playback can fill these missing observations. `tools/check_live_compile.ps1` succeeded; isolated Unity `LiveDofFocusRegression.Run` passed in `tmp/stage-surface-material-dof.log` (exit0). Main Editor PID22128 was not restarted; physics and DOF algorithms unchanged. A real same-camera image/controlled renderer attribution remains necessary before a visual fix can be claimed.
## 2026-09-26: Live1093 natural playback follow-up ? stage surface evidence
- Parsed `tmp/live-diagnostics-20260926-032402-136.jsonl` (song1093, stage10137; 51 sampled Live frames). The surface snapshot is at frame1201 / 20.022 s and has 378 material records. Camera (7.145,1.151,12.183), FOV33.94; sampled Bloom intensity7.36, diffusion off, PostFilm Add/Lerp/Add powers1.4915/0.5720/0.0079. These values do not prove the source of clipped pixels.
- Correction: `_blinklight_ground_panel` does not occur anywhere in this session's resource/instance/surface records. The earlier ground-panel exclusion fix cannot explain Live1093 floor flicker, though it may help stages with those panels.
- The sole thin/coplanar-bounds candidate is `pfb_env_live10137_main000(Clone)/mirror000` versus `/shadow`, both visible with bounds at y=0.001 m, queue3000. They have different meshes/shaders (`ReceiveMirror`, `Shadow`): common bounds do not prove triangle overlap or depth fighting and may be intended layering. The `/ground_top`, `/ground_front`, `/bg_ground` meshes have tall bounds and were excluded by the previous planar-AABB heuristic; they are not cleared.
- A transparent `light004_sunset_glow` (LightBlinkBlend, queue3000) and several side sunset planes exist. The `alpha_mask` meshes use a separate Alpha shader. Bounds/shader names do not identify which one makes the orange foreground area. The two supplied screenshots are not same-camera/character pixel references.
- Timeline has `sunShaftsSettings` intensity0.5, **sunPower0**, blurRadius5/iterations2; indirect shaft texture count0. Presence is not evidence of an active pass at this frame. Do not synthesize haze or tune Bloom from this data alone.
- Added one-shot diagnostic material source/destination blend, reflection rate/texture, color, sorting order and world-space horizontal-triangle-height histograms for named floor/mirror/shadow meshes. The added sampling is read-only; later natural playback can distinguish true horizontal overlap and mirror binding. `tools/check_live_compile.ps1` passed; isolated Unity DOF regression passed in `tmp/stage-surface-material-dof.log` (exit0). Main Editor was not restarted; physical/DOF algorithms unchanged. No complete same-camera visual parity claimed.
- Additional isolated `StageSurfaceHeightRegression.Run` passed (`tmp/stage-surface-height-regression.log`, exit0): horizontal world-space 1 mm triangle counted while a sloped triangle was excluded. It tests the probe, not the actual stage geometry.
+53
View File
@@ -0,0 +1,53 @@
# master5 physics migration — 2026-09-20
User prioritized physics over render restoration; render goal paused.
## Migrated
- DynamicBone.cs copied byte-for-byte from master5: includes continuous segment collision and particle access used by skirt solver.
- SkirtSurfaceCollisionSolver, SkirtLegCollisionProxy, SkirtCollisionVisualizer copied byte-for-byte, with original metas.
- master5 CySpringDataContainer dynamic-physics methods merged into master7's existing data component. Kept its GUID, serialized fields, and compatibility methods required by remaining CySpring classes.
- CySpringCollisionData serialized fields exposed as in master5; added default constructor. Kept existing runtime APIs and GUID.
- UmaContainerCharacter.LoadPhysics uses master5 collider binding, DynamicBone setup and horizontal skirt surface solver. Removed old CySpring owner/setup helpers and Begin/EndSimulation calls; LoadBody no longer creates SkirtController. Only one backend drives bones on newly loaded characters.
- Master5 winner-outfit school-uniform thigh/hip collider fallback added to UmaViewerBuilder; other model-loading/render changes preserved.
- Physics enable/reset now use DynamicBone. Physics toggle also disables the added surface solver so it cannot reapply particle poses while physics is off.
## Validation
- Runtime assembly Roslyn compile passes, existing warnings only.
- Editor assembly compile passes against updated runtime DLL. Also fixed missing Gallop import in previously written render-capture helper, which otherwise blocked Editor compilation.
- Four copied solver files verified byte-identical to master5.
- Live visual validation NOT claimed: user's existing Unity Editor is playing an already-loaded Live. Do not terminate it or start another editor against the same project. Existing runtime components need recreation, not just domain reload.
- Added UmaViewer/Physics/Validate master5 migration menu. Reports DynamicBone count, surface rings, thigh colliders and presence of old CySpring/Skirt controllers; warns if character must be reloaded.
## Reload requirement
Stop Play Mode and start/load the character or Live again. The old runtime CySpring components cannot be safely converted by a script reload alone.
## Backups
Overwritten files preserved under tmp/physics-migration-backup, same relative paths. No entire master5 character/builder file was copied.
## Follow-up: oversized collision volumes (2026-09-20)
The first migration omitted master5 Live/SkirtCollisionRuntimeTuner.cs. Its Update/Apply
changes the authored collider radii after creation, so copying the solver alone was incomplete.
Added physics-only Master5LivePhysicsProfile, attached by ConfigureLivePhysics:
- Hip + Skirt + suffix _L/_R: original radius * 0.2 (case insensitive).
- Thigh + MSkirt: original radius * 0.8. Other colliders unchanged.
- Capsule height/center are NOT changed, matching master5 Apply exactly.
- Skirt particle damping/elasticity/stiffness/inertia multipliers: 3 / 1.5 / 2 / 1.1.
- Other particles also receive master5's additional multipliers and 0.85 rigidity clamp.
- Surface horizontal stiffness: 0.5.
- Scoped to Live, as in master5; no rendering controls imported.
- Original collider radii are stored on the character component and serialized for domain
reloads. Repeated application uses original radii, not already-scaled values. Particle
instances are tracked to prevent repeated tuning; newly rebuilt particles are discovered.
Validation: runtime and editor Roslyn compilation passed (runtime has existing warnings).
Added UmaViewer/Physics/Test master5 Live profile for collider name filters, five repeated
applications, unaffected collider/height, particle coefficients, and particle rebuild.
This menu test has NOT yet been executed in the user's running Unity Editor; compile is
not a runtime or visual pass. Validate master5 migration now reports missing profiles and
actual local radii, height, transform scale, and expected multipliers.
Reload Live after Unity imports scripts. Existing characters were created before this hook.
Visual skirt/body collision parity still requires replaying the affected outfit/motion.
## Performance follow-up
User confirmed physics fixed. The solver files now contain a bounded geometry-cache optimization; see PHYSICS_PERFORMANCE.md for changes, executed equivalence tests, and benchmark limits.
+74
View File
@@ -0,0 +1,74 @@
# Physics performance pass — 2026-09-20
## Scope
User confirmed physics is correct after the master5 runtime profile fix. Preserve its
collider radii, sampling counts, update rate, solver ordering, and positional constraints.
Rendering restoration remains out of scope.
## Observed code costs (not a captured Live CPU profile)
- DynamicBoneCollider.Collide recomputed lossyScale and TransformPoint on every probe.
Continuous skirt collision tests particle endpoints, three segment probes, and 4–8
swept probes, plus repeat endpoint tests after correction. Surface samples repeat this.
- Surface solver repeated collider name/radius filtering inside span/panel inner loops.
- The newly migrated Live profile allocated component arrays and predicate closures on
its 0.5-second discovery pass, and rebuilt motion-category strings even for known particles.
## Changes
- Added lazy world-geometry cache for a single collision batch. Same sphere/capsule
projection routines are used; no approximation or removed collision checks.
- Each DynamicBone batch ends before ApplyParticlesToTransforms. Surface solver has its
own batch, ending before pose writes. No cross-frame or cross-chain reuse, since those
writes may move colliders. This scope is main-thread-only, not a worker-thread API.
- The original uncached path remains available for live A/B comparison through menu
UmaViewer/Physics/Toggle collision geometry cache. Default is enabled.
- Surface filters colliders once per solve; chain scale read once per chain rather than depth.
- Live profile discovery reuses component lists, removes capturing Find predicates, and
only computes motion category when discovering new particles.
- Added Live.SkirtSurfaceCollision profiler marker; Live.DynamicBone already existed.
## Executed validation
- Runtime and Editor assemblies compile; existing runtime warnings only.
- Used a separate minimal Unity 2022.3.62f1 batch-mode test project under
tmp/physics-cache-test-project. Did not close/restart the user's master7 Editor.
- 24,576 deterministic point comparisons passed across sphere/capsule, inside/outside,
all axes, translated/rotated/nonuniform/negative-scale transforms. Also tested nested
cache scopes and fresh geometry after motion between batches and outside a batch.
- Synthetic microbenchmark, 1,048,576 queries per path (two measurement orders):
uncached 792.87 ms; cached 102.02 ms; ratio 7.77x for this collision-query workload.
NOT a Live frame-time speedup. Full animation, transform writes, surface solve, rendering,
and real collider sharing are not represented by this synthetic ratio.
- Evidence: tmp/physics-performance-baseline/cache-test-result.txt and cache-test-unity.log.
- Menu to rerun: UmaViewer/Physics/Test collision cache equivalence.
## CySpring native investigation
CySpringNative.cs imports CySpringPlugin, not cyspring.dll. Both binaries are x64 and
export NativeClothUpdate, NativeClothSkirtUpdate, NativeSkirtUpdate.
master7 Assets/Plugins/CySpringPlugin.dll:
3,838,976 bytes, SHA256 BE84FAF0CC3CCCCEDA8BDBCA23530E0BEB2049BDCB9ADD0FF7E9ECAAAEEB135F
Reference UmaViewer_Data/Plugins/x86_64/CySpringPlugin.dll:
3,869,184 bytes, SHA256 C4ADA7CDD8A80D268601715AEBB52CA0A2A235FD3CE189459B30AAE598269D2A
DLL existence/export names do not prove a successful runtime invocation or correct ABI.
Different hashes do not prove incompatibility. Old skirt clipping has NOT been attributed
to a specific DLL failure. Do not replace DLLs or re-enable the old backend without tracing
binding, structure layouts/strides, collision flags/indices, and skirt linking. The current
working solver does not call this native backend.
Native export evidence: tmp/physics-performance-baseline/native-exports.json.
## Next decision: native kernel vs further managed optimization
First compare the same Live, outfit, camera and time range with geometry cache off/on.
Capture Live.DynamicBone and Live.SkirtSurfaceCollision, whole CPU frame time, allocations,
and spikes; distinguish physics-bound from rendering-bound frames.
If physics remains expensive, proposed native design is a batched flat-array solver, not
one P/Invoke per particle/collider: gather geometry/poses on main thread, solve a batch,
write poses back once. Port the current verified constraints including continuous and
surface collision; retain managed fallback and compare particle results. Independent
characters are the first candidate parallel units; interacting skirt chains cannot simply
be parallelized without respecting their constraint dependencies.
No native DLL has been built or installed in this pass. No actual Live FPS gain is claimed.
## Backups
Pre-optimization DynamicBone.cs, DynamicBoneCollider.cs, SkirtSurfaceCollisionSolver.cs
are under tmp/physics-performance-baseline. Earlier master5 migration byte-identical
claims refer to their state before this optimization pass.
File diff suppressed because it is too large Load Diff
+56
View File
@@ -0,0 +1,56 @@
# 重复模块程序集兼容实施计划(待批准)
## 目标
恢复 `e362e39` 删除的 Gallop 与 `Assets/Plugins/StandaloneFileBrowser` 历史内容,同时保证 Unity 编辑器和 Unity 生成的 `.sln/.csproj` 不会因同名类型产生 `CS0101`、`CS0111` 或 `CS0433`。
## 已确认事实
- 保留的 `Assets/StandaloneFileBrowser` 是当前跨平台实现:包含 Windows、macOS、Linux 和 Editor 包装器。
- 被删除的 `Assets/Plugins/StandaloneFileBrowser` 已有 `StandalongFileBrowser.runtime.asmdef`,但它和保留版本都定义 `SFB.StandaloneFileBrowser` 等相同完整类型名,且两个 asmdef 都会自动被主程序集引用。因此仅恢复或仅新建 asmdef 都会重新触发类型歧义。
- 旧文件选择器缺少 macOS/Linux 的 C# 包装器;其 Windows 包装器还依赖旧的 `Ookii.Dialogs` 命名空间。它不能作为保留版本的等价跨平台替代。
- Gallop 删除项有 34 个 C# 文件。它们的内容和现有实现是否完全重合尚未完成逐类型审计,不能直接假设可同时编译。
## 方案
1. 以反向提交恢复删除内容,保留现有跨平台文件选择器作为默认实现。
2. 将恢复的旧文件选择器改为明确的“历史 Windows 兼容程序集”:使用独立 asmdef、关闭自动引用,并赋予不与默认 `SFB` 冲突的命名空间。
3. 该历史程序集只在确有旧调用方时由调用程序集显式引用;默认应用程序集只引用 `Assets/StandaloneFileBrowser` 的跨平台实现。
4. 逐个比较恢复的 Gallop 类型与保留类型的命名空间、公共成员、调用方和运行职责。完全等价的重复项不进入默认构建;存在真实行为差异的类型将被迁移到显式的兼容命名空间或通过版本定义作为互斥实现选择,绝不让两个同名类型同时暴露给同一调用程序集。
5. 将 Unity asmdef 的依赖图作为唯一事实来源。`.sln/.csproj` 仅由 Unity 重新生成,不手写一份会与 Unity 构建规则脱节的解决方案文件。
## 验证
- Unity 脚本重新导入后控制台无重复类型或程序集歧义错误。
- `dotnet build umamusume.csproj -nologo` 无错误。
- 默认 Windows、macOS、Linux 构建均选择保留的跨平台文件选择器。
- 历史 Windows 兼容程序集开启时,其类型不会与默认 `SFB` 类型冲突。
- Gallop 每个恢复类型均有比对结论:保留、迁移兼容命名空间、条件选择,或确认删除。
## 风险与取舍
“两个内容不同但完整类型名相同的模块同时给同一个调用方使用”在 .NET/Unity 中没有无损自动兼容方案:调用方必须明确依赖其中一个实现。asmdef 只能隔离程序集,不能消除公开类型的同名歧义;命名空间迁移或条件化选择是必要步骤。
## 执行状态
- [x] 完成现状、程序集关系和文件选择器版本差异初查。
- [x] 恢复历史文件并建立隔离程序集。
- [ ] 完成 Gallop 逐类型差异与依赖审计。
- [x] 调整 asmdef 依赖与版本定义。
- [x] 完成 `dotnet build` 验证;Unity 已打开,待编辑器自动重导入后确认。
## 开发者约定
`Assets/StandaloneFileBrowser` 是默认、跨平台且必须受 Git 跟踪的实现。不要将它的源码或 `SFB.asmdef` 加入 `.gitignore`:`.gitignore` 不能关闭已跟踪程序集的编译,反而会使新克隆的工程缺少必要文件。
`Assets/Plugins/StandaloneFileBrowser` 仅保留为 `SFB.LegacyWindows` 历史兼容程序集,默认不自动引用。业务代码必须继续使用默认的 `SFB`,除非调用方明确需要旧 Windows 行为并显式依赖 `SFB.LegacyWindows`。
`Assets/Scripts/umamusume/Gallop/LegacyCompatibility` 的恢复代码属于 `Gallop.Legacy`。该程序集目前由未定义的 `GALLOP_LEGACY_COMPAT_UNSUPPORTED` 约束禁用,既不会自动引用,也不会参与默认编译。后续完成 API 迁移前,禁止定义该符号。
## 当前审计结果
- `StandaloneFileBrowser.LegacyWindows` 已独立编译通过;默认程序集仍只使用跨平台的 `SFB`。
- Gallop 的 34 个恢复脚本不能直接与 `umamusume` 分离编译。验证中出现 111 个错误:同名的 `LiveTimelineDefine` 枚举、`ILiveTimelineKeyDataList` 接口及其集合跨程序集后具有不同的类型标识,无法相互赋值。
- 因此 `Gallop.Legacy` 现阶段只作为受版本控制的历史源码保留,默认禁用。若要让它成为可启用模块,下一阶段必须逐个迁移其公开 API 到 `Gallop.Legacy` 命名空间,并为与主程序集交互的类型建立显式适配层。
+271
View File
@@ -0,0 +1,271 @@
# PMX 导出规范与修复复盘
最后更新:2026-09-26
本文记录 UmaViewer PMX 导出修复的根因、实现原则、PMX/MMD 兼容边界和回归验证方法。目标是让后续修改继续面向通用 PMX/MMD 工具链,而不是只保证某一个加载器能够读取。
## 1. 结论
这次故障不是单一骨骼角度错误,而是三个问题叠加:
1. 导出参考姿势来自不完整、时机不稳定的运行时快照,特殊预览动作会残留到 PMX 基础姿势。
2. Unity 运行时骨架被直接当作 MMD 控制骨架导出,缺少稳定的 MMD 控制层级、腿部 IK 和严格的索引关系。
3. PMX IK 角度限制错误复用了空间向量的坐标转换函数,导致符号翻转、上下限倒置,并最终使部分求解器在执行角度限制时崩溃。
最终方案遵循以下原则:
- PMX 导出结果必须与当前预览动作无关。
- PMX 与 VMD 必须使用同一套项目参考姿势。
- 导出是一个有完整回滚能力的事务。
- PMX 字段按语义分类读写,位置、方向、角度不能共用同一种转换。
- PMX 文件格式要求与 MMD 生态骨骼约定必须分开描述。
## 2. “PMX 标准”与“MMD 标准骨架”的边界
需要先澄清一个容易造成错误实现的概念:
- PMX 2.x 是二进制模型格式规范,规定数据布局、索引、骨骼标志、IK 数据、权重和材质等字段。
- MMD 标准骨骼是为了让 VMD 动作能够按名称和结构复用而形成的生态约定。
- `全ての親`、`グルーブ`、`腰`、`上半身2`、`足IK親` 等通常被称为准标准骨骼或事实标准扩展,并不是 PMX 文件语法要求。
- PMX 没有规定模型必须是 A-pose 或 T-pose。它要求顶点、骨骼位置、权重和动作参考基准彼此一致。
- 本项目双臂各下压 `38.5°` 是 UmaViewer 的 MMD/VMD 对齐参数,不应写成适用于所有模型的通用 MMD 常量。
因此,本项目所说的“MMD 参考 A-pose”是导出约定:先恢复角色初始化姿势,再对左右上臂施加 `-38.5°`、`+38.5°` 的本地旋转,并让 PMX 与 VMD 共用这一基准。
## 3. 故障现象与根因
### 3.1 IK 限制导致加载器崩溃
日志中的关键错误是:
```text
min > max, or either was NaN. min = -0.0087, max = -3.1415927
```
预期膝盖 X 轴限制为:
```text
lower = -π
upper = -0.0087
```
旧实现使用通用 `WriteVector3` 写入 IK 角度。该函数面向空间坐标,会执行模型倍率和 Unity/PMX 坐标轴转换。角度限制不是位置向量,经过同一转换后端点符号和顺序发生变化,文件中出现 `lower > upper`。
修复后:
- IK 限制使用专用的原始 `float3` 读写函数。
- 写入前拒绝 `NaN` 和 `Infinity`。
- 写入和读取时逐轴规范化上下限。
- 骨架生成结束后再次校验 IK 目标、链接索引和限制区间。
这里的核心经验是:两个字段即使二进制布局都是 `float3`,也不代表它们拥有相同的坐标语义。
### 3.2 预览动作污染基础姿势
旧快照只保存身体主蒙皮引用骨骼的世界位置和世界旋转,而且捕获时机位于模型合并流程中。它没有覆盖:
- Animator 可能驱动的非蒙皮节点;
- 控制节点和辅助层级;
- 局部缩放;
- 父节点变换对后代节点的影响;
- 模型合并、身高处理和动画加载之间的初始化时序。
这解释了为什么某些动作导出正常,而某些动作导出后在 Blender 中像被额外套用动作:残留状态取决于该动作实际驱动了哪些 Transform。
修复后,初始化参考姿势在模型合并和身高设置完成、预览动画加载前捕获,并保存完整模型层级的:
```text
localPosition
localRotation
localScale
```
恢复时同样使用本地变换。这样父子层级按原始局部关系重建,不会因父节点的旋转或缩放产生二次偏移。
### 3.3 导出过程缺少事务边界
PMX 导出会临时改变 Animator、表情、眼动、动态骨、物理和 Transform。旧流程中的恢复逻辑分散,一旦纹理、模型构建或文件写入中途抛出异常,就可能把角色留在导出状态。
现在由 `PMXExportStateSnapshot` 统一执行:
```text
捕获当前运行时状态
-> 冻结 Animator、眼动和物理
-> 恢复初始化姿势
-> 应用项目 MMD 参考 A-pose
-> 构建并写出 PMX
-> finally 清理临时资源
-> 恢复表情、完整 Transform 和运行时组件
```
`Dispose()` 使用嵌套 `finally`,保证某一类状态恢复失败时,后续恢复步骤仍会执行。
### 3.4 Unity 骨架不能直接等同于 MMD 控制骨架
Unity 运行时层级包含蒙皮骨、控制节点、碰撞节点、Handle、Pole、Target 和其他辅助对象。全部导出会造成:
- 非动画骨进入 PMX;
- 父子关系不符合 MMD 动作预期;
- 权重引用不存在或错误的骨骼;
- 缺少 `センター`、`下半身` 和足 IK 等控制层。
新的骨架构建流程从 `SkinnedMeshRenderer.bones` 收集实际蒙皮引用,再补入动作和父链所需骨骼,并过滤明确的运行时辅助节点。被过滤骨骼的顶点权重会转交给最近的有效祖先,而不是无条件落到索引 0。
## 4. 当前导出骨架约定
当前体干控制层级为:
```text
全ての親
└─ センター
└─ グルーブ
└─ 腰
├─ 上半身
│ └─ 上半身2
└─ 下半身
├─ 左足
└─ 右足
```
腿部 IK 控制层级为:
```text
全ての親
├─ 左足IK親
│ └─ 左足IK
│ └─ 左つま先IK
└─ 右足IK親
└─ 右足IK
└─ 右つま先IK
```
足 IK 的目标和链接关系为:
```text
足IK
target: 足首
links : ひざ(有限制) -> 足(无限制)
つま先IK
target: つま先
links : 足首
```
膝盖限制使用 PMX 文件坐标语义下的负 X 区间:
```text
X: [-π, -0.0087]
Y: [0, 0]
Z: [0, 0]
```
此区间用于避免膝盖向错误方向折叠。`lower <= upper` 必须逐轴成立,且所有值必须是有限浮点数。
## 5. PMX 导出必须遵守的规则
### 5.1 索引完整性
- 父骨骼索引只能是 `-1` 或有效骨骼索引。
- 骨骼不能以自身作为父骨骼。
- 使用骨骼索引作为尾端时,尾端索引必须有效。
- IK 目标和每个 IK 链接都必须引用有效骨骼。
- 顶点权重不能引用未导出的 Unity Transform。
- 过滤骨骼后必须重新建立 Transform 到 PMX 索引的映射。
### 5.2 标志与后续数据一致
PMX 骨骼数据是由标志控制的可变结构:
- 尾端为骨骼索引或位置偏移,只能按对应标志写入一种。
- IK 标志开启时,必须写入目标、迭代次数、单次限制角、链接数量和链接数据。
- IK 链接开启角度限制时,必须继续写入下限和上限两个 `float3`。
- 读写器必须保持对称,不能只修改 Writer 而让 Reader 延续旧语义。
### 5.3 数值和单位
- PMX 浮点数据写入前应检查 `NaN` 和 `Infinity`。
- IK 单次限制角和链接角度上下限使用弧度。
- 位置向量可以经过模型尺度与坐标系转换。
- IK 欧拉角限制不能经过位置倍率。
- 通用坐标翻轴函数不能直接用于角度区间;角度应在 PMX 坐标语义下明确构造和写入。
### 5.4 基础姿势一致性
- 导出的顶点位置、骨骼位置和权重必须来自同一参考姿势。
- 导出结果不能依赖按钮按下时 Animator 恰好停在哪一帧。
- 禁止用 `Animator.Rebind()` 作为不透明的“复位”手段,除非同时证明它不会改变参考姿势、Animator 层状态和用户预览状态。
- 若模型初始化后会新增可动画 Transform,应重新评估参考姿势快照的覆盖时机。
- PMX 和 VMD 使用不同参考姿势会造成动作应用后的固定肩臂偏差。
### 5.5 MMD 名称兼容
VMD 主要通过骨骼名匹配动作,因此日文主名称必须稳定且使用正确字符。尤其要注意:
- `左足IK`、`右足IK`、`左つま先IK`、`右つま先IK` 中的 `IK` 是全角字符。
- `左ひじ`、`右ひじ` 等名称应保持 MMD 生态常用写法。
- 英文名用于辅助识别,不能替代日文主名称的动作兼容作用。
- 准标准骨骼不是 PMX 语法强制项,应按目标动作和控制需求加入,不能把所有扩展骨都称为“PMX 必需骨”。
## 6. 代码职责
| 文件 | 职责 |
| --- | --- |
| `Assets/Scripts/Exporters/ModelExporter.cs` | PMX 导出事务入口、网格/材质/权重构建和文件写出 |
| `Assets/Scripts/Exporters/PMXExportStateSnapshot.cs` | 捕获、冻结、应用参考姿势和完整恢复运行时状态 |
| `Assets/Scripts/Exporters/PMXBoneExporter.cs` | 收集有效骨骼、建立 MMD 控制层级、生成足 IK 和校验索引 |
| `Assets/Scripts/UmaContainerCharacter.cs` | 在稳定初始化时机捕获完整本地参考姿势 |
| `Assets/Scripts/Exporters/VMDRecorder/UnityHumanoidVMDRecorder.cs` | 与 PMX 共用项目 MMD 参考 A-pose |
| `Assets/Scripts/Exporters/UnityPMXRuntimeLoader/LibMMD/Writer/PMXWriter.cs` | 按 PMX 原始角度语义写入 IK 限制 |
| `Assets/Scripts/Exporters/UnityPMXRuntimeLoader/LibMMD/Reader/PMXReader.cs` | 对称读取 IK 限制,并对异常端点排序 |
| `Assets/Scripts/Exporters/UnityPMXRuntimeLoader/LibMMD/Util/MMDReaderWriteUtil.cs` | 区分空间向量与原始 `float3` 的二进制读写 |
`UnityPMXRuntimeLoader` 目录虽然名称包含 Loader,但其中同时放置了 PMX Reader、Writer 和共享二进制工具。导出器实际调用该目录中的 `PMXWriter`,所以修复 PMX 写出语义必须修改这里;Reader 同步修改用于维持往返一致性。
## 7. 回归验证清单
每次修改 PMX 导出、角色初始化、Animator 控制或骨架映射后,至少执行以下验证:
1. 分别选择一个曾导致姿势污染的动作和一个正常动作,导出同一角色。
2. 在 Blender 的 Rest Position 或等价静止骨架视图中比较两份 PMX,基础姿势应一致。
3. 在 MMD Skin 中加载,确认不崩溃,足 IK 和动作播放正常。
4. 使用另一个独立 PMX 工具加载,例如 Blender mmd_tools、nanoem 或 PMXEditor。
5. 检查左右上臂相对初始化姿势分别为 `-38.5°` 和 `+38.5°`。
6. 检查膝盖 IK 回读值约为 `[-π, -0.0087]`,且逐轴满足下限不大于上限。
7. 检查所有顶点权重、父骨、尾端、IK 目标和 IK 链接索引均有效。
8. 导出后确认预览动作、表情、眼动、动态骨和物理状态恢复。
9. 执行:
```powershell
dotnet build umamusume.csproj -nologo
git diff --check
```
本次修复已完成问题动作、正常动作、Blender 和 MMD Skin 两方面实机验证,结果全部通过。
### 7.1 普通角色单次导出实测(2026-09-26)
- 在隔离的 Unity 2022.3 编辑器中加载无声铃鹿(1002)、服装 `00`,调用现有 `ModelExporter.ExportModel`。
- 首次运行在材质处理抛出 `InvalidCastException`;单独修正材质分支后,表情处理也暴露同一类型假设。根因是收集所有 `Renderer`,却将非 `MeshRenderer` 一律当作 `SkinnedMeshRenderer`。
- 在 `ReadPMXModel` 入口统一保留 `MeshRenderer` 和 `SkinnedMeshRenderer`,使顶点、材质、表情处理共享同一网格渲染器序列;非网格渲染器不参与模型转换。
- 修复后完成真实 PMX 写出及 `PMXReader` 读回:11,110 顶点、23,477 三角形、240 骨骼、214 表情、47 刚体、36 关节。三角形顶点索引检查通过,22 个贴图引用均存在;输出的 23 个 PNG(含完整眼贴图)均通过解码校验。
- 此次验证不包含 Blender/MMD 外部加载、视觉效果或动作播放验证,也不代表全角色批量导出已经实现。
## 8. 禁止回退的实现模式
- 不要从当前 Animator 帧直接读取 PMX 基础骨架。
- 不要只快照 `SkinnedMeshRenderer.bones`。
- 不要使用世界坐标快照恢复完整骨架层级。
- 不要把碰撞体、Handle、Pole、Target 或控制节点无筛选地导出。
- 不要在过滤骨骼后继续使用旧列表位置作为 PMX 索引。
- 不要把角度、位置、方向和颜色仅因为都是 `Vector3` 就交给同一转换函数。
- 不要只为单一加载器交换 IK 上下限;文件本身应首先满足 PMX 语义和通用数值不变量。
- 不要把 `38.5°` 描述成 PMX 规范要求;它是当前角色与 VMD 导出的校准参数。
## 9. 参考资料
- [PMXEditor 0.2.3.6 所附 PMX 规格备份(日文)](https://gist.github.com/FlandreDaisuki/90ae5abf3138a15994526b6bfec73c2c)
- [PMX 2.0 文件格式英文整理](https://gist.github.com/DeXP/16ccdd09841bdc1961e0)
- [nanoem 模型编辑文档](https://nanoem.readthedocs.io/ja/latest/model.html)
- [nanoem 技术架构与 PMX 数据模型](https://nanoem.readthedocs.io/ja/latest/architecture.html)
- [babylon-mmd:PMX、标准骨架与准标准骨架说明](https://noname0310.github.io/babylon-mmd/docs/reference/understanding-mmd-behaviour/introduction-to-pmx-and-pmd/)
- [Blender mmd_tools 文档:Rest Position 与导出注意事项](https://github.com/powroupi/blender_mmd_tools/wiki/Documentation)