diff --git a/Projects/Android/jni/darkplaces/gl_backend.c b/Projects/Android/jni/darkplaces/gl_backend.c index 55a3779..d8f9862 100644 --- a/Projects/Android/jni/darkplaces/gl_backend.c +++ b/Projects/Android/jni/darkplaces/gl_backend.c @@ -961,7 +961,7 @@ void R_Viewport_InitPerspective(r_viewport_t *v, const matrix4x4_t *cameramatrix Matrix4x4_FromArrayFloatGL(&v->projectmatrix, m); } -void R_Viewport_InitPerspectiveInfinite(r_viewport_t *v, const matrix4x4_t *cameramatrix, int x, int y, int width, int height, float frustumx, float frustumy, float nearclip, const float *nearplane, const int allowwaterclippingplane) +void R_Viewport_InitPerspectiveInfinite(r_viewport_t *v, const matrix4x4_t *cameramatrix, int x, int y, int width, int height, float frustumx, float frustumy, float nearclip, const float *nearplane) { matrix4x4_t tempmatrix, basematrix; const float nudge = 1.0 - 1.0 / (1<<23); @@ -1001,11 +1001,7 @@ void R_Viewport_InitPerspectiveInfinite(r_viewport_t *v, const matrix4x4_t *came m[12] = -m[12]; } - if (allowwaterclippingplane) - { - VR_GetVRProjection(r_stereo_side, nearclip, 8192, m); - } - + VR_GetVRProjection(r_stereo_side, nearclip, (1<<23), m); Matrix4x4_FromArrayFloatGL(&v->projectmatrix, m); } diff --git a/Projects/Android/jni/darkplaces/gl_backend.h b/Projects/Android/jni/darkplaces/gl_backend.h index a9ffa6f..04d23db 100644 --- a/Projects/Android/jni/darkplaces/gl_backend.h +++ b/Projects/Android/jni/darkplaces/gl_backend.h @@ -26,7 +26,7 @@ void R_Viewport_TransformToScreen(const r_viewport_t *v, const vec4_t in, vec4_t qboolean R_ScissorForBBox(const float *mins, const float *maxs, int *scissor); void R_Viewport_InitOrtho(r_viewport_t *v, const matrix4x4_t *cameramatrix, int x, int y, int width, int height, float x1, float y1, float x2, float y2, float zNear, float zFar, const float *nearplane); void R_Viewport_InitPerspective(r_viewport_t *v, const matrix4x4_t *cameramatrix, int x, int y, int width, int height, float frustumx, float frustumy, float zNear, float zFar, const float *nearplane); -void R_Viewport_InitPerspectiveInfinite(r_viewport_t *v, const matrix4x4_t *cameramatrix, int x, int y, int width, int height, float frustumx, float frustumy, float zNear, const float *nearplane, const int allowwaterclippingplane); +void R_Viewport_InitPerspectiveInfinite(r_viewport_t *v, const matrix4x4_t *cameramatrix, int x, int y, int width, int height, float frustumx, float frustumy, float zNear, const float *nearplane); void R_Viewport_InitCubeSideView(r_viewport_t *v, const matrix4x4_t *cameramatrix, int side, int size, float nearclip, float farclip, const float *nearplane); void R_Viewport_InitRectSideView(r_viewport_t *v, const matrix4x4_t *cameramatrix, int side, int size, int border, float nearclip, float farclip, const float *nearplane); void R_SetViewport(const r_viewport_t *v); diff --git a/Projects/Android/jni/darkplaces/gl_rmain.c b/Projects/Android/jni/darkplaces/gl_rmain.c index 6d3467a..0d44fce 100644 --- a/Projects/Android/jni/darkplaces/gl_rmain.c +++ b/Projects/Android/jni/darkplaces/gl_rmain.c @@ -5613,7 +5613,7 @@ void R_SetupView(qboolean allowwaterclippingplane, int fbo, rtexture_t *depthtex if (!r_refdef.view.useperspective) R_Viewport_InitOrtho(&r_refdef.view.viewport, &r_refdef.view.matrix, r_refdef.view.x, rtheight - scaledheight - r_refdef.view.y, scaledwidth, scaledheight, -r_refdef.view.ortho_x, -r_refdef.view.ortho_y, r_refdef.view.ortho_x, r_refdef.view.ortho_y, -r_refdef.farclip, r_refdef.farclip, customclipplane); else if (vid.stencil && r_useinfinitefarclip.integer) - R_Viewport_InitPerspectiveInfinite(&r_refdef.view.viewport, &r_refdef.view.matrix, r_refdef.view.x, rtheight - scaledheight - r_refdef.view.y, scaledwidth, scaledheight, r_refdef.view.frustum_x, r_refdef.view.frustum_y, r_refdef.nearclip, customclipplane, allowwaterclippingplane); + R_Viewport_InitPerspectiveInfinite(&r_refdef.view.viewport, &r_refdef.view.matrix, r_refdef.view.x, rtheight - scaledheight - r_refdef.view.y, scaledwidth, scaledheight, r_refdef.view.frustum_x, r_refdef.view.frustum_y, r_refdef.nearclip, customclipplane); else R_Viewport_InitPerspective(&r_refdef.view.viewport, &r_refdef.view.matrix, r_refdef.view.x, rtheight - scaledheight - r_refdef.view.y, scaledwidth, scaledheight, r_refdef.view.frustum_x, r_refdef.view.frustum_y, r_refdef.nearclip, r_refdef.farclip, customclipplane); R_Mesh_SetRenderTargets(fbo, depthtexture, colortexture, NULL, NULL, NULL);