diff options
Diffstat (limited to 'src/engine/lightmap.cpp')
| -rw-r--r-- | src/engine/lightmap.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/lightmap.cpp b/src/engine/lightmap.cpp index b8759c9..da1a5df 100644 --- a/src/engine/lightmap.cpp +++ b/src/engine/lightmap.cpp @@ -634,7 +634,7 @@ static bool generatelightmap(lightmapworker *w, float lpu, const lerpvert *lv, i int aasample = min(1 << lmaa, 4); int stride = aasample*(w->w+1); vec *sample = w->colordata; - uchar *skylight = w->ambient; + uchar *amb = w->ambient; lerpbounds start, end; initlerpbounds(-blurlms, -blurlms, lv, numv, start, end); float sidex = side0 + blurlms*sidestep; @@ -643,7 +643,7 @@ static bool generatelightmap(lightmapworker *w, float lpu, const lerpvert *lv, i vec normal, nstep; lerpnormal(-blurlms, y - blurlms, lv, numv, start, end, normal, nstep); - for(int x = 0; x < w->w; ++x, normal.add(nstep), skylight += w->bpp) + for(int x = 0; x < w->w; ++x, normal.add(nstep), amb += w->bpp) { #define EDGE_TOLERANCE(x, y) \ (x < blurlms \ @@ -1625,7 +1625,7 @@ static void generatelightmaps(cube *c, const ivec &co, int size) } } int usefacemask = 0; - loopj(6) if(c[i].texture[j] != DEFAULT_SKY && (!(c[i].merged&(1<<j)) || (c[i].ext && c[i].ext->surfaces[j].numverts&MAXFACEVERTS))) + loopj(6) if(!(c[i].merged&(1<<j)) || (c[i].ext && c[i].ext->surfaces[j].numverts&MAXFACEVERTS)) { usefacemask |= visibletris(c[i], j, o, size)<<(4*j); } @@ -1651,7 +1651,7 @@ static bool previewblends(lightmapworker *w, cube &c, const ivec &co, int size) if(isempty(c) || c.material&MAT_ALPHA) return false; int usefacemask = 0; - loopi(6) if(c.texture[i] != DEFAULT_SKY && lookupvslot(c.texture[i], false).layer) + loopi(6) if(lookupvslot(c.texture[i], false).layer) usefacemask |= visibletris(c, i, co, size)<<(4*i); if(!usefacemask) return false; |
