From 2d634b7cf765bb719326860fb60caedd6007c610 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 28 Sep 2022 22:24:22 +0900 Subject: [PATCH] [vulkan] Shift the 2d view by 0.5 pixels in X and Y Lines drawn along the top and left edges were not displayed because they were just off screen. --- libs/video/renderer/vid_render_vulkan.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/video/renderer/vid_render_vulkan.c b/libs/video/renderer/vid_render_vulkan.c index 2b2f29e34..f7a6c103b 100644 --- a/libs/video/renderer/vid_render_vulkan.c +++ b/libs/video/renderer/vid_render_vulkan.c @@ -360,9 +360,11 @@ vulkan_set_2d (int scaled) __auto_type mctx = vulkan_ctx->matrix_context; __auto_type mat = &mctx->matrices; - int width = vid.width; //FIXME vid - int height = vid.height; - QFV_Orthographic (mat->Projection2d, 0, width, 0, height, 0, 99999); + float left = -0.5; + float top = -0.5; + float right = left + vid.width; //FIXME vid + float bottom = top + vid.height; + QFV_Orthographic (mat->Projection2d, left, right, top, bottom, 0, 99999); mctx->dirty = mctx->frames.size; }