From 312d64bb4aef7e4c5df6f950914ae64dda7db944 Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 9 Feb 2018 17:42:09 +0000 Subject: [PATCH] try to fix non-glsl skybox. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5211 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_backend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/gl/gl_backend.c b/engine/gl/gl_backend.c index e12573481..13f1f5a6f 100644 --- a/engine/gl/gl_backend.c +++ b/engine/gl/gl_backend.c @@ -1748,9 +1748,9 @@ static float *tcgen3(const shaderpass_t *pass, int cnt, float *dst, const mesh_t src = mesh->xyz_array; for (i = 0; i < cnt; i++, dst += 3) { - dst[0] = src[i][0] - shaderstate.modelmatrix[3]; - dst[1] = shaderstate.modelmatrix[7] - src[i][1]; - dst[2] = src[i][2] - shaderstate.modelmatrix[11]; + dst[0] = src[i][0] - r_refdef.vieworg[0]; + dst[1] = r_refdef.vieworg[1] - src[i][1]; + dst[2] = src[i][2] - r_refdef.vieworg[2]; } return dst-cnt*3;