[Parity][render][S1][H][R] 状态染色写死为 state 1/2 的 RGB 乘色,忽略 colorpri/colorshift;冰冷(state 11)不变蓝;玩家完全不染色 #604

Closed
opened 2026-10-02 11:42:45 +00:00 by troytt · 0 comments
Owner

1.13c 客户端保真度审计立项(基准快照:7bd1090 / main @ 77a20c7)

证据标记说明:V-data = 1.13c MPQ 数据表 (.txt / animdata.d2 / .tbl / pal.pl2);V-src = D2MOO 逆向源码;V-bin = 1.13c DLL 反汇编;K = 1.13c 公认行为。

来源审计项:render#3 — [S1][H][R] 状态染色写死为 state 1/2 的 RGB 乘色,忽略 colorpri/colorshift;冰冷(state 11)不变蓝;玩家完全不染色

  • 位置:src/client/view/unit-drawables.ts:508-517;src/client/scene/world-renderer.ts:681-690(只有怪物用 tintColor),:570-573(玩家 renderer.draw 不传 tint)
  • 代码:
    if (stateId === 1) { tintColor = [90, 155, 255] } else if (stateId === 2 && !tintColor) { tintColor = [95, 235, 95] }
    
  • 原版:V-data states.txt #1 freeze:colorpri 100 / colorshift 108 / light-r,g,b 150,215,255;#2 poison:95 / 104 / 128,255,128;#11 cold:100 / 108 / 150,215,255(冰冷减速与冻结共用同一个蓝色调色板偏移)。colorshift 是调色板变换(色表)索引,colorpri 决定多个状态并存时谁优先(K-中,机制见待确认 #8)。
  • 影响:
    • 被冷系技能减速的怪物(state 11,最常见的"变蓝")完全不变色。
    • 冻结 / 中毒用 RGB 乘法代替调色板偏移,色调不对。
    • 多个状态并存时没有按 colorpri 排序(写死 1 优先于 2)。
    • 玩家中冷 / 中毒时不变色(world-renderer 的玩家分支根本不读 tintColor)。
    • states.txt 的 light-r/g/b 也没有使用。
  • 建议:按 states.txt 的 colorpri / colorshift 选出优先级最高的状态,再用对应的调色板变换(渲染器已有 paletteRow 管线,见 S2「渲染器」条)作用于玩家、怪物和 NPC 全部单位。
  • 已有 issue:—
> **1.13c 客户端保真度审计立项**(基准快照:`7bd1090` / `main @ 77a20c7`) > 证据标记说明:`V-data` = 1.13c MPQ 数据表 (`.txt` / `animdata.d2` / `.tbl` / `pal.pl2`);`V-src` = D2MOO 逆向源码;`V-bin` = 1.13c DLL 反汇编;`K` = 1.13c 公认行为。 ### 来源审计项:`render#3` — [S1][H][R] 状态染色写死为 state 1/2 的 RGB 乘色,忽略 colorpri/colorshift;冰冷(state 11)不变蓝;玩家完全不染色 - 位置:`src/client/view/unit-drawables.ts:508-517`;`src/client/scene/world-renderer.ts:681-690`(只有怪物用 `tintColor`),`:570-573`(玩家 `renderer.draw` 不传 tint) - 代码: ```ts if (stateId === 1) { tintColor = [90, 155, 255] } else if (stateId === 2 && !tintColor) { tintColor = [95, 235, 95] } ``` - 原版:V-data `states.txt` #1 freeze:colorpri 100 / colorshift 108 / light-r,g,b 150,215,255;#2 poison:95 / 104 / 128,255,128;**#11 cold:100 / 108 / 150,215,255**(冰冷减速与冻结共用同一个蓝色调色板偏移)。colorshift 是调色板变换(色表)索引,colorpri 决定多个状态并存时谁优先(K-中,机制见待确认 #8)。 - 影响: - 被冷系技能减速的怪物(state 11,最常见的"变蓝")完全不变色。 - 冻结 / 中毒用 RGB 乘法代替调色板偏移,色调不对。 - 多个状态并存时没有按 colorpri 排序(写死 1 优先于 2)。 - 玩家中冷 / 中毒时不变色(world-renderer 的玩家分支根本不读 `tintColor`)。 - states.txt 的 light-r/g/b 也没有使用。 - 建议:按 `states.txt` 的 colorpri / colorshift 选出优先级最高的状态,再用对应的调色板变换(渲染器已有 `paletteRow` 管线,见 S2「渲染器」条)作用于玩家、怪物和 NPC 全部单位。 - 已有 issue:—
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: troytt/diablo2-web#604
No description provided.