mirror of
https://github.com/DrBeef/QuakeQuest.git
synced 2024-11-21 19:51:13 +00:00
Fix "moving" sky on Pico
This commit is contained in:
parent
865cbc11cc
commit
d9d27e62ad
3 changed files with 4 additions and 8 deletions
|
@ -961,7 +961,7 @@ void R_Viewport_InitPerspective(r_viewport_t *v, const matrix4x4_t *cameramatrix
|
||||||
Matrix4x4_FromArrayFloatGL(&v->projectmatrix, m);
|
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;
|
matrix4x4_t tempmatrix, basematrix;
|
||||||
const float nudge = 1.0 - 1.0 / (1<<23);
|
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];
|
m[12] = -m[12];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allowwaterclippingplane)
|
VR_GetVRProjection(r_stereo_side, nearclip, (1<<23), m);
|
||||||
{
|
|
||||||
VR_GetVRProjection(r_stereo_side, nearclip, 8192, m);
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix4x4_FromArrayFloatGL(&v->projectmatrix, m);
|
Matrix4x4_FromArrayFloatGL(&v->projectmatrix, m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
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_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_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_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_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);
|
void R_SetViewport(const r_viewport_t *v);
|
||||||
|
|
|
@ -5613,7 +5613,7 @@ void R_SetupView(qboolean allowwaterclippingplane, int fbo, rtexture_t *depthtex
|
||||||
if (!r_refdef.view.useperspective)
|
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);
|
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)
|
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
|
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_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);
|
R_Mesh_SetRenderTargets(fbo, depthtexture, colortexture, NULL, NULL, NULL);
|
||||||
|
|
Loading…
Reference in a new issue