Live: implement MirrorReflection — and it resolves the stage floor blow-out
Rebuilt Gallop.MirrorReflection from its original signature, so Unity deserializes the real
fields out of the bundle rather than anything being inferred. All 13 field names are copied
verbatim from the TypeTree, including the original's typo `_mirrorCliipPlaneOffset` — spelling
it correctly would silently receive no data.
The receiving end was looked up, not guessed. mtl_env_liveNNNNN_mirror000 uses
Cygames/MirrorAndShadow/ReceiveMirror, which declares exactly four properties — _MainTex,
_ReflectionTex, _Color, _ReflectionRate — and the component's _mirrorReflectionColor and
_mirrorReflectionRate line up with the last two name for name. Texture size, cull mask, clear
colour and clip-plane offset all come straight from the serialized values, which differ per
stage (256/12544 on live10149, 512/12288 on live10132), confirming real data is arriving.
Deliberately not implemented, because there is no ground truth for them:
* _direction is an enum whose meaning is unrecoverable — IL2CPP metadata is encrypted.
The mirror plane is derived from the mesh's own normals instead, which is geometry rather
than a guess, and yields (0,1,0) on both stages. The field's value is logged as unused.
* _mirrorDistortionTileOffset / _mirrorDistortionPower belong to the ReceiveDistortionMirror
variant; these materials use the plain one.
* _useMirrorTextureScale / _mirrorTextureScaleForBaseCamera — semantics unknown.
Rendering goes through RenderPipelineManager.beginCameraRendering and RenderSingleCamera.
Camera.Render() is not supported under SRP and would have failed silently.
This also settles the long-standing floor blow-out, and the diagnosis I had been running was
aimed at the wrong objects the entire time. ReceiveMirror's _ReflectionRate defaults to 1.0
while _ReflectionTex had never been assigned, and Unity substitutes a white texture for an
unbound sampler — a full-strength white reflection, i.e. a solid white floor. Binding the
reflection RT fixes it.
CLAUDE.md recorded the blown-out objects as plane_000 / stage_object_001 / specular_002 and I
took that as given, spending four rounds eliminating mechanisms on those three. The actual
culprit is mirror_a, which sits at the same position and scale under the same parent — visually
indistinguishable, entirely different name. The earlier "_EnvRate = 0 changes nothing" result
was consistent all along: it was toggling a different set of objects.
Both files gain the lesson: field values and shader property tables are hard data, but a
document's description of which object looks wrong is not, and a visual bug should start by
confirming which object the symptom belongs to.
Water surfaces are absent, not broken — none of the three downloaded stages has a ReceiveWater
material; each has exactly one ReceiveMirror.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -173,6 +173,20 @@ MonoBehaviour 实例脚本为空。**但这些脚本是可以「接管」的**
|
||||
- **速度/系数一类的常量** —— 如果原版在代码里对动画做了调速,那个倍率无从得知。
|
||||
- 未随包发布的 shader(PostFilm 的定义性 shader 就在 app 二进制里)。
|
||||
|
||||
### ⚠ 现象描述不是 ground truth
|
||||
|
||||
字段值、shader 属性表是硬数据;**「哪个物件看起来不对」不是** —— 文档里的现象描述往往
|
||||
没经过验证。地板发白排查栽在这上面:文档记着 `plane_000` / `stage_object_001` /
|
||||
`specular_002` 发白,整轮排查都围着这三个转,最后查明白的其实是**叠在同一位置的
|
||||
`mirror_a`**(同在 `pfb_env_live10149_main000` 下、局部变换全为单位,肉眼分不出)。
|
||||
它用 `Cygames/MirrorAndShadow/ReceiveMirror`,`_ReflectionRate` 默认 1.0 而
|
||||
`_ReflectionTex` 从没赋值 —— Unity 对未绑定采样器代入白贴图,满强度白反射。
|
||||
|
||||
期间那个「把 `_EnvRate` 归零无变化」的实验因此也是误导:切的是另一批物件。
|
||||
|
||||
**排查视觉问题的第一步应该是确认现象归属于哪个物件**(让代码把可疑物件隔离/高亮),
|
||||
而不是从文档里的名字出发。
|
||||
|
||||
### 间接手段(已被证明有效)
|
||||
|
||||
拿不到直接答案时,**相关性交叉验证**多次奏效,比猜测可靠得多:
|
||||
|
||||
Reference in New Issue
Block a user