fix shadow coplanar with bottom z

This commit is contained in:
Stewart Allen 2025-12-08 17:35:21 -05:00
commit cd7c0f7597
2 changed files with 3 additions and 1 deletions

View file

@ -913,6 +913,8 @@ class Widget {
if (a.z < z && b.z < z && c.z < z) {
// skip faces under threshold
continue;
} else if (a.z === z && a.z === b.z && a.z === c.z) {
// skip faces coplanar with z (shadow looks up)
} else if (a.z >= z && b.z >= z && c.z >= z) {
found.push([a, b, c]);
} else {

View file

@ -17,7 +17,7 @@ const clib = self.ClipperLib;
const ctyp = clib.ClipType;
const ptyp = clib.PolyType;
const cfil = clib.PolyFillType;
const ts_off = 0.1;
const ts_off = 0.01;
class OpArea extends CamOp {
constructor(state, op) {