Eric Wasylishen
ee075b5781
qbsp: shrink node_t from 328 to 280 bytes
2024-02-27 23:34:47 -07:00
Eric Wasylishen
12b8066246
light: change remaining double -> float
...
tiny perf improvement on base1-test.map with light params:
-emissivequality high
before: 7.4s
after: 6.9s
no visible changes in base1.
2024-02-25 23:42:45 -07:00
Eric Wasylishen
126931a151
qbsp: fix ChooseMidPlaneFromList selecting detail splits too early leading to leaks
2024-01-05 12:32:01 -07:00
Eric Wasylishen
6351cc50e6
rename: vec_t -> double
2023-12-23 21:09:16 -07:00
Jonathan
b83c4a6440
use fold expr instead of for statements in vec3
...
fix a bunch of clang warnings
2023-11-04 19:01:08 -04:00
Eric Wasylishen
f9a9733068
qbsp: fix crash in CheckPlaneAgainstVolume if node->volume is already empty
2023-09-28 20:30:49 -06:00
Jonathan
6baa1243cf
allow auto-gamedir to handle subdirectoried maps properly
...
fix include paths
2023-09-08 08:41:56 -04:00
Eric Wasylishen
7608a78b44
style: use std::min/std::max/std::clamp and remove using
2023-08-07 15:42:29 -06:00
Eric Wasylishen
db42b2116a
use std::abs in remaining places that were using C abs()
2023-08-07 15:23:12 -06:00
Eric Wasylishen
261d6da37d
qbsp: revert b994bb7 "disable CheckPlaneAgainstVolume checks"
...
it was causing leaks through solids
2023-05-22 23:01:07 -06:00
Jonathan
1548f25daf
allow individual brush chop control
...
allow passing _surflight_targetname to set targetnames for switchable lights on bmodels
2023-05-08 17:44:32 -04:00
Eric Wasylishen
b994bb750d
brushbsp: disable CheckPlaneAgainstVolume checks
...
this check prevents splitting on small brush fragments, where we actually need to split.
if we don't the small fragments cause incorrect leaf contents to be assigned.
2023-05-05 23:07:16 -06:00
Eric Wasylishen
0628f768e2
qbsp: minor clarification in SplitBrush
2023-04-29 12:26:48 -06:00
Eric Wasylishen
6e064ae3c7
qbsp: restore detail to non-sealing
2023-03-26 16:20:10 -06:00
Eric Wasylishen
eda6155844
cleanup: run ./clang-format-all.sh
...
clang-format version 15.0.7
2023-02-18 22:59:43 -07:00
Eric Wasylishen
2bd2515792
all: cleanup unused includes (Clion - detect not directly used)
2022-10-31 21:37:34 -06:00
Eric Wasylishen
636b376577
squash brushbsp-compilation-speedup branch
...
move function implementations out of headers
2022-10-21 18:00:58 -06:00
Eric Wasylishen
7a014819f0
qbsp: keep bspbrushes around if -debugbspbrushes is used
2022-09-27 09:55:02 -06:00
Eric Wasylishen
8ee39cf874
qbsp: CountLeafs: also measure avg/max bsp height
2022-09-17 19:53:49 -06:00
Eric Wasylishen
9c46699b60
qbsp: experiment with fixing micro-leaks
2022-09-12 02:10:04 -06:00
Eric Wasylishen
b17fc3eab1
qbsp: address missing "faceCopy.tested = false"
2022-09-12 00:56:10 -06:00
Eric Wasylishen
c90c16ee45
qbsp: add -debugleafvolumes
2022-09-12 00:36:33 -06:00
Eric Wasylishen
4567f9b4b9
qbsp: add -debugleak for saving more info about leaks
2022-09-11 23:56:29 -06:00
Eric Wasylishen
c8c526ab57
qbsp: fix mist-clip intersection chopping up the faces
...
note it makes the simple_worldspawn_detail clipnodes count
test fail. Clipnode counts are way too high in general so this isn't
a huge issue yet.
2022-08-28 14:13:14 -06:00
Eric Wasylishen
7df6310d32
qbsp: init brush sides to visible
...
improves the quality of the first BSP build
2022-08-27 23:36:58 -06:00
Eric Wasylishen
1ab6cc1e65
qbsp: fix iterator debug assertion in ChopBrushes
...
"cannot decrement begin list iterator"
2022-08-27 14:54:36 -06:00
Jonathan
e7ae158a10
split up BrushBSP and CountLeafs stat prints
2022-08-21 21:54:16 -04:00
Jonathan
4eebbd0bdd
re-introduce qbsp3's "don't use clip brush sides as splitters"
2022-08-21 17:36:19 -04:00
Jonathan
fe41b1ae1b
fix format error for Q1 contents
...
re-introduce chop since it may be a key to the puzzle for hullnums
allow caller to do full fragmentation, add option to force it
fix BrushGE causing liquids, etc to be cut up
2022-08-21 16:16:09 -04:00
Jonathan
2d8827e031
Revert "Q3 didn't need chop, we don't either!"
...
This reverts commit f57ecaf599 .
# Conflicts:
# include/qbsp/brushbsp.hh
2022-08-21 15:04:26 -04:00
Jonathan
282c5ec69f
stat printing adjustments
2022-08-21 15:01:45 -04:00
Eric Wasylishen
08e3254dae
brushbsp: track tree level for debugging
2022-08-20 00:52:24 -06:00
Eric Wasylishen
6b07e0c5f4
brushbsp: return split planes as side_t* for better debuggability
2022-08-20 00:51:52 -06:00
Jonathan
84870cf366
since tree_t only exists as a type that only allocates heap memory, we don't need to wrap it in a unique_ptr; this also allows the vectors to keep their memory on the next pass, which may improve performance for huge maps
...
removed tree_t parameter from functions that don't need it
pass reference to tree_t instead of ptr
use an enum instead of std::optional<bool> for the ternary value to store split type, since it's more explicit and obvious now what the three values do
2022-08-19 15:15:53 -04:00
Jonathan
057ae544c4
use references in places where we know it's non-null
2022-08-19 12:11:35 -04:00
Eric Wasylishen
6eab754ca3
qbsp: reset onnode at the beginning of BrushBSP
2022-08-18 22:26:33 -06:00
Jonathan
f57ecaf599
Q3 didn't need chop, we don't either!
2022-08-18 19:47:34 -04:00
Jonathan
40b04b9518
use alloca instead of thread-local static
2022-08-13 20:30:51 -04:00
Jonathan
2059835a47
use a more optimized version of SplitBrush for CheckPlaneAgainstVolume that doesn't require allocating/freeing a lot of memory
2022-08-13 06:39:30 -04:00
Eric Wasylishen
06a116670b
winding_t: make non-copyable
2022-08-12 02:06:23 -06:00
Jonathan
ea38e5eeb7
fix missing move
...
fix clip_back causing extra copies
2022-08-12 02:03:00 -04:00
Jonathan
bf162c7a86
allow explicit calling of percent_clock so it can be simplified a bit
...
add more timers in a few spots
by default, display percent timers but don't display elapsed for non-verbose stuff (bmodels); this is so it still shows that it's "working" instead of just showing blank for large maps, give user an idea on progress for certain stuff
merge all "side not found"s into a single line
time `FillOutside`
time `ProcessMapBrushes`
time `Brush_LoadEntity`
2022-08-12 01:30:04 -04:00
Jonathan
4bf2ab338c
allowing logging::percent to handle indeterminate values
...
fix logging::percent getting stomped in multi-threaded operations
add new stats facility to make creating lists of single-use stats easier to manage
fix SplitBrush storing a bunch of extra stats for ChopBrushes
2022-08-11 20:33:12 -04:00
Jonathan
f851fac655
speed up compilation - we don't need to make a copy of node->volume going into SplitBrush now
2022-08-11 02:58:49 -04:00
Jonathan
f17ce185f6
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-11 00:27:36 -04:00
Jonathan
0db1e0fc01
add chop control to settings
...
only chop if desired or if hull is -1 or > 0 since those can be chopped without affecting visuals
farewell, shared_lock
fix brush contents issue
2022-08-11 00:27:28 -04:00
Eric Wasylishen
1f3bf6edbc
qbsp: log BrushBSP function name
2022-08-10 21:45:08 -06:00
Jonathan
129dedb268
reset onnode between BrushBSP passes
2022-08-10 23:28:16 -04:00
Jonathan
4b4a1738fd
more partial revert
2022-08-10 23:06:37 -04:00
Jonathan
02e80645e6
partial revert of 097b564cc6
2022-08-10 22:43:42 -04:00