fix UVs in Code, not in shader

This commit is contained in:
nek0 2023-05-30 01:44:20 +01:00
parent c0f8e10f44
commit b3a7670c97
2 changed files with 3 additions and 4 deletions

View file

@ -19,8 +19,6 @@ layout(set = 2, binding = 0) uniform sampler2D tex1;
void main()
{
// Flip y coordinate of UVs to fix display
float y = texCoord.y * -1;
vec3 color = texture(tex1, vec2(texCoord.x ,y)).xyz;
vec3 color = texture(tex1, texCoord).xyz;
outFragColor = vec4(color, inColor.w);
}

View file

@ -188,4 +188,5 @@ loadFromObj filepath vma uploadContext queue device = do
texCoords V.!
(fromMaybe (error "no UV coordinates present") (faceTexCoordIndex index) - 1)
in
V2 r s
-- flip V coordinate of UVs to fix display
V2 r (-s)