diff options
| author | xolatile | 2025-07-21 17:43:24 +0200 |
|---|---|---|
| committer | xolatile | 2025-07-21 17:43:24 +0200 |
| commit | 975941e8f3262e5fcb26c0436a8706353c25ebca (patch) | |
| tree | 5dca2f7090a9f0838b301dbd0aa40532c0f5a182 /src/engine/shadowmap.cpp | |
| parent | 6de153293f0ba70aed1f7714f626bc5652a9bd32 (diff) | |
| download | xolatile-badassbug-975941e8f3262e5fcb26c0436a8706353c25ebca.tar.xz xolatile-badassbug-975941e8f3262e5fcb26c0436a8706353c25ebca.tar.zst | |
Few maps in progress...
Diffstat (limited to 'src/engine/shadowmap.cpp')
| -rw-r--r-- | src/engine/shadowmap.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/engine/shadowmap.cpp b/src/engine/shadowmap.cpp index 4dafbd8..34b0fd4 100644 --- a/src/engine/shadowmap.cpp +++ b/src/engine/shadowmap.cpp @@ -161,7 +161,7 @@ static struct shadowmaptexture : rendertarget shadowmapping = false; shadowmapmaxz = min(shadowmapmaxz, shadowfocus.z); - if(shadowmapcasters && smdepthpeel) + if(shadowmapcasters && smdepthpeel) { int sx, sy, sw, sh; bool scissoring = rtscissor && scissorblur(sx, sy, sw, sh) && sw > 0 && sh > 0; @@ -253,8 +253,8 @@ bool isshadowmapreceiver(vtxarray *va) float skew = va->size/2*SHADOWSKEW; if(!shadowmap || !shadowmaptex || va->o.z + va->size <= shadowfocus.z - shadowmapdist || va->o.z >= shadowmapmaxz || - va->o.x + va->size <= cx - shadowmapradius-skew || va->o.x >= cx + shadowmapradius+skew || - va->o.y + va->size <= cy - shadowmapradius-skew || va->o.y >= cy + shadowmapradius+skew) + va->o.x + va->size <= cx - shadowmapradius-skew || va->o.x >= cx + shadowmapradius+skew || + va->o.y + va->size <= cy - shadowmapradius-skew || va->o.y >= cy + shadowmapradius+skew) return false; return true; #endif @@ -296,13 +296,13 @@ void pushshadowmap() g = max(25.0f, 0.4f*ambientcolor[1] + 0.6f*max(ambientcolor[1], skylightcolor[1])); b = max(25.0f, 0.4f*ambientcolor[2] + 0.6f*max(ambientcolor[2], skylightcolor[2])); } - else + else { r = max(25.0f, 2.0f*ambientcolor[0]); g = max(25.0f, 2.0f*ambientcolor[1]); b = max(25.0f, 2.0f*ambientcolor[2]); } - } + } else { r = shadowmapambientcolor[0]; g = shadowmapambientcolor[1]; b = shadowmapambientcolor[2]; } GLOBALPARAMF(shadowmapambient, r/255.0f, g/255.0f, b/255.0f); } |
