From 9241efaf1e009e22e4d38645f9e73a76fe608542 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 16 Mar 2022 13:55:44 +0900 Subject: [PATCH] [sw] Use a smaller size for the fish eye cube map This speeds up sw rendering of the fish eye effect. --- libs/video/renderer/sw/sw_rmain.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/video/renderer/sw/sw_rmain.c b/libs/video/renderer/sw/sw_rmain.c index 233160c64..e668b1458 100644 --- a/libs/video/renderer/sw/sw_rmain.c +++ b/libs/video/renderer/sw/sw_rmain.c @@ -982,11 +982,12 @@ renderside (byte *bufs, int side) r_refdef.fov_x = r_refdef.fov_y = 90; r_refdef.vrect.x = r_refdef.vrect.y = 0; r_refdef.vrect.height = r_refdef.vrect.width = sw_cube_map_size; - vid.height = vid.width = sw_cube_map_size; + vid.rowbytes = vid.height = vid.width = sw_cube_map_size; R_ViewChanged (); rendercopy (bufs); + vid.rowbytes = width; r_refdef.vrect = rect; vid.height = height; vid.width = width; @@ -1012,7 +1013,7 @@ renderlookup (byte **offs, byte* bufs) static void R_RenderViewFishEye (void) { - sw_cube_map_size = vid.width; + sw_cube_map_size = vid.height; int width = vid.width; //r_refdef.vrect.width; int height = vid.height; //r_refdef.vrect.height; int scrsize = sw_cube_map_size * sw_cube_map_size;