Skip to content

dmap fixes - #41

Merged
FriskTheFallenHuman merged 4 commits into
FriskTheFallenHuman:mainfrom
m0rb:dmap-fixes
Jul 9, 2026
Merged

dmap fixes#41
FriskTheFallenHuman merged 4 commits into
FriskTheFallenHuman:mainfrom
m0rb:dmap-fixes

Conversation

@m0rb

@m0rb m0rb commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Result of a just a wee bit of R&D to get to commercial dmap parity (c/o issue #36, #38)

creating a PR before I forget about it

morb and others added 4 commits June 10, 2026 09:33
Closes the 205→186 shadowModel and 40.7→21.0 MB gap that was producing
specular rainbow and dancing shadow artifacts in feedingtowerd.
Verified via Ghidra + gdb reference captures, A/B BSP vertex bit
comparison, and shadowModel set diffs against commercial 1.2 and 1.4.

Final results: 186 shadowModels, 2,373 surfaces, 21.04 MB —
geometrically identical to what's in commercial pakfiles.

usurface.cpp inline-merge skip filters:
  - IsDefaultModel() results (unregistered inline func_static_N
    entities were merging bogus 24-vert _default boxes).
  - Non-drawn, non-shadow surfaces (matches TriListForSide; was
    leaking collision_* into worldspawn).
  - Materials with ConstantRegisters()==NULL: these reference
    per-entity shaderParm0..6 (ft_lightpod, buglight2) and lose their
    parm values when folded into worldspawn.

Winding.cpp x87 parity for BSP topology:
  - Plane distance + dot in double (Split/Clip/ClipInPlace/PlaneSide)
    so SelectSplitPlaneNum scoring matches.
  - Split-point lerp in long double (x86_64 native 80-bit) to match
    HumanHead's builds with x87 intermediate precision.
…ecision was overkill. Discovered and Worked around some segfaults, hangs, and stack-smashing situ.
@FriskTheFallenHuman
FriskTheFallenHuman merged commit 0767414 into FriskTheFallenHuman:main Jul 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants