fix UVs in Code, not in shader
This commit is contained in:
parent
c0f8e10f44
commit
b3a7670c97
2 changed files with 3 additions and 4 deletions
|
@ -19,8 +19,6 @@ layout(set = 2, binding = 0) uniform sampler2D tex1;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
// Flip y coordinate of UVs to fix display
|
vec3 color = texture(tex1, texCoord).xyz;
|
||||||
float y = texCoord.y * -1;
|
|
||||||
vec3 color = texture(tex1, vec2(texCoord.x ,y)).xyz;
|
|
||||||
outFragColor = vec4(color, inColor.w);
|
outFragColor = vec4(color, inColor.w);
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,4 +188,5 @@ loadFromObj filepath vma uploadContext queue device = do
|
||||||
texCoords V.!
|
texCoords V.!
|
||||||
(fromMaybe (error "no UV coordinates present") (faceTexCoordIndex index) - 1)
|
(fromMaybe (error "no UV coordinates present") (faceTexCoordIndex index) - 1)
|
||||||
in
|
in
|
||||||
V2 r s
|
-- flip V coordinate of UVs to fix display
|
||||||
|
V2 r (-s)
|
||||||
|
|
Loading…
Reference in a new issue