diff options
| -rw-r--r-- | demos/cube.c | 2 | ||||
| -rw-r--r-- | demos/cube.vert | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/demos/cube.c b/demos/cube.c index 17617e5e..5c4a6dc7 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -3040,6 +3040,8 @@ static void demo_init(struct demo *demo, int argc, char **argv) { 1.0f, 0.1f, 100.0f); mat4x4_look_at(demo->view_matrix, eye, origin, up); mat4x4_identity(demo->model_matrix); + + demo->projection_matrix[1][1]*=-1; //Flip projection matrix from GL to Vulkan orientation. } #if defined(VK_USE_PLATFORM_WIN32_KHR) diff --git a/demos/cube.vert b/demos/cube.vert index c09899b4..1e67f758 100644 --- a/demos/cube.vert +++ b/demos/cube.vert @@ -37,8 +37,4 @@ void main() { texcoord = ubuf.attr[gl_VertexIndex]; gl_Position = ubuf.MVP * ubuf.position[gl_VertexIndex]; - - // GL->VK conventions - gl_Position.y = -gl_Position.y; - gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0; } |
