mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-04-19 04:51:16 +00:00
speed up R_RenderBrushPoly ever so slightly
This commit is contained in:
parent
1dd7a8be0d
commit
d24e28f28b
1 changed files with 21 additions and 6 deletions
|
@ -750,8 +750,13 @@ dynamic:
|
|||
theRect->w = (fa->light_s-theRect->l)+smax;
|
||||
if ((theRect->h + theRect->t) < (fa->light_t + tmax))
|
||||
theRect->h = (fa->light_t-theRect->t)+tmax;
|
||||
base = lightmaps[fa->lightmaptexturenum] + (fa->light_t * BLOCK_WIDTH + fa->light_s) * lightmap_bytes;
|
||||
R_BuildLightMap (fa, base, BLOCK_WIDTH*lightmap_bytes);
|
||||
if (lightmap_bytes==3) {
|
||||
base = lightmaps[fa->lightmaptexturenum] + (fa->light_t * BLOCK_WIDTH + fa->light_s) * 3;
|
||||
R_BuildLightMap (fa, base, BLOCK_WIDTH*3);
|
||||
} else {
|
||||
base = lightmaps[fa->lightmaptexturenum] + (fa->light_t * BLOCK_WIDTH + fa->light_s);
|
||||
R_BuildLightMap (fa, base, BLOCK_WIDTH);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -807,8 +812,13 @@ dynamic:
|
|||
theRect->w = (fa->light_s-theRect->l)+smax;
|
||||
if ((theRect->h + theRect->t) < (fa->light_t + tmax))
|
||||
theRect->h = (fa->light_t-theRect->t)+tmax;
|
||||
base = lightmaps[fa->lightmaptexturenum] + (fa->light_t * BLOCK_WIDTH + fa->light_s) * lightmap_bytes;
|
||||
R_BuildLightMap (fa, base, BLOCK_WIDTH*lightmap_bytes);
|
||||
if (lightmap_bytes==3) {
|
||||
base = lightmaps[fa->lightmaptexturenum] + (fa->light_t * BLOCK_WIDTH + fa->light_s) * 3;
|
||||
R_BuildLightMap (fa, base, BLOCK_WIDTH*3);
|
||||
} else {
|
||||
base = lightmaps[fa->lightmaptexturenum] + (fa->light_t * BLOCK_WIDTH + fa->light_s);
|
||||
R_BuildLightMap (fa, base, BLOCK_WIDTH);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1454,8 +1464,13 @@ void GL_CreateSurfaceLightmap (msurface_t *surf)
|
|||
tmax = (surf->extents[1]>>4)+1;
|
||||
|
||||
surf->lightmaptexturenum = AllocBlock (smax, tmax, &surf->light_s, &surf->light_t);
|
||||
base = lightmaps[surf->lightmaptexturenum] + (surf->light_t * BLOCK_WIDTH + surf->light_s) * lightmap_bytes;
|
||||
R_BuildLightMap (surf, base, BLOCK_WIDTH*lightmap_bytes);
|
||||
if (lightmap_bytes==3) {
|
||||
base = lightmaps[surf->lightmaptexturenum] + (surf->light_t * BLOCK_WIDTH + surf->light_s) * 3;
|
||||
R_BuildLightMap (surf, base, BLOCK_WIDTH*3);
|
||||
} else {
|
||||
base = lightmaps[surf->lightmaptexturenum] + (surf->light_t * BLOCK_WIDTH + surf->light_s);
|
||||
R_BuildLightMap (surf, base, BLOCK_WIDTH);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue