Skip to content

fix(render): 清除 #193 遗留的 UV v 翻转——修位置时把内容翻倒了#206

Merged
appergb merged 2 commits into
betafrom
fix/193-uv-flip-followup
Jul 6, 2026
Merged

fix(render): 清除 #193 遗留的 UV v 翻转——修位置时把内容翻倒了#206
appergb merged 2 commits into
betafrom
fix/193-uv-flip-followup

Conversation

@appergb

@appergb appergb commented Jul 6, 2026

Copy link
Copy Markdown
Owner

回归现象(真机复现于修复版 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 测试测的是遮罩区域位置。内容朝向是测试盲区。

修复 + 回归防线

  • UV 直通:mix(crop_uv.xy, crop_uv.zw, q),不再翻 v
  • 新增 texture_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

baiqing 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.
@appergb appergb merged commit e53f7fa into beta Jul 6, 2026
2 checks 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