fix(terrain): restore translucent depth-mask semantics for pass-1 TESR fluids - #111
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
修复 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 遮挡掉:startDrawing()主动glDepthMask(writesDepth),覆盖外层的depthMask(false);排查链:二分锁定 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 结构/桥契约测试)。验证过的光影包与模组
关联
文档
docs/compatibility-matrix.md:EnderIO 行更新 + 2026-09-02 回潮根因追加段。