iw = 1.0f / out[3];
out[0] = r_view_x + (out[0] * iw + 1.0f) * r_view_width * 0.5f;
out[1] = r_view_y + (out[1] * iw + 1.0f) * r_view_height * 0.5f;
- out[2] = out[2] * iw;
+ out[2] = r_view_z + (out[2] * iw + 1.0f) * r_view_depth * 0.5f;
}
// called at beginning of frame
vec3_t r_viewup;
int r_view_x;
int r_view_y;
+int r_view_z;
int r_view_width;
int r_view_height;
+int r_view_depth;
float r_view_fov_x;
float r_view_fov_y;
matrix4x4_t r_view_matrix;
r_view_width = bound(0, r_refdef.width, vid.realwidth);
r_view_height = bound(0, r_refdef.height, vid.realheight);
+ r_view_depth = 1;
r_view_x = bound(0, r_refdef.x, vid.realwidth - r_refdef.width);
r_view_y = bound(0, r_refdef.y, vid.realheight - r_refdef.height);
+ r_view_z = 0;
r_view_fov_x = bound(1, r_refdef.fov_x, 170);
r_view_fov_y = bound(1, r_refdef.fov_y, 170);
r_view_matrix = r_refdef.viewentitymatrix;
extern vec3_t r_viewup;
extern int r_view_x;
extern int r_view_y;
+extern int r_view_z;
extern int r_view_width;
extern int r_view_height;
+extern int r_view_depth;
extern float r_view_fov_x;
extern float r_view_fov_y;
extern matrix4x4_t r_view_matrix;