fix: Invert X and Y for baked UV texture
Build and Deploy / build-and-push (push) Successful in 1m19s
Build and Deploy / build-and-push (push) Successful in 1m19s
This commit is contained in:
@@ -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: `
|
||||
|
||||
Reference in New Issue
Block a user