diff options
| author | xolatile | 2025-08-17 18:28:28 +0200 |
|---|---|---|
| committer | xolatile | 2025-08-17 18:28:28 +0200 |
| commit | bffe8d11bd1dfec49280fb64a17f0ae529ac3f5d (patch) | |
| tree | 9f4f7b6f5003585e5a170bd55ccaa335b8f26f90 /src/engine/lightmap.cpp | |
| parent | bec4167d29a68efd0cd2da36143e7f1c78a119a0 (diff) | |
| download | xolatile-badassbug-master.tar.xz xolatile-badassbug-master.tar.zst | |
Diffstat (limited to 'src/engine/lightmap.cpp')
| -rw-r--r-- | src/engine/lightmap.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/engine/lightmap.cpp b/src/engine/lightmap.cpp index 3840d58..9cc835e 100644 --- a/src/engine/lightmap.cpp +++ b/src/engine/lightmap.cpp @@ -20,7 +20,6 @@ struct lightmapworker { VSlot *vslot; Slot *slot; vector<const extentity *> lights; - ShadowRayCache *shadowraycache; bool needspace, doneworking; SDL_cond *spacecond; SDL_Thread *thread; @@ -377,7 +376,7 @@ static uint generatelumel(lightmapworker *w, const float tolerance, uint lightma float angle = -ray.dot(normal); if(angle <= 0) continue; if(lmshadows && mag) { - float dist = shadowray(w->shadowraycache, light.o, ray, mag - tolerance, RAY_SHADOW | (lmshadows > 1 ? RAY_ALPHAPOLY : 0)); + float dist = shadowray(light.o, ray, mag - tolerance, RAY_SHADOW | (lmshadows > 1 ? RAY_ALPHAPOLY : 0)); if(dist < mag - tolerance) continue; } lightused |= 1<<i; @@ -1354,7 +1353,6 @@ lightmapworker::lightmapworker() { blur = new uchar[4*(LM_MAXW + 4)*(LM_MAXH + 4)]; colordata = new vec[4*(LM_MAXW+1 + 4)*(LM_MAXH+1 + 4)]; raydata = new vec[(LM_MAXW + 4)*(LM_MAXH + 4)]; - shadowraycache = newshadowraycache(); needspace = doneworking = false; spacecond = NULL; thread = NULL; @@ -1367,7 +1365,6 @@ lightmapworker::~lightmapworker() { delete[] blur; delete[] colordata; delete[] raydata; - freeshadowraycache(shadowraycache); } void lightmapworker::cleanupthread() { @@ -1379,7 +1376,6 @@ void lightmapworker::reset() { bufstart = bufused = 0; firstlightmap = lastlightmap = curlightmaps = NULL; needspace = doneworking = false; - resetshadowraycache(shadowraycache); } bool lightmapworker::setupthread() { @@ -1474,7 +1470,7 @@ void calclight(int *quality) { mpremip(true); loadlayermasks(); int numthreads = lightthreads > 0 ? lightthreads : numcpus; - if(numthreads > 1) preloadusedmapmodels(false, true); + if(numthreads > 1) preloadusedmapmodels(false); resetlightmaps(false); clearsurfaces(worldroot); taskprogress = progress = 0; |
