fix(render): 清除 #193 遗留的 UV v 翻转——修位置时把内容翻倒了#206
Merged
Conversation
added 2 commits
July 6, 2026 22:49
…rrored NDC The #193 NDC y-flip fix left the shader's '1.0 - uv.y' in place, which had only ever existed to compensate the mirrored NDC line. With the position fix in, every clip's texture CONTENT rendered upside down while its box sat at the correct place (real-device regression: text glyphs and video frames inverted). The position tests were blind to this — solid-color clips have no orientation — so this adds a two-band (red-top/blue-bottom) texture probe plus a flip_vertical companion locking authored-flip semantics.
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.
回归现象(真机复现于修复版 1.0.0)
#193(PR #203)把 NDC y 翻转修对后,clip 的盒子位置正确、纹理内容上下颠倒:文字字形倒立、视频画面倒置。
根因
shader.wgsl 顶点段的
1.0 - uv.y是为旧的镜像 NDC 行配对存在的补偿翻转;NDC 修好后它成了孤儿,把内容翻倒。与 canvas_uv(mask)在 #203 里已同步处理的补偿翻转是同一模式,UV 这处漏掉了。为什么 #203 的测试没抓住
4 个位置测试全用纯色块——纯色对 UV 翻转天然免疫;mask 测试测的是遮罩区域位置。内容朝向是测试盲区。
修复 + 回归防线
mix(crop_uv.xy, crop_uv.zw, q),不再翻 vtexture_top_row_renders_at_top_of_placed_box(上红下蓝双色带纹理,修复前红、修复后绿)flip_vertical_still_inverts_content(锁定 authored flip 语义不被吃掉)cargo test -p opentake-render 全绿(含 #203 的 6 项定向/mask 测试)、-p opentake-tauri 全绿、clippy -D warnings 零告警。
Refs #193