fix: Invert X and Y for baked UV texture
Build and Deploy / build-and-push (push) Successful in 1m19s

This commit is contained in:
AI Bot
2026-09-17 09:41:34 +05:30
parent e2ae339abf
commit 12e406664b
+2 -4
View File
@@ -120,10 +120,8 @@ export function bakeTextureToNewUVs(
varying vec2 vOldUV;
void main() {
vOldUV = uv2;
// The new UVs (uv) range from 0 to 1.
// We map them to clip space: -1 to 1.
// Also flip Y so the texture is right-side up.
gl_Position = vec4(uv.x * 2.0 - 1.0, (uv.y * 2.0 - 1.0), 0.0, 1.0);
// Flip X and Y to fix upside down and reversed texture
gl_Position = vec4(1.0 - uv.x * 2.0, 1.0 - uv.y * 2.0, 0.0, 1.0);
}
`,
fragmentShader: `