mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
Swap normal/vertex order to match order they are accessed in during render.
Optimization from Grievre. Also fix a minimum light clamping to actually be applied.
This commit is contained in:
parent
f81a302c2a
commit
f0d9008fa4
1 changed files with 2 additions and 3 deletions
|
@ -67,8 +67,8 @@ static __attribute__ ((unused)) const char rcsid[] =
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
vec3_t vert;
|
|
||||||
vec3_t normal;
|
vec3_t normal;
|
||||||
|
vec3_t vert;
|
||||||
} blended_vert_t;
|
} blended_vert_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -575,8 +575,7 @@ R_DrawAliasModel (entity_t *e)
|
||||||
if (d > 1.0) {
|
if (d > 1.0) {
|
||||||
VectorScale (emission, 1.0 / d, emission);
|
VectorScale (emission, 1.0 / d, emission);
|
||||||
} else if (d < model->min_light && !used_lights) {
|
} else if (d < model->min_light && !used_lights) {
|
||||||
ambientcolor[2] = ambientcolor[1] =
|
emission[2] = emission[1] = emission[0] = model->min_light;
|
||||||
ambientcolor[0] = model->min_light;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
qfglMaterialfv (GL_FRONT, GL_EMISSION, emission);
|
qfglMaterialfv (GL_FRONT, GL_EMISSION, emission);
|
||||||
|
|
Loading…
Reference in a new issue