[sw] Disable water warp when doing fisheye

The two aren't compatible (but warping might be doable in the fisheye
code). The whole frame setup code needs a rework, and really, even the
buffer handling.
This commit is contained in:
Bill Currie 2022-03-17 09:42:09 +09:00
parent 9241efaf1e
commit d3bfc54a68
1 changed files with 8 additions and 3 deletions

View File

@ -198,6 +198,13 @@ R_SetupFrame (void)
r_dowarp = r_waterwarp->int_val && (r_refdef.viewleaf->contents <= r_dowarp = r_waterwarp->int_val && (r_refdef.viewleaf->contents <=
CONTENTS_WATER); CONTENTS_WATER);
if (scr_fisheye->int_val) {
//FIXME this shouldn't be necessary, but warp doesn't work well in
//fisheye, aand allowing the non-warp code to mess with vrect messes
//things up for the cube map rendering. This whole frame setup path
//needs to be redesigned
r_dowarp = r_viewchanged = 0;
}
if ((r_dowarp != r_dowarpold) || r_viewchanged) { if ((r_dowarp != r_dowarpold) || r_viewchanged) {
if (r_dowarp) { if (r_dowarp) {
if ((vid.width <= WARP_WIDTH) if ((vid.width <= WARP_WIDTH)
@ -233,9 +240,7 @@ R_SetupFrame (void)
(h / (float) vid.height))); (h / (float) vid.height)));
R_ViewChanged (); R_ViewChanged ();
} }
} else if (!scr_fisheye->int_val) { } else {
//FIXME the above test shouldn't be necessary (this whole section
//is a bit of a mess, though)
r_refdef.vrect.x = vr_data.scr_view->xpos; r_refdef.vrect.x = vr_data.scr_view->xpos;
r_refdef.vrect.y = vr_data.scr_view->ypos; r_refdef.vrect.y = vr_data.scr_view->ypos;
r_refdef.vrect.width = vr_data.scr_view->xlen; r_refdef.vrect.width = vr_data.scr_view->xlen;