fix(ShaderBake): 修正面片绕序与 MSAA 落地,补齐 _MainTex_ST 与菜单根

- 四边形原来按逆时针排三角,从默认相机方向看是背面,会被整片剔除
- MSAA 时落地目标也被建成多采样,Blit 写不进去;落地目标固定单采样
- flipY 是投影镜像,会让绕序反转,绘制期间同步翻转剔除方向
- applyUvToMainTexST 之前只有开关没有实现,改用属性块写 _MainTex_ST,不污染材质副本
- 编辑器非播放状态下 Object.Destroy 会被拒绝,JPG 压平纹理改走统一回收
- 注册路径补 ToolBar 根(XericLibrary/Tool),供烘焙窗口挂菜单
This commit is contained in:
2026-11-05 16:51:39 +08:00
parent 63173c6ec2
commit a769cbac00
7 changed files with 54 additions and 16 deletions
@@ -98,13 +98,14 @@ namespace XericUI.ShaderBake
int bottomRight = bottomLeft + 1;
int topLeft = bottomLeft + stride;
int topRight = topLeft + 1;
// 绕序按"从 -Z 往 +Z 看是顺时针"排;翻转投影时靠 output.flipY 修,不靠这里换绕序
// Unity 认定顺时针为正面(视线方向上的屏幕顺时针),所以是 左下→左上→右下;
// 顺序写反了整张面片会被背面剔除掉,画面全空还查不出原因
triangles.Add(bottomLeft);
triangles.Add(bottomRight);
triangles.Add(topLeft);
triangles.Add(bottomRight);
triangles.Add(topLeft);
triangles.Add(topRight);
triangles.Add(topLeft);
triangles.Add(bottomRight);
}
var mesh = NewMesh("ShaderBakeQuad");