Skip to content

fix(terrain): restore translucent depth-mask semantics for pass-1 TESR fluids - #111

Merged
DHJComical merged 1 commit into
mainfrom
fix/enderio-tank-fluid
Sep 2, 2026
Merged

fix(terrain): restore translucent depth-mask semantics for pass-1 TESR fluids#111
DHJComical merged 1 commit into
mainfrom
fix/enderio-tank-fluid

Conversation

@DHJComical

Copy link
Copy Markdown
Owner

概述

修复 EnderIO 储罐流体显示回归:#85 的修复(da83c59)之后,储罐内流体在无光影和光影下均不渲染(容器功能正常,仅视觉缺失)。此前 #58 的光影路径修复(cb4feaa5)被该提交回潮。

根因

da83c59#85)把 translucent terrain pass 从 writesDepth(false) 翻转为 true,依据的前提是"vanilla 1.12.2 半透明地形阶段保持写深度"——该前提不实。vanilla 将整个 translucent 阶段包在 depthMask(false) 内(EntityRenderer 约 1539/1564 行),且 pass-1 方块实体(EIO 储罐流体 TESR)在半透明地形之后、同一深度掩码窗口内重绘。translucent pass 主动写深度后,储罐玻璃先写深度,把其后渲染的流体 TESR 遮挡掉:

  • 无光影路径:pass 的 startDrawing() 主动 glDepthMask(writesDepth),覆盖外层的 depthMask(false)
  • 光影路径:Iris celeritas 地形接口按 pass 的 writesDepth 决定深度掩码,同样中招。

排查链:二分锁定 7c339d2(08-22)正常、da83c59(08-24)起坏;A/B 实验确认 da83c59 单点回退该标志流体即恢复显示。

改动

  • VintageRenderPassConfigurationBuilder:translucent pass 恢复 writesDepth(false) 并附注释记录 vanilla 语义;水 pass(WATER 语义)保持 writesDepth(true) 不动(fix(shader): restore water depth writes #79 语义)。
  • IrisCeleritasChunkShaderInterface#shouldWriteDepth:translucent 语义 pass 在主 pass 不写深度,阴影图 pass 与不透明语义不变(双路径兜底)。
  • TerrainRenderPassTest:深度策略测试重写为镜像真实 builder 配置(translucent 语义 + writesDepth(true) → 主 pass 期望 false)。

如何验证

  • ./gradlew build --no-daemon 全绿(含 check:JUnit 自动化测试 + remap jar 结构/桥契约测试)。
  • 实机回归(实例 1.12.2-Cleanroom,NVIDIA RTX 5070 Laptop):

验证过的光影包与模组

  • 光影包:MakeUp Ultra Fast 9.4c(实机)
  • 模组:EnderIO CEu 5.4.2 + EnderCore CEu 0.5.81、BetterPortals Refitted 0.4.1

关联

文档

  • docs/compatibility-matrix.md:EnderIO 行更新 + 2026-09-02 回潮根因追加段。

…R fluids

da83c59 (#85) flipped the translucent terrain pass to writesDepth(true) on the
incorrect premise that vanilla keeps the depth mask on for translucent terrain.
Vanilla 1.12.2 wraps the whole translucent stage (translucent terrain plus the
pass-1 tile-entity re-render) in depthMask(false) (EntityRenderer ~L1539/1564),
so writing depth there makes translucent terrain such as EnderIO tank glass
occlude the tank fluid TESR drawn afterwards — the fluid vanished on both the
fixed-function and shader paths (#58 recurrence).

- VintageRenderPassConfigurationBuilder: translucent pass back to
  writesDepth(false); water pass keeps writesDepth(true)
- IrisCeleritasChunkShaderInterface: translucent-semantic passes never write
  depth on the main pass (shadow pass and opaque semantics unchanged)
- TerrainRenderPassTest: mirror the real builder configuration for the depth
  write policy
@DHJComical
DHJComical merged commit 6110854 into main Sep 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant