mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-30 12:40:42 +00:00
Speed up 16bit coord alias models a bit. (only one VectorScale per vertex now)
This commit is contained in:
parent
175be2e397
commit
97d6f46f75
1 changed files with 5 additions and 6 deletions
|
@ -329,16 +329,15 @@ GL_GetAliasFrameVerts16 (int frame, aliashdr_t *paliashdr, entity_t *e)
|
||||||
verts1 = verts + e->pose1 * count;
|
verts1 = verts + e->pose1 * count;
|
||||||
verts2 = verts + e->pose2 * count;
|
verts2 = verts + e->pose2 * count;
|
||||||
|
|
||||||
if (!blend) {
|
if (blend == 0.0) {
|
||||||
verts = verts1;
|
verts = verts1;
|
||||||
} else if (blend == 1) {
|
} else if (blend == 1.0) {
|
||||||
verts = verts2;
|
verts = verts2;
|
||||||
} else {
|
} else {
|
||||||
for (i = 0, vo_v = vo->verts; i < count;
|
for (i = 0, vo_v = vo->verts; i < count;
|
||||||
i++, vo_v++, verts1++, verts2++) {
|
i++, vo_v++, verts1++, verts2++) {
|
||||||
VectorScale (verts1->v, 1.0 / 256.0, v1);
|
|
||||||
VectorScale (verts2->v, 1.0 / 256.0, v2);
|
|
||||||
VectorBlend (v1, v2, blend, vo_v->vert);
|
VectorBlend (v1, v2, blend, vo_v->vert);
|
||||||
|
VectorScale (vo_v->vert, 1.0 / 256.0, vo_v->vert);
|
||||||
vo_v->lightdot =
|
vo_v->lightdot =
|
||||||
shadedots[verts1->lightnormalindex] * (1.0 - blend)
|
shadedots[verts1->lightnormalindex] * (1.0 - blend)
|
||||||
+ shadedots[verts2->lightnormalindex] * blend;
|
+ shadedots[verts2->lightnormalindex] * blend;
|
||||||
|
@ -423,9 +422,9 @@ GL_GetAliasFrameVerts (int frame, aliashdr_t *paliashdr, entity_t *e)
|
||||||
verts1 = verts + e->pose1 * count;
|
verts1 = verts + e->pose1 * count;
|
||||||
verts2 = verts + e->pose2 * count;
|
verts2 = verts + e->pose2 * count;
|
||||||
|
|
||||||
if (!blend) {
|
if (blend == 1.0) {
|
||||||
verts = verts1;
|
verts = verts1;
|
||||||
} else if (blend == 1) {
|
} else if (blend == 1.0) {
|
||||||
verts = verts2;
|
verts = verts2;
|
||||||
} else {
|
} else {
|
||||||
for (i = 0, vo_v = vo->verts; i < count;
|
for (i = 0, vo_v = vo->verts; i < count;
|
||||||
|
|
Loading…
Reference in a new issue