graph TD
A[Constants] -->|初始化全局变量| B[Key]
B -->|按键事件触发| C[CommandList]
D[TextureOverride] -->|纹理匹配时执行| C
E[ShaderOverride] -->|着色器匹配时执行| C
F[Present] -->|每帧结束时执行| C
C -->|变量传递| G[ShaderRegex]
G -->|注入修改| H[GPU执行]
style A fill:#f9f,stroke:#333
style B fill:#cff,stroke:#333
style C fill:#ffc,stroke:#333
style D fill:#fcc,stroke:#333
style E fill:#cfc,stroke:#333
style F fill:#ccf,stroke:#333
sequenceDiagram
participant Game
participant 3DMigoto
participant GPU
Game->>3DMigoto: CreateTexture/Shader
3DMigoto->>3DMigoto: 计算哈希值
alt 纹理哈希匹配
3DMigoto->>[TextureOverride]: 执行关联CommandList
else 着色器哈希匹配
3DMigoto->>[ShaderOverride]: 执行CommandList
3DMigoto->>[ShaderRegex]: 汇编代码修改
end
Game->>3DMigoto: DrawCall
3DMigoto->>GPU: 注入修改后的着色器
3DMigoto->>GPU: 绑定覆盖的纹理
Game->>3DMigoto: Present()
3DMigoto->>[Present]: 执行帧末逻辑
3DMigoto->>GPU: 提交绘制命令
loop 每帧
GPU-->>3DMigoto: 寄存器状态反馈
3DMigoto->>[CommandList]: 条件执行逻辑
end
评论