vkQuake2 doxygen  1.0 dev
r_alias.c File Reference
#include "r_local.h"
#include "anorms.h"

Go to the source code of this file.

Classes

struct  aliasbatchedtransformdata_t
 

Macros

#define NUMVERTEXNORMALS   162
 
#define BBOX_TRIVIAL_ACCEPT   0
 
#define BBOX_MUST_CLIP_XY   1
 
#define BBOX_MUST_CLIP_Z   2
 
#define BBOX_TRIVIAL_REJECT   8
 

Functions

void R_AliasSetUpLerpData (dmdl_t *pmdl, float backlerp)
 
void R_AliasSetUpTransform (void)
 
void R_AliasTransformVector (vec3_t in, vec3_t out, float m[3][4])
 
void R_AliasProjectAndClipTestFinalVert (finalvert_t *fv)
 
void R_AliasTransformFinalVerts (int numpoints, finalvert_t *fv, dtrivertx_t *oldv, dtrivertx_t *newv)
 
void R_AliasLerpFrames (dmdl_t *paliashdr, float backlerp)
 
unsigned long R_AliasCheckFrameBBox (daliasframe_t *frame, float worldxf[3][4])
 
qboolean R_AliasCheckBBox (void)
 
void R_AliasPreparePoints (void)
 
static qboolean R_AliasSetupSkin (void)
 
void R_AliasSetupLighting (void)
 
void R_AliasSetupFrames (dmdl_t *pmdl)
 
void R_AliasDrawModel (void)
 

Variables

byte iractive
 
int r_amodels_drawn
 
affinetridesc_t r_affinetridesc
 
vec3_t r_plightvec
 
vec3_t r_prlightvec
 
vec3_t r_pglightvec
 
vec3_t r_pblightvec
 
vec3_t r_lerped [1024]
 
vec3_t r_lerp_frontv
 
vec3_t r_lerp_backv
 
vec3_t r_lerp_move
 
int r_ambientlight
 
int r_aliasblendcolor
 
float r_shadelight
 
daliasframe_tr_thisframe
 
daliasframe_tr_lastframe
 
dmdl_ts_pmdl
 
float aliastransform [3][4]
 
float aliasworldtransform [3][4]
 
float aliasoldworldtransform [3][4]
 
static float s_ziscale
 
static vec3_t s_alias_forward
 
static vec3_t s_alias_right
 
static vec3_t s_alias_up
 
float r_avertexnormals [NUMVERTEXNORMALS][3]
 
aliasbatchedtransformdata_t aliasbatchedtransformdata
 

Macro Definition Documentation

◆ BBOX_MUST_CLIP_XY

#define BBOX_MUST_CLIP_XY   1

Definition at line 85 of file r_alias.c.

◆ BBOX_MUST_CLIP_Z

#define BBOX_MUST_CLIP_Z   2

Definition at line 86 of file r_alias.c.

◆ BBOX_TRIVIAL_ACCEPT

#define BBOX_TRIVIAL_ACCEPT   0

Definition at line 84 of file r_alias.c.

◆ BBOX_TRIVIAL_REJECT

#define BBOX_TRIVIAL_REJECT   8

Definition at line 87 of file r_alias.c.

◆ NUMVERTEXNORMALS

#define NUMVERTEXNORMALS   162

Definition at line 62 of file r_alias.c.

Function Documentation

◆ R_AliasCheckBBox()

qboolean R_AliasCheckBBox ( void  )

Definition at line 182 of file r_alias.c.

183 {
184  unsigned long ccodes[2] = { 0, 0 };
185 
187 
188  /*
189  ** non-lerping model
190  */
191  if (currententity->backlerp == 0)
192  {
193  if (ccodes[0] == BBOX_TRIVIAL_ACCEPT)
194  return BBOX_TRIVIAL_ACCEPT;
195  else if (ccodes[0] & BBOX_TRIVIAL_REJECT)
196  return BBOX_TRIVIAL_REJECT;
197  else
198  return (ccodes[0] & ~BBOX_TRIVIAL_REJECT);
199  }
200 
202 
203  if ((ccodes[0] | ccodes[1]) == BBOX_TRIVIAL_ACCEPT)
204  return BBOX_TRIVIAL_ACCEPT;
205  else if ((ccodes[0] & ccodes[1]) & BBOX_TRIVIAL_REJECT)
206  return BBOX_TRIVIAL_REJECT;
207  else
208  return (ccodes[0] | ccodes[1]) & ~BBOX_TRIVIAL_REJECT;
209 }

Referenced by R_AliasDrawModel().

◆ R_AliasCheckFrameBBox()

unsigned long R_AliasCheckFrameBBox ( daliasframe_t frame,
float  worldxf[3][4] 
)

Definition at line 94 of file r_alias.c.

95 {
96  unsigned long aggregate_and_clipcode = ~0U,
97  aggregate_or_clipcode = 0;
98  int i;
99  vec3_t mins, maxs;
100  vec3_t transformed_min, transformed_max;
101  qboolean zclipped = false, zfullyclipped = true;
102 
103  /*
104  ** get the exact frame bounding box
105  */
106  for (i = 0; i < 3; i++)
107  {
108  mins[i] = frame->translate[i];
109  maxs[i] = mins[i] + frame->scale[i] * 255;
110  }
111 
112  /*
113  ** transform the min and max values into view space
114  */
115  R_AliasTransformVector(mins, transformed_min, aliastransform);
116  R_AliasTransformVector(maxs, transformed_max, aliastransform);
117 
118  if (transformed_min[2] >= ALIAS_Z_CLIP_PLANE)
119  zfullyclipped = false;
120  if (transformed_max[2] >= ALIAS_Z_CLIP_PLANE)
121  zfullyclipped = false;
122 
123  if (zfullyclipped)
124  {
125  return BBOX_TRIVIAL_REJECT;
126  }
127  if (zclipped)
128  {
130  }
131 
132  /*
133  ** build a transformed bounding box from the given min and max
134  */
135  for (i = 0; i < 8; i++)
136  {
137  int j;
138  vec3_t tmp, transformed;
139  unsigned long clipcode = 0;
140 
141  if (i & 1)
142  tmp[0] = mins[0];
143  else
144  tmp[0] = maxs[0];
145 
146  if (i & 2)
147  tmp[1] = mins[1];
148  else
149  tmp[1] = maxs[1];
150 
151  if (i & 4)
152  tmp[2] = mins[2];
153  else
154  tmp[2] = maxs[2];
155 
156  R_AliasTransformVector(tmp, transformed, worldxf);
157 
158  for (j = 0; j < 4; j++)
159  {
160  float dp = DotProduct(transformed, view_clipplanes[j].normal);
161 
162  if ((dp - view_clipplanes[j].dist) < 0.0F)
163  clipcode |= 1 << j;
164  }
165 
166  aggregate_and_clipcode &= clipcode;
167  aggregate_or_clipcode |= clipcode;
168  }
169 
170  if (aggregate_and_clipcode)
171  {
172  return BBOX_TRIVIAL_REJECT;
173  }
174  if (!aggregate_or_clipcode)
175  {
176  return BBOX_TRIVIAL_ACCEPT;
177  }
178 
179  return BBOX_MUST_CLIP_XY;
180 }

Referenced by R_AliasCheckBBox().

◆ R_AliasDrawModel()

void R_AliasDrawModel ( void  )

Definition at line 1068 of file r_alias.c.

1069 {
1070  extern void(*d_pdrawspans)(void *);
1071  extern void R_PolysetDrawSpans8_Opaque_Coloured(void *);
1072  extern void R_PolysetDrawSpans8_33(void *);
1073  extern void R_PolysetDrawSpans8_66(void *);
1074  extern void R_PolysetDrawSpansConstant8_33(void *);
1075  extern void R_PolysetDrawSpansConstant8_66(void *);
1076 
1078 
1079  if (r_lerpmodels->value == 0)
1080  currententity->backlerp = 0;
1081 
1083  {
1084  if (r_lefthand->value == 1.0F)
1086  else if (r_lefthand->value == 2.0F)
1087  return;
1088  }
1089 
1090  /*
1091  ** we have to set our frame pointers and transformations before
1092  ** doing any real work
1093  */
1096 
1097  // see if the bounding box lets us trivially reject, also sets
1098  // trivial accept status
1100  {
1101  if ((currententity->flags & RF_WEAPONMODEL) && (r_lefthand->value == 1.0F))
1102  {
1104  }
1105  return;
1106  }
1107 
1108  // set up the skin and verify it exists
1109  if (!R_AliasSetupSkin())
1110  {
1111  ri.Con_Printf(PRINT_ALL, "R_AliasDrawModel %s: NULL skin found\n",
1112  currentmodel->name);
1113  return;
1114  }
1115 
1116  r_amodels_drawn++;
1118 
1119  /*
1120  ** select the proper span routine based on translucency
1121  */
1122  // PMM - added double damage shell
1123  // PMM - reordered to handle blending
1125  {
1126  int color;
1127 
1128  // PMM - added double
1130  // PMM - reordered, new shells after old shells (so they get overriden)
1131 
1132  if (color == RF_SHELL_RED)
1134  else if (color == RF_SHELL_GREEN)
1136  else if (color == RF_SHELL_BLUE)
1138  else if (color == (RF_SHELL_RED | RF_SHELL_GREEN))
1140  else if (color == (RF_SHELL_RED | RF_SHELL_BLUE))
1142  else if (color == (RF_SHELL_BLUE | RF_SHELL_GREEN))
1144  // PMM - added this .. it's yellowish
1145  else if (color == (RF_SHELL_DOUBLE))
1147  else if (color == (RF_SHELL_HALF_DAM))
1149  // pmm
1150  else
1152  /* if ( color & RF_SHELL_RED )
1153  {
1154  if ( ( color & RF_SHELL_BLUE) && ( color & RF_SHELL_GREEN) )
1155  r_aliasblendcolor = SHELL_WHITE_COLOR;
1156  else if ( color & (RF_SHELL_BLUE | RF_SHELL_DOUBLE))
1157  r_aliasblendcolor = SHELL_RB_COLOR;
1158  else
1159  r_aliasblendcolor = SHELL_RED_COLOR;
1160  }
1161  else if ( color & RF_SHELL_BLUE)
1162  {
1163  if ( color & RF_SHELL_DOUBLE )
1164  r_aliasblendcolor = SHELL_CYAN_COLOR;
1165  else
1166  r_aliasblendcolor = SHELL_BLUE_COLOR;
1167  }
1168  else if ( color & (RF_SHELL_DOUBLE) )
1169  r_aliasblendcolor = SHELL_DOUBLE_COLOR;
1170  else if ( color & (RF_SHELL_HALF_DAM) )
1171  r_aliasblendcolor = SHELL_HALF_DAM_COLOR;
1172  else if ( color & RF_SHELL_GREEN )
1173  r_aliasblendcolor = SHELL_GREEN_COLOR;
1174  else
1175  r_aliasblendcolor = SHELL_WHITE_COLOR;
1176  */
1177 
1178  if (currententity->alpha > 0.33)
1180  else
1182  }
1183  else if (currententity->flags & RF_TRANSLUCENT)
1184  {
1185  if (currententity->alpha > 0.66)
1187  else if (currententity->alpha > 0.33)
1189  else
1191  }
1192  else
1193  {
1195  }
1196 
1197  /*
1198  ** compute this_frame and old_frame addresses
1199  */
1201 
1203  s_ziscale = (float)0x8000 * (float)0x10000 * 3.0;
1204  else
1205  s_ziscale = (float)0x8000 * (float)0x10000;
1206 
1208 
1209  if ((currententity->flags & RF_WEAPONMODEL) && (r_lefthand->value == 1.0F))
1210  {
1212  }
1213 }

Referenced by R_DrawEntitiesOnList().

◆ R_AliasLerpFrames()

void R_AliasLerpFrames ( dmdl_t paliashdr,
float  backlerp 
)

◆ R_AliasPreparePoints()

void R_AliasPreparePoints ( void  )

Definition at line 242 of file r_alias.c.

243 {
244  int i;
245  dstvert_t *pstverts;
246  dtriangle_t *ptri;
247  finalvert_t *pfv[3];
248  finalvert_t finalverts[MAXALIASVERTS +
249  ((CACHE_SIZE - 1) / sizeof(finalvert_t)) + 3];
250  finalvert_t *pfinalverts;
251 
252  //PGM
254  // iractive = 0;
255  // if(r_newrefdef.rdflags & RDF_IRGOGGLES && currententity->flags & RF_IR_VISIBLE)
256  // iractive = 1;
257  //PGM
258 
259  // put work vertexes on stack, cache aligned
260  pfinalverts = (finalvert_t *)
261  (((intptr_t)&finalverts[0] + CACHE_SIZE - 1) & ~(CACHE_SIZE - 1));
262 
267 
272 
273  // clip and draw all triangles
274  //
275  pstverts = (dstvert_t *)((byte *)s_pmdl + s_pmdl->ofs_st);
276  ptri = (dtriangle_t *)((byte *)s_pmdl + s_pmdl->ofs_tris);
277 
278  if ((currententity->flags & RF_WEAPONMODEL) && (r_lefthand->value == 1.0F))
279  {
280  for (i = 0; i < s_pmdl->num_tris; i++, ptri++)
281  {
282  pfv[0] = &pfinalverts[ptri->index_xyz[0]];
283  pfv[1] = &pfinalverts[ptri->index_xyz[1]];
284  pfv[2] = &pfinalverts[ptri->index_xyz[2]];
285 
286  if (pfv[0]->flags & pfv[1]->flags & pfv[2]->flags)
287  continue; // completely clipped
288 
289  // insert s/t coordinates
290  pfv[0]->s = pstverts[ptri->index_st[0]].s << 16;
291  pfv[0]->t = pstverts[ptri->index_st[0]].t << 16;
292 
293  pfv[1]->s = pstverts[ptri->index_st[1]].s << 16;
294  pfv[1]->t = pstverts[ptri->index_st[1]].t << 16;
295 
296  pfv[2]->s = pstverts[ptri->index_st[2]].s << 16;
297  pfv[2]->t = pstverts[ptri->index_st[2]].t << 16;
298 
299  if (!(pfv[0]->flags | pfv[1]->flags | pfv[2]->flags))
300  { // totally unclipped
301  aliastriangleparms.a = pfv[2];
302  aliastriangleparms.b = pfv[1];
303  aliastriangleparms.c = pfv[0];
304 
305  R_DrawTriangle();
306  }
307  else
308  {
309  if (coloredlights)
310  R_AliasClipTriangleRGB(pfv[2], pfv[1], pfv[0]);
311  else
312  R_AliasClipTriangle(pfv[2], pfv[1], pfv[0]);
313  }
314  }
315  }
316  else
317  {
318  for (i = 0; i < s_pmdl->num_tris; i++, ptri++)
319  {
320  pfv[0] = &pfinalverts[ptri->index_xyz[0]];
321  pfv[1] = &pfinalverts[ptri->index_xyz[1]];
322  pfv[2] = &pfinalverts[ptri->index_xyz[2]];
323 
324  if (pfv[0]->flags & pfv[1]->flags & pfv[2]->flags)
325  continue; // completely clipped
326 
327  // insert s/t coordinates
328  pfv[0]->s = pstverts[ptri->index_st[0]].s << 16;
329  pfv[0]->t = pstverts[ptri->index_st[0]].t << 16;
330 
331  pfv[1]->s = pstverts[ptri->index_st[1]].s << 16;
332  pfv[1]->t = pstverts[ptri->index_st[1]].t << 16;
333 
334  pfv[2]->s = pstverts[ptri->index_st[2]].s << 16;
335  pfv[2]->t = pstverts[ptri->index_st[2]].t << 16;
336 
337  if (!(pfv[0]->flags | pfv[1]->flags | pfv[2]->flags))
338  { // totally unclipped
339  aliastriangleparms.a = pfv[0];
340  aliastriangleparms.b = pfv[1];
341  aliastriangleparms.c = pfv[2];
342 
343  R_DrawTriangle();
344  }
345  else
346  { // partially clipped
347  if (coloredlights)
348  R_AliasClipTriangleRGB(pfv[0], pfv[1], pfv[2]);
349  else
350  R_AliasClipTriangle(pfv[0], pfv[1], pfv[2]);
351  }
352  }
353  }
354 }

Referenced by R_AliasDrawModel().

◆ R_AliasProjectAndClipTestFinalVert()

void R_AliasProjectAndClipTestFinalVert ( finalvert_t fv)

Definition at line 813 of file r_alias.c.

814 {
815  float zi;
816  float x, y, z;
817 
818  // project points
819  x = fv->xyz[0];
820  y = fv->xyz[1];
821  z = fv->xyz[2];
822  zi = 1.0 / z;
823 
824  fv->zi = zi * s_ziscale;
825 
826  fv->u = (x * aliasxscale * zi) + aliasxcenter;
827  fv->v = (y * aliasyscale * zi) + aliasycenter;
828 
829  if (fv->u < r_refdef.aliasvrect.x)
830  fv->flags |= ALIAS_LEFT_CLIP;
831  if (fv->v < r_refdef.aliasvrect.y)
832  fv->flags |= ALIAS_TOP_CLIP;
833  if (fv->u > r_refdef.aliasvrectright)
834  fv->flags |= ALIAS_RIGHT_CLIP;
835  if (fv->v > r_refdef.aliasvrectbottom)
836  fv->flags |= ALIAS_BOTTOM_CLIP;
837 }

Referenced by R_Alias_clip_z(), and R_AliasTransformFinalVerts().

◆ R_AliasSetupFrames()

void R_AliasSetupFrames ( dmdl_t pmdl)

Definition at line 994 of file r_alias.c.

995 {
996  int thisframe = currententity->frame;
997  int lastframe = currententity->oldframe;
998 
999  if ((thisframe >= pmdl->num_frames) || (thisframe < 0))
1000  {
1001  ri.Con_Printf(PRINT_ALL, "R_AliasSetupFrames %s: no such thisframe %d\n",
1002  currentmodel->name, thisframe);
1003  thisframe = 0;
1004  }
1005  if ((lastframe >= pmdl->num_frames) || (lastframe < 0))
1006  {
1007  ri.Con_Printf(PRINT_ALL, "R_AliasSetupFrames %s: no such lastframe %d\n",
1008  currentmodel->name, lastframe);
1009  lastframe = 0;
1010  }
1011 
1012  r_thisframe = (daliasframe_t *)((byte *)pmdl + pmdl->ofs_frames
1013  + thisframe * pmdl->framesize);
1014 
1015  r_lastframe = (daliasframe_t *)((byte *)pmdl + pmdl->ofs_frames
1016  + lastframe * pmdl->framesize);
1017 }

Referenced by R_AliasDrawModel().

◆ R_AliasSetUpLerpData()

void R_AliasSetUpLerpData ( dmdl_t pmdl,
float  backlerp 
)

Definition at line 1024 of file r_alias.c.

1025 {
1026  float frontlerp;
1027  vec3_t translation, vectors[3];
1028  int i;
1029 
1030  frontlerp = 1.0F - backlerp;
1031 
1032  /*
1033  ** convert entity's angles into discrete vectors for R, U, and F
1034  */
1035  AngleVectors(currententity->angles, vectors[0], vectors[1], vectors[2]);
1036 
1037  /*
1038  ** translation is the vector from last position to this position
1039  */
1041 
1042  /*
1043  ** move should be the delta back to the previous frame * backlerp
1044  */
1045  r_lerp_move[0] = DotProduct(translation, vectors[0]); // forward
1046  r_lerp_move[1] = -DotProduct(translation, vectors[1]); // left
1047  r_lerp_move[2] = DotProduct(translation, vectors[2]); // up
1048 
1050 
1051  for (i = 0; i < 3; i++)
1052  {
1053  r_lerp_move[i] = backlerp*r_lerp_move[i] + frontlerp * r_thisframe->translate[i];
1054  }
1055 
1056  for (i = 0; i < 3; i++)
1057  {
1058  r_lerp_frontv[i] = frontlerp * r_thisframe->scale[i];
1059  r_lerp_backv[i] = backlerp * r_lastframe->scale[i];
1060  }
1061 }

Referenced by R_AliasDrawModel().

◆ R_AliasSetupLighting()

void R_AliasSetupLighting ( void  )

Definition at line 884 of file r_alias.c.

885 {
886  alight_t lighting;
887 
888  /*
889  float lightvec[3] = {-1, 0, 0};
890  float rlightvec[3] = {-1, 0, 0};
891  float glightvec[3] = {-1, 0, 0};
892  float blightvec[3] = {-1, 0, 0};
893  */
894 
895  float lightvec[3] = { 0.2, -0.8, 0.6 };
896  float rlightvec[3] = { -1, 0, 0 };
897  float glightvec[3] = { 0, -1, 0 };
898  float blightvec[3] = { 0, 0, -1 };
899  //qb: use shadelight. vec3_t light;
900  int i, j;
901 
902  // all components of light should be identical in software
904  {
905  for (i = 0; i < 3; i++)
906  shadelight[i] = 1.0;
907  }
908  else
909  {
911  }
912 
913  // save off light value for server to look at (BIG HACK!)
915  r_lightlevel->value = 150.0 * shadelight[0];
916 
917 
919  {
920  for (i = 0; i < 3; i++)
921  if (shadelight[i] < 0.1)
922  shadelight[i] = 0.1;
923  }
924 
925  if (currententity->flags & RF_GLOW)
926  { // bonus items will pulse with time
927  float scale;
928  float min;
929 
930  scale = 0.1 * sin(r_newrefdef.time * 7);
931  for (i = 0; i < 3; i++)
932  {
933  min = shadelight[i] * 0.8;
934  shadelight[i] += scale;
935  if (shadelight[i] < min)
936  shadelight[i] = min;
937  }
938  }
939 
940  j = (shadelight[0] + shadelight[1] + shadelight[2])*0.3333 * 255;
941 
942  lighting.ambientlight = j;
943  lighting.shadelight = j;
944 
945 
946  lighting.plightvec = lightvec;
947 
948  lighting.prlightvec = rlightvec;
949  lighting.pglightvec = glightvec;
950  lighting.pblightvec = blightvec;
951 
952  // clamp lighting so it doesn't overbright as much
953  if (lighting.ambientlight > 128)
954  lighting.ambientlight = 128;
955  if (lighting.ambientlight + lighting.shadelight > 192)
956  lighting.shadelight = 192 - lighting.ambientlight;
957 
958  // guarantee that no vertex will ever be lit below LIGHT_MIN, so we don't have
959  // to clamp off the bottom
960  r_ambientlight = lighting.ambientlight;
961 
964 
966 
969 
970  r_shadelight = lighting.shadelight;
971 
972  if (r_shadelight < 0)
973  r_shadelight = 0;
974 
976 
977  // rotate the lighting vector into the model's frame of reference
980  r_plightvec[2] = DotProduct(lighting.plightvec, s_alias_up);
981 
985 }

Referenced by R_AliasDrawModel().

◆ R_AliasSetupSkin()

static qboolean R_AliasSetupSkin ( void  )
static

Definition at line 844 of file r_alias.c.

845 {
846  int skinnum;
847  image_t *pskindesc;
848 
849  if (currententity->skin)
850  pskindesc = currententity->skin;
851  else
852  {
853  skinnum = currententity->skinnum;
854  if ((skinnum >= s_pmdl->num_skins) || (skinnum < 0))
855  {
856  ri.Con_Printf(PRINT_ALL, "R_AliasSetupSkin %s: no such skin # %d\n",
857  currentmodel->name, skinnum);
858  skinnum = 0;
859  }
860 
861  pskindesc = currentmodel->skins[skinnum];
862  }
863 
864  if (!pskindesc)
865  return false;
866 
867  r_affinetridesc.pskin = pskindesc->pixels[0];
868  r_affinetridesc.skinwidth = pskindesc->width;
869  r_affinetridesc.skinheight = pskindesc->height;
870 
871  R_PolysetUpdateTables(); // FIXME: precalc edge lookups
872 
873  return true;
874 }

Referenced by R_AliasDrawModel().

◆ R_AliasSetUpTransform()

void R_AliasSetUpTransform ( void  )

Definition at line 362 of file r_alias.c.

363 {
364  int i;
365  static float viewmatrix[3][4];
366  vec3_t angles;
367 
368  // TODO: should really be stored with the entity instead of being reconstructed
369  // TODO: should use a look-up table
370  // TODO: could cache lazily, stored in the entity
371  //
372  angles[ROLL] = currententity->angles[ROLL];
373  angles[PITCH] = currententity->angles[PITCH];
374  angles[YAW] = currententity->angles[YAW];
376 
377  // TODO: can do this with simple matrix rearrangement
378 
379  memset(aliasworldtransform, 0, sizeof(aliasworldtransform));
380  memset(aliasoldworldtransform, 0, sizeof(aliasworldtransform));
381 
382  for (i = 0; i < 3; i++)
383  {
387  }
388 
392 
396 
397  // FIXME: can do more efficiently than full concatenation
398  // memcpy( rotationmatrix, t2matrix, sizeof( rotationmatrix ) );
399 
400  // R_ConcatTransforms (t2matrix, tmatrix, rotationmatrix);
401 
402  // TODO: should be global, set when vright, etc., set
403  VectorCopy(vright, viewmatrix[0]);
404  VectorCopy(vup, viewmatrix[1]);
405  VectorInverse(viewmatrix[1]);
406  VectorCopy(vpn, viewmatrix[2]);
407 
408  viewmatrix[0][3] = 0;
409  viewmatrix[1][3] = 0;
410  viewmatrix[2][3] = 0;
411 
412  // memcpy( aliasworldtransform, rotationmatrix, sizeof( aliastransform ) );
413 
415 
419 
423 }

Referenced by R_AliasDrawModel().

◆ R_AliasTransformFinalVerts()

void R_AliasTransformFinalVerts ( int  numpoints,
finalvert_t fv,
dtrivertx_t oldv,
dtrivertx_t newv 
)

Definition at line 749 of file r_alias.c.

750 {
751  int i;
752 
753  for (i = 0; i < numpoints; i++, fv++, oldv++, newv++)
754  {
755  int temp;
756  float lightcos, *plightnormal;
757  vec3_t lerped_vert;
758 
759  lerped_vert[0] = r_lerp_move[0] + oldv->v[0] * r_lerp_backv[0] + newv->v[0] * r_lerp_frontv[0];
760  lerped_vert[1] = r_lerp_move[1] + oldv->v[1] * r_lerp_backv[1] + newv->v[1] * r_lerp_frontv[1];
761  lerped_vert[2] = r_lerp_move[2] + oldv->v[2] * r_lerp_backv[2] + newv->v[2] * r_lerp_frontv[2];
762 
763  plightnormal = r_avertexnormals[newv->lightnormalindex];
764 
765  // PMM - added double damage shell
767  {
768  lerped_vert[0] += plightnormal[0] * POWERSUIT_SCALE;
769  lerped_vert[1] += plightnormal[1] * POWERSUIT_SCALE;
770  lerped_vert[2] += plightnormal[2] * POWERSUIT_SCALE;
771  }
772 
773  fv->xyz[0] = DotProduct(lerped_vert, aliastransform[0]) + aliastransform[0][3];
774  fv->xyz[1] = DotProduct(lerped_vert, aliastransform[1]) + aliastransform[1][3];
775  fv->xyz[2] = DotProduct(lerped_vert, aliastransform[2]) + aliastransform[2][3];
776 
777  fv->flags = 0;
778 
779  // lighting
780  lightcos = DotProduct(plightnormal, r_plightvec);
781  temp = r_ambientlight;
782 
783  if (lightcos < 0)
784  {
785  temp += (int)(r_shadelight * lightcos);
786 
787  // clamp; because we limited the minimum ambient and shading light, we
788  // don't have to clamp low light, just bright
789  if (temp < 0)
790  temp = 0;
791  }
792 
793  fv->l = temp;
794 
795  if (fv->xyz[2] < ALIAS_Z_CLIP_PLANE)
796  {
797  fv->flags |= ALIAS_Z_CLIP;
798  }
799  else
800  {
802  }
803  }
804 }

Referenced by R_AliasPreparePoints().

◆ R_AliasTransformVector()

void R_AliasTransformVector ( vec3_t  in,
vec3_t  out,
float  m[3][4] 
)

Definition at line 217 of file r_alias.c.

218 {
219  out[0] = DotProduct(in, xf[0]) + xf[0][3];
220  out[1] = DotProduct(in, xf[1]) + xf[1][3];
221  out[2] = DotProduct(in, xf[2]) + xf[2][3];
222 }

Referenced by R_AliasCheckFrameBBox().

Variable Documentation

◆ aliasbatchedtransformdata

aliasbatchedtransformdata_t aliasbatchedtransformdata

Definition at line 240 of file r_alias.c.

Referenced by R_AliasPreparePoints().

◆ aliasoldworldtransform

float aliasoldworldtransform[3][4]

Definition at line 56 of file r_alias.c.

Referenced by R_AliasCheckBBox(), and R_AliasSetUpTransform().

◆ aliastransform

float aliastransform[3][4]

◆ aliasworldtransform

float aliasworldtransform[3][4]

Definition at line 55 of file r_alias.c.

Referenced by R_AliasCheckBBox(), and R_AliasSetUpTransform().

◆ iractive

byte iractive

Definition at line 148 of file r_polyse.c.

Referenced by R_AliasPreparePoints().

◆ r_affinetridesc

◆ r_aliasblendcolor

int r_aliasblendcolor

◆ r_ambientlight

int r_ambientlight

Definition at line 46 of file r_alias.c.

Referenced by R_AliasSetupLighting(), and R_AliasTransformFinalVerts().

◆ r_amodels_drawn

int r_amodels_drawn

Definition at line 32 of file r_alias.c.

Referenced by R_AliasDrawModel(), R_PrintAliasStats(), and R_SetupFrame().

◆ r_avertexnormals

float r_avertexnormals[NUMVERTEXNORMALS][3]
Initial value:
= {
}

Definition at line 64 of file r_alias.c.

Referenced by R_AliasTransformFinalVerts().

◆ r_lastframe

daliasframe_t * r_lastframe

◆ r_lerp_backv

vec3_t r_lerp_backv

Definition at line 44 of file r_alias.c.

Referenced by R_AliasSetUpLerpData(), and R_AliasTransformFinalVerts().

◆ r_lerp_frontv

vec3_t r_lerp_frontv

Definition at line 44 of file r_alias.c.

Referenced by R_AliasSetUpLerpData(), and R_AliasTransformFinalVerts().

◆ r_lerp_move

vec3_t r_lerp_move

Definition at line 44 of file r_alias.c.

Referenced by R_AliasSetUpLerpData(), and R_AliasTransformFinalVerts().

◆ r_lerped

vec3_t r_lerped[1024]

Definition at line 43 of file r_alias.c.

◆ r_pblightvec

vec3_t r_pblightvec

Definition at line 41 of file r_alias.c.

Referenced by R_AliasSetupLighting().

◆ r_pglightvec

vec3_t r_pglightvec

Definition at line 40 of file r_alias.c.

Referenced by R_AliasSetupLighting().

◆ r_plightvec

vec3_t r_plightvec

Definition at line 36 of file r_alias.c.

Referenced by R_AliasSetupLighting(), and R_AliasTransformFinalVerts().

◆ r_prlightvec

vec3_t r_prlightvec

Definition at line 39 of file r_alias.c.

Referenced by R_AliasSetupLighting().

◆ r_shadelight

float r_shadelight

Definition at line 48 of file r_alias.c.

Referenced by R_AliasSetupLighting(), and R_AliasTransformFinalVerts().

◆ r_thisframe

daliasframe_t* r_thisframe

◆ s_alias_forward

vec3_t s_alias_forward
static

Definition at line 59 of file r_alias.c.

Referenced by R_AliasSetupLighting(), and R_AliasSetUpTransform().

◆ s_alias_right

vec3_t s_alias_right
static

Definition at line 59 of file r_alias.c.

Referenced by R_AliasSetupLighting(), and R_AliasSetUpTransform().

◆ s_alias_up

vec3_t s_alias_up
static

Definition at line 59 of file r_alias.c.

Referenced by R_AliasSetupLighting(), and R_AliasSetUpTransform().

◆ s_pmdl

dmdl_t* s_pmdl

Definition at line 52 of file r_alias.c.

Referenced by R_AliasDrawModel(), R_AliasPreparePoints(), and R_AliasSetupSkin().

◆ s_ziscale

float s_ziscale
static

Definition at line 58 of file r_alias.c.

Referenced by R_AliasDrawModel(), and R_AliasProjectAndClipTestFinalVert().

R_PolysetDrawSpans8_Opaque_Coloured
void R_PolysetDrawSpans8_Opaque_Coloured(spanpackage_t *pspanpackage)
Definition: r_polyse.c:1198
RF_TRANSLUCENT
#define RF_TRANSLUCENT
Definition: q_shared.h:604
R_PolysetDrawSpans8_33
void R_PolysetDrawSpans8_33(spanpackage_t *pspanpackage)
Definition: r_polyse.c:1005
ALIAS_Z_CLIP_PLANE
#define ALIAS_Z_CLIP_PLANE
Definition: r_local.h:235
r_thisframe
daliasframe_t * r_thisframe
Definition: r_alias.c:51
dtrivertx_t::lightnormalindex
byte lightnormalindex
Definition: qfiles.h:110
r_prlightvec
vec3_t r_prlightvec
Definition: r_alias.c:39
RF_SHELL_RED
#define RF_SHELL_RED
Definition: q_shared.h:609
BBOX_MUST_CLIP_Z
#define BBOX_MUST_CLIP_Z
Definition: r_alias.c:86
currentmodel
model_t * currentmodel
Definition: r_main.c:39
entity_s::skin
struct image_s * skin
Definition: ref.h:75
YAW
#define YAW
Definition: q_shared.h:73
entity_s::origin
float origin[3]
Definition: ref.h:57
RF_IR_VISIBLE
#define RF_IR_VISIBLE
Definition: q_shared.h:614
daliasframe_t::scale
float scale[3]
Definition: qfiles.h:121
int
CONST PIXELFORMATDESCRIPTOR int
Definition: qgl_win.c:35
transformed
static vec3_t transformed
Definition: r_part.c:468
RF_MINLIGHT
#define RF_MINLIGHT
Definition: q_shared.h:599
VectorSubtract
#define VectorSubtract(a, b, c)
Definition: q_shared.h:163
aliasbatchedtransformdata
aliasbatchedtransformdata_t aliasbatchedtransformdata
Definition: r_alias.c:240
RF_SHELL_HALF_DAM
#define RF_SHELL_HALF_DAM
Definition: q_shared.h:616
R_AliasSetupSkin
static qboolean R_AliasSetupSkin(void)
Definition: r_alias.c:844
R_PolysetUpdateTables
void R_PolysetUpdateTables(void)
Definition: r_polyse.c:196
ri
refimport_t ri
Definition: r_main.c:25
aliasxcenter
float aliasxcenter
Definition: r_local.h:762
RF_SHELL_GREEN
#define RF_SHELL_GREEN
Definition: q_shared.h:610
aliastriangleparms_t::b
finalvert_t * b
Definition: r_local.h:772
s_alias_forward
static vec3_t s_alias_forward
Definition: r_alias.c:59
U
#define U(a, b, c, d, k, s)
Definition: md4.c:27
s_alias_up
static vec3_t s_alias_up
Definition: r_alias.c:59
dmdl_t::num_tris
int num_tris
Definition: qfiles.h:149
CACHE_SIZE
#define CACHE_SIZE
Definition: d_ifacea.h:22
R_PolysetDrawSpans8_66
void R_PolysetDrawSpans8_66(spanpackage_t *pspanpackage)
Definition: r_polyse.c:1100
vright
vec3_t vright
Definition: r_main.c:74
alight_t::prlightvec
float * prlightvec
Definition: r_local.h:363
qboolean
qboolean
Definition: q_shared.h:63
x
GLint GLenum GLint x
Definition: qgl_win.c:116
z
GLdouble GLdouble z
Definition: qgl_win.c:283
entity_s::skinnum
int skinnum
Definition: ref.h:70
i
int i
Definition: q_shared.c:305
BBOX_MUST_CLIP_XY
#define BBOX_MUST_CLIP_XY
Definition: r_alias.c:85
dstvert_t::s
short s
Definition: qfiles.h:97
fv
float fv
Definition: r_edge.c:75
d_pdrawspans
void(* d_pdrawspans)(spanpackage_t *pspanpackage)
Definition: r_polyse.c:130
PITCH
#define PITCH
Definition: q_shared.h:72
r_origin
vec3_t r_origin
Definition: r_main.c:75
refdef_t::rdflags
int rdflags
Definition: ref.h:110
finalvert_s::t
int t
Definition: r_local.h:293
aliasbatchedtransformdata_t::num_points
int num_points
Definition: r_alias.c:234
entity_s::flags
int flags
Definition: ref.h:76
currententity
entity_t * currententity
Definition: r_bsp.c:28
aliasbatchedtransformdata_t::dest_verts
finalvert_t * dest_verts
Definition: r_alias.c:237
SHELL_DOUBLE_COLOR
#define SHELL_DOUBLE_COLOR
Definition: ref.h:42
finalvert_s
Definition: r_local.h:292
R_DrawTriangle
void R_DrawTriangle(void)
Definition: r_polyse.c:218
R_AliasClipTriangle
void R_AliasClipTriangle(finalvert_t *index0, finalvert_t *index1, finalvert_t *index2)
Definition: r_aclip.c:271
r_lefthand
cvar_t * r_lefthand
Definition: r_main.c:117
model_s::extradata
void * extradata
Definition: r_model.h:235
ALIAS_Z_CLIP
#define ALIAS_Z_CLIP
Definition: r_local.h:215
vup
vec3_t vup
Definition: r_main.c:72
j
GLint j
Definition: qgl_win.c:150
r_plightvec
vec3_t r_plightvec
Definition: r_alias.c:36
aliasxscale
float aliasxscale
Definition: r_main.c:85
aliasycenter
float aliasycenter
Definition: r_local.h:762
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: q_shared.c:93
RF_WEAPONMODEL
#define RF_WEAPONMODEL
Definition: q_shared.h:601
dtriangle_t::index_st
short index_st[3]
Definition: qfiles.h:104
refimport_t::Con_Printf
void(* Con_Printf)(int print_level, char *str,...)
Definition: ref.h:202
PRINT_ALL
#define PRINT_ALL
Definition: qcommon.h:751
r_shadelight
float r_shadelight
Definition: r_alias.c:48
SHELL_BLUE_COLOR
#define SHELL_BLUE_COLOR
Definition: ref.h:34
SHELL_RED_COLOR
#define SHELL_RED_COLOR
Definition: ref.h:32
R_PolysetDrawSpansConstant8_33
void R_PolysetDrawSpansConstant8_33(spanpackage_t *pspanpackage)
Definition: r_polyse.c:1061
entity_s::alpha
float alpha
Definition: ref.h:73
dmdl_t::ofs_frames
int ofs_frames
Definition: qfiles.h:156
R_AliasProjectAndClipTestFinalVert
void R_AliasProjectAndClipTestFinalVert(finalvert_t *fv)
Definition: r_alias.c:813
image_s::height
int height
Definition: r_local.h:75
r_lerpmodels
cvar_t * r_lerpmodels
Definition: r_main.c:138
SHELL_BG_COLOR
#define SHELL_BG_COLOR
Definition: ref.h:39
ALIAS_BOTTOM_CLIP
#define ALIAS_BOTTOM_CLIP
Definition: r_local.h:214
dtriangle_t::index_xyz
short index_xyz[3]
Definition: qfiles.h:103
ROLL
#define ROLL
Definition: q_shared.h:74
aliasoldworldtransform
float aliasoldworldtransform[3][4]
Definition: r_alias.c:56
alight_t::pglightvec
float * pglightvec
Definition: r_local.h:364
dstvert_t
Definition: qfiles.h:95
RF_DEPTHHACK
#define RF_DEPTHHACK
Definition: q_shared.h:603
oldrefdef_t::aliasvrectbottom
int aliasvrectbottom
Definition: r_local.h:122
RDF_IRGOGGLES
#define RDF_IRGOGGLES
Definition: q_shared.h:625
min
#define min(a, b)
Definition: vk_local.h:72
r_affinetridesc
affinetridesc_t r_affinetridesc
Definition: r_alias.c:34
r_lastframe
daliasframe_t * r_lastframe
Definition: r_alias.c:51
alight_t::shadelight
int shadelight
Definition: r_local.h:358
dstvert_t::t
short t
Definition: qfiles.h:98
dmdl_t::num_skins
int num_skins
Definition: qfiles.h:146
entity_s::oldframe
int oldframe
Definition: ref.h:64
R_AliasCheckFrameBBox
unsigned long R_AliasCheckFrameBBox(daliasframe_t *frame, float worldxf[3][4])
Definition: r_alias.c:94
RF_SHELL_DOUBLE
#define RF_SHELL_DOUBLE
Definition: q_shared.h:615
r_newrefdef
refdef_t r_newrefdef
Definition: r_main.c:38
DotProduct
#define DotProduct(x, y)
Definition: q_shared.h:162
dmdl_t::num_xyz
int num_xyz
Definition: qfiles.h:147
R_AliasTransformFinalVerts
void R_AliasTransformFinalVerts(int numpoints, finalvert_t *fv, dtrivertx_t *oldv, dtrivertx_t *newv)
Definition: r_alias.c:749
cvar_s::value
float value
Definition: q_shared.h:331
entity_s::backlerp
float backlerp
Definition: ref.h:69
dmdl_t::framesize
int framesize
Definition: qfiles.h:144
F
#define F(X, Y, Z)
Definition: md4.c:13
refdef_t::time
float time
Definition: ref.h:109
vrect_s::x
int x
Definition: vid.h:24
SHELL_HALF_DAM_COLOR
#define SHELL_HALF_DAM_COLOR
Definition: ref.h:43
image_s::pixels
byte * pixels[4]
Definition: r_local.h:78
image_s::width
int width
Definition: r_local.h:75
alight_t::plightvec
float * plightvec
Definition: r_local.h:359
RF_GLOW
#define RF_GLOW
Definition: q_shared.h:608
VectorInverse
void VectorInverse(vec3_t v)
Definition: q_shared.c:775
alight_t::pblightvec
float * pblightvec
Definition: r_local.h:365
daliasframe_t::translate
float translate[3]
Definition: qfiles.h:122
coloredlights
int coloredlights
Definition: r_main.c:156
dtrivertx_t::v
byte v[3]
Definition: qfiles.h:109
r_lightlevel
cvar_t * r_lightlevel
Definition: r_main.c:142
SHELL_GREEN_COLOR
#define SHELL_GREEN_COLOR
Definition: ref.h:33
R_PolysetDrawSpansConstant8_66
void R_PolysetDrawSpansConstant8_66(spanpackage_t *pspanpackage)
Definition: r_polyse.c:1156
affinetridesc_t::skinwidth
int skinwidth
Definition: r_local.h:330
VectorAdd
#define VectorAdd(a, b, c)
Definition: q_shared.h:164
SHELL_RG_COLOR
#define SHELL_RG_COLOR
Definition: ref.h:36
r_amodels_drawn
int r_amodels_drawn
Definition: r_alias.c:32
y
GLint y
Definition: qgl_win.c:115
aliastriangleparms_t::a
finalvert_t * a
Definition: r_local.h:772
entity_s::frame
int frame
Definition: ref.h:58
R_AliasSetUpTransform
void R_AliasSetUpTransform(void)
Definition: r_alias.c:362
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:165
oldrefdef_t::aliasvrectright
int aliasvrectright
Definition: r_local.h:122
model_s::skins
image_t * skins[MAX_MD2SKINS]
Definition: r_model.h:234
R_AliasSetupFrames
void R_AliasSetupFrames(dmdl_t *pmdl)
Definition: r_alias.c:994
SHELL_RB_COLOR
#define SHELL_RB_COLOR
Definition: ref.h:38
iractive
byte iractive
Definition: r_polyse.c:148
aliasbatchedtransformdata_t::this_verts
dtrivertx_t * this_verts
Definition: r_alias.c:236
ALIAS_LEFT_CLIP
#define ALIAS_LEFT_CLIP
Definition: r_local.h:211
R_AliasCheckBBox
qboolean R_AliasCheckBBox(void)
Definition: r_alias.c:182
model_s::name
char name[MAX_QPATH]
Definition: r_model.h:173
POWERSUIT_SCALE
#define POWERSUIT_SCALE
Definition: ref.h:30
R_AliasSetUpLerpData
void R_AliasSetUpLerpData(dmdl_t *pmdl, float backlerp)
Definition: r_alias.c:1024
SHELL_WHITE_COLOR
#define SHELL_WHITE_COLOR
Definition: ref.h:47
finalvert_s::s
int s
Definition: r_local.h:293
ALIAS_TOP_CLIP
#define ALIAS_TOP_CLIP
Definition: r_local.h:212
aliasworldtransform
float aliasworldtransform[3][4]
Definition: r_alias.c:55
view_clipplanes
clipplane_t view_clipplanes[4]
Definition: r_rast.c:38
r_pblightvec
vec3_t r_pblightvec
Definition: r_alias.c:41
RF_FULLBRIGHT
#define RF_FULLBRIGHT
Definition: q_shared.h:602
alight_t
Definition: r_local.h:356
R_AliasPreparePoints
void R_AliasPreparePoints(void)
Definition: r_alias.c:242
daliasframe_t
Definition: qfiles.h:119
aliastransform
float aliastransform[3][4]
Definition: r_alias.c:54
daliasframe_t::verts
dtrivertx_t verts[1]
Definition: qfiles.h:124
aliastriangleparms_t::c
finalvert_t * c
Definition: r_local.h:772
aliasyscale
float aliasyscale
Definition: r_local.h:762
aliastriangleparms
aliastriangleparms_t aliastriangleparms
Definition: r_polyse.c:62
R_AliasSetupLighting
void R_AliasSetupLighting(void)
Definition: r_alias.c:884
RF_SHELL_BLUE
#define RF_SHELL_BLUE
Definition: q_shared.h:611
s_ziscale
static float s_ziscale
Definition: r_alias.c:58
LIGHT_MIN
#define LIGHT_MIN
Definition: r_local.h:243
R_AliasTransformVector
void R_AliasTransformVector(vec3_t in, vec3_t out, float m[3][4])
Definition: r_alias.c:217
dmdl_t::ofs_st
int ofs_st
Definition: qfiles.h:154
image_s
Definition: r_local.h:71
R_ConcatTransforms
void R_ConcatTransforms(float in1[3][4], float in2[3][4], float out[3][4])
Definition: q_shared.c:219
r_aliasblendcolor
int r_aliasblendcolor
Definition: r_alias.c:47
dmdl_t::ofs_tris
int ofs_tris
Definition: qfiles.h:155
affinetridesc_t::skinheight
int skinheight
Definition: r_local.h:331
r_pglightvec
vec3_t r_pglightvec
Definition: r_alias.c:40
aliasbatchedtransformdata_t::last_verts
dtrivertx_t * last_verts
Definition: r_alias.c:235
r_lerp_frontv
vec3_t r_lerp_frontv
Definition: r_alias.c:44
R_LightPointColor
void R_LightPointColor(vec3_t p, vec3_t color)
Definition: r_light.c:387
r_avertexnormals
float r_avertexnormals[NUMVERTEXNORMALS][3]
Definition: r_alias.c:64
VID_GRADES
#define VID_GRADES
Definition: r_local.h:159
R_AliasClipTriangleRGB
void R_AliasClipTriangleRGB(finalvert_t *index0, finalvert_t *index1, finalvert_t *index2)
Definition: r_aclip.c:372
dtriangle_t
Definition: qfiles.h:101
r_lerp_move
vec3_t r_lerp_move
Definition: r_alias.c:44
r_ambientlight
int r_ambientlight
Definition: r_alias.c:46
vpn
vec3_t vpn
Definition: r_main.c:73
entity_s::oldorigin
float oldorigin[3]
Definition: ref.h:63
oldrefdef_t::aliasvrect
vrect_t aliasvrect
Definition: r_local.h:120
BBOX_TRIVIAL_REJECT
#define BBOX_TRIVIAL_REJECT
Definition: r_alias.c:87
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:134
VID_CBITS
#define VID_CBITS
Definition: r_local.h:158
dmdl_t
Definition: qfiles.h:137
entity_s::angles
float angles[3]
Definition: ref.h:52
zi
static float zi
Definition: r_part.c:469
r_refdef
oldrefdef_t r_refdef
Definition: r_main.c:80
void
void(APIENTRY *qglAccum)(GLenum op
dmdl_t::num_frames
int num_frames
Definition: qfiles.h:151
s_alias_right
static vec3_t s_alias_right
Definition: r_alias.c:59
alight_t::ambientlight
int ambientlight
Definition: r_local.h:357
s_pmdl
dmdl_t * s_pmdl
Definition: r_alias.c:52
affinetridesc_t::pskin
void * pskin
Definition: r_local.h:328
vrect_s::y
int y
Definition: vid.h:24
MAXALIASVERTS
#define MAXALIASVERTS
Definition: r_local.h:234
BBOX_TRIVIAL_ACCEPT
#define BBOX_TRIVIAL_ACCEPT
Definition: r_alias.c:84
ALIAS_RIGHT_CLIP
#define ALIAS_RIGHT_CLIP
Definition: r_local.h:213
r_lerp_backv
vec3_t r_lerp_backv
Definition: r_alias.c:44
shadelight
float shadelight[3]
Definition: r_local.h:645