Added flag to flip vertex position y coordinates
This commit is contained in:
parent
7b46e71f33
commit
2b28a60e17
1 changed files with 5 additions and 5 deletions
|
|
@ -539,10 +539,10 @@ namespace vkglTF
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum FileLoadingFlags {
|
typedef enum FileLoadingFlags {
|
||||||
None = 0,
|
None = 0x00000000,
|
||||||
PreTransformVertices = 1,
|
PreTransformVertices = 0x00000001,
|
||||||
PreMultiplyVertexColors = 2,
|
PreMultiplyVertexColors = 0x00000002,
|
||||||
FlipY = 3
|
FlipY = 0x00000004
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1058,7 +1058,7 @@ namespace vkglTF
|
||||||
vertex.pos = glm::vec3(localMatrix * glm::vec4(vertex.pos, 1.0f));
|
vertex.pos = glm::vec3(localMatrix * glm::vec4(vertex.pos, 1.0f));
|
||||||
}
|
}
|
||||||
// Flip Y-Axis of vertex positions
|
// Flip Y-Axis of vertex positions
|
||||||
if (preTransform) {
|
if (flipY) {
|
||||||
vertex.pos.y *= -1.0f;
|
vertex.pos.y *= -1.0f;
|
||||||
}
|
}
|
||||||
// Pre-Multiply vertex colors with material base color
|
// Pre-Multiply vertex colors with material base color
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue