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/octarender.cpp | |
| parent | bec4167d29a68efd0cd2da36143e7f1c78a119a0 (diff) | |
| download | xolatile-badassbug-bffe8d11bd1dfec49280fb64a17f0ae529ac3f5d.tar.xz xolatile-badassbug-bffe8d11bd1dfec49280fb64a17f0ae529ac3f5d.tar.zst | |
Diffstat (limited to 'src/engine/octarender.cpp')
| -rw-r--r-- | src/engine/octarender.cpp | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/src/engine/octarender.cpp b/src/engine/octarender.cpp index aa1da76..7096f47 100644 --- a/src/engine/octarender.cpp +++ b/src/engine/octarender.cpp @@ -390,29 +390,6 @@ int recalcprogress = 0; vector<tjoint> tjoints; -vec shadowmapmin, shadowmapmax; - -int calcshadowmask(vec *pos, int numpos) { - extern vec shadowdir; - int mask = 0, used = 1; - vec pe = vec(pos[1]).sub(pos[0]); - loopk(numpos-2) { - vec e = vec(pos[k+2]).sub(pos[0]); - if(vec().cross(pe, e).dot(shadowdir)>0) { - mask |= 1<<k; - used |= 6<<k; - } - pe = e; - } - if(!mask) return 0; - loopk(numpos) if(used&(1<<k)) { - const vec &v = pos[k]; - shadowmapmin.min(v); - shadowmapmax.max(v); - } - return mask; -} - VARFP(filltjoints, 0, 1, 1, allchanged()); void reduceslope(ivec &n) { @@ -594,7 +571,7 @@ void guessnormals(const vec *pos, int numverts, vec *normals) { void addcubeverts(VSlot &vslot, int orient, int size, vec *pos, ushort texture, ushort lmid, vertinfo *vinfo, int numverts, int tj = -1, bool alpha = false, int layer = LAYER_TOP) { (void) size; int dim = dimension(orient); - int shadowmask = alpha ? 0 : calcshadowmask(pos, numverts); + int shadowmask = 0; LightMap *lm = NULL; LightMapTexture *lmtex = NULL; if(lightmaps.inrange(lmid-LMID_RESERVED)) { @@ -1047,8 +1024,6 @@ void setva(cube &c, const ivec &co, int size, int csi) { loopi(MAXMERGELEVEL+1) vamergeoffset[i] = vamerges[i].length(); vc.origin = co; vc.size = size; - shadowmapmin = vec(co).add(size); - shadowmapmax = vec(co); int maxlevel = -1; rendercube(c, co, size, csi, maxlevel); ivec bbmin, bbmax; @@ -1059,8 +1034,6 @@ void setva(cube &c, const ivec &co, int size, int csi) { va->geommin = bbmin; va->geommax = bbmax; calcmatbb(co, size, va->matmin, va->matmax); - va->shadowmapmin = ivec(shadowmapmin.mul(8)).shr(3); - va->shadowmapmax = ivec(shadowmapmax.mul(8)).add(7).shr(3); va->hasmerges = vahasmerges; va->mergelevel = vamergemax; } @@ -1233,7 +1206,6 @@ void allchanged(bool load) { clearvas(worldroot); resetqueries(); resetclipplanes(); - guessshadowdir(); entitiesinoctanodes(); tjoints.setsize(0); if(filltjoints) findtjoints(); |
