Commit Graph

63 Commits

Author SHA1 Message Date
Eric Wasylishen 0f1a7186d6 qbsp: never merge across liquids, deprecate -nomergeacrossliquids
we've had complaints from both Q1 and Q2 users with water caustics
leaking out from underwater. This was an attempt to save a few faces,
seems it's not worth the trouble.
2024-12-07 19:47:16 -07:00
Eric Wasylishen 9f4cfb0c3d cleanup: code formatting pass 2024-11-18 21:25:27 -07:00
Jonathan b5089ce349 slight speedup by helping embree with alignment
merge some light algorithms together
allow changing attenuation on surface lights with _surflight_atten
replace some emplace_back's with push_back to improve compilation times
2024-06-02 19:49:32 -04:00
Eric Wasylishen d512abd27d qbsp: merge across liquids by default in q1
- change option name to -nomergeacrossliquids
- add docs
- allow using it in q2 as well (requested by jitspoe)
2024-01-25 23:04:31 -07:00
Eric Wasylishen 0aeb0acd94 qbsp: adjust tjunc logic 2024-01-24 00:22:27 -07:00
Eric Wasylishen 6351cc50e6 rename: vec_t -> double 2023-12-23 21:09:16 -07:00
Eric Wasylishen fa890456f6 qbsp: don't merge faces across sky boundaries 2023-05-27 23:42:33 -06:00
Eric Wasylishen 7b7cabaf09 qbsp: don't merge above- and below- water faces in Q1 mode
works around caustics effects in ezQuake/nQuake leaking onto above-water faces.
2023-03-13 23:50:32 -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 35ffc00462 all: add LIGHT_/QBSP_/VIS_ prefixes to epsilons where necessary 2022-10-30 15:08:10 -06:00
Eric Wasylishen 636b376577 squash brushbsp-compilation-speedup branch
move function implementations out of headers
2022-10-21 18:00:58 -06: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 834838ed72 move lmshift to mapface_t
store original mapface_t that a face_t was generated from
2022-08-10 00:53:58 -04:00
Jonathan 46a643c3f0 face_t using planenum 2022-08-02 15:45:06 -04:00
Jonathan 1d8a0c1df3 clang-format pass 2022-07-28 06:14:54 -04:00
Jonathan c9935aaa38 hook up merge and subdivide stats 2022-07-27 23:02:09 -04:00
Jonathan 9c73416594 Squashed commit of the following:
change temp-named planeside_ to plane_flipped

commit 8b3938f5069837e76504a16ffd019a8682fd4325
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 05:35:05 2022 -0400

    fix compile errors/warnings

commit 0c19a922490a332a084ceb65bbb88368fecb40a1
Merge: 31edc84e a2451a41
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 05:30:54 2022 -0400

    Merge branch 'brushbsp' into paril/brushbsp_plane2

    # Conflicts:
    #	qbsp/portals.cc
    #	qbsp/tree.cc

commit 31edc84e5a0f16196aacb4e465657954a523ccf9
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 02:55:52 2022 -0400

    use std::map for the two other hashes (edge/vertex) for speed

commit a9bb68b6ea203226d21f73d42558ffe388fc3051
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 02:31:45 2022 -0400

    remove final uses of FindPlane

commit 951a2b1977f813751c93417901a775a7a0cb77f4
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 02:01:19 2022 -0400

    only set flipped status if we actually flipped; this seems to have no affect in practice, but it was wrong in theory

commit 97610203bebb115391ef39ea2b5c6400b9ce2d89
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 01:56:19 2022 -0400

    remove FindPositivePlane

commit d424afbb2cfa32669883f5aafcf34555169eec3e
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 01:22:10 2022 -0400

    side_t uses plane and side_ now

commit af883bc111049a8c6fcb12c8c888e17f03cf30ff
Author: Jonathan <jonno.5000@gmail.com>
Date:   Wed Jul 27 00:46:52 2022 -0400

    face_t uses internal plane

commit 1cd776c89b683b0af0d8a642eee7e54b5f54b559
Author: Jonathan <jonno.5000@gmail.com>
Date:   Tue Jul 26 22:59:47 2022 -0400

    node_t using plane directly, pulling planenum in when necessary

commit 8b34312ef9c3d416c011f2694a34fb9d5eba4faa
Author: Jonathan <jonno.5000@gmail.com>
Date:   Tue Jul 26 22:22:28 2022 -0400

    remove PLANENUM_LEAF, use a boolean for the separation
2022-07-27 05:38:50 -04:00
Jonathan 4e3739c751 use a reader/writer-esque lock (shared_mutex) instead of exclusive-only recursive lock to speed up plane stuff 2022-07-24 19:05:28 -04:00
Jonathan feb6055b07 remove errors pertaining to MAXEDGES (except on output) since we dynamically expand now
allow command line to specify maxedges
default maxedges to 0 (no limit) for Quake II
2022-07-14 04:57:52 -04:00
Eric Wasylishen fce258a7b7 qbsp: csg4.cc -> csg.cc 2022-07-04 00:17:18 -06:00
Eric Wasylishen 97d360120b qbsp: use unique_ptr for node_t::facelist 2022-07-03 23:41:48 -06:00
Eric Wasylishen 40bba01b21 qbsp: brushbsp.cc import from qbsp3 2022-07-03 01:22:09 -06:00
Eric Wasylishen b21e245d99 qbsp: surface.cc -> faces.cc 2022-06-28 00:23:47 -06:00
Eric Wasylishen aabd1c27dc qbsp: face_t: make contents, lmshifts single sided
side_t: same, also remove contents (unused)
2022-06-24 01:14:11 -06:00
Eric Wasylishen 84e007b7ce qbsp: fix noclipfaces tests 2022-06-21 00:39:07 -06:00
Eric Wasylishen e39c8f9cf6 qbsp: fix simple_worldspawn_detail_wall 2022-06-20 23:05:56 -06:00
Eric Wasylishen 5fc6cbc95e qbsp: wip import MakeFaces from qbsp3 2022-06-19 16:04:54 -06:00
Jonathan 13bf99a7f3 fix test cases (implement equals(game) properly, and `is_empty` is false depending on get_content_type for Q2 now)
remove unnecessary condition from Q2 contents_are_empty since areaportals are already considered a valid non-empty type via get_content_type
2022-06-11 09:19:51 -04:00
Jonathan c5e864fca1 re-enable stuff
undo the shared lock stuff
2022-06-06 03:26:19 -04:00
Jonathan 8f50108b5e slight optimization for winding_t: use memcpy directly. the copy constructor can't automatically optimize it into a memcpy because of the iterator wrapper.
use side_t where appropriate
add a shared lock to map.planes, and hide the original vector to prevent non-locked read/writes
move MakeSkipTexinfo to the beginning of the operation - make a global skip texinfo as the first texinfo. it will get culled out later if need be.
re-enable ChooseMidPlaneFromList; seems to work, but maybe there's a test that is failing that is the reason it was if'd out?
enable parallelization of PartitionBrushes since map.planes is lockable now
2022-06-05 22:52:02 -04:00
Eric Wasylishen d5320d5aaa qbsp: subdivide faces after merging 2022-04-26 21:41:03 -06:00
Eric Wasylishen ed95e6a838 merge.cc: style 2022-04-15 02:01:19 -06:00
Eric Wasylishen ca589906d8 qbsp.hh: remove merge.hh include 2022-04-09 23:25:01 -06:00
Eric Wasylishen 2e14909e84 qbsp.hh: remove map.hh include 2022-04-09 23:23:26 -06:00
Eric Wasylishen 147a76c11b qbsp.hh: remove csg4.hh include 2022-04-09 23:17:43 -06:00
Eric Wasylishen a019088c2f Merge branch 'type-cleanup' into brushbsp 2022-04-02 21:05:46 -06:00
Jonathan c81e9ace28 remove old threading code entirely
add new parallel logging stuff in common/parallel which wraps parallel_for(_each) and provides automatic percentage indicator
fix issue with light not pulling in settings
move logging stuff into its own namespace and simplify
2022-03-01 10:28:59 -05:00
Jonathan df92d9ce12
Command line args systems (#2)
* cmd

* cmake change for tbb DLLs
add in test for double-hyphens

* cmd

* game version

* settings!

* bsp texture usage
decompile fix for q1bsp

* finish up the options for qbsp

* light finished?

* finish up the few missing bits

* move scalar/int32 up

* Run clang-format pass

* natvis for our mathlib
use slightly faster storage for winding
fix light tests

* allow dictionary to be a base type

* re-run style

* Remove cfg_static
Fix options summary

* natvis for lockable_value<T>

* last-ish pass?

* format

* forgot last few lockables
2022-02-27 00:01:57 -05:00
Eric Wasylishen b04a6e9a30 qbsp: csg: re-add checking of map file order 2022-02-21 12:00:26 -07:00
Eric Wasylishen 70ea752587 qbsp: restore MergeAll 2022-02-20 23:57:42 -07:00
Jonathan ed325eedea surface faces now use list/vector 2022-02-06 11:39:22 -07:00
Jonathan 15484b55f8 Use better tjunction vertex addition
Parallel MergeAll
Allow modifyable iterators from polylib; resizing may invalidate them however
2022-01-28 09:45:29 -05:00
Jonathan e92b9f1ff9 Fix miscalculation for has_struct
Remove unused variable
2022-01-23 21:48:24 -05:00
Jonathan 75339df231 Simplify surface_t by using lists 2022-01-23 19:00:01 -05:00
Jonathan 5dd2deba8e use custom type for two-sided things to simplify brain power (.front/.back is easier to process than [0]/[1]) 2022-01-23 00:26:58 -05:00
Jonathan a5f8ecd471 VectorSubtract 2021-10-24 23:26:20 -04:00
Jonathan 3c2ca93b0c normalizeInPlace no longer nodiscard since you might want to only normalize the ref
remove VectorNormalize
2021-10-23 13:34:12 -04:00
Jonathan 4dca2d7d07 VectorInverse, VectorSet, VectorClear gone 2021-10-23 13:15:38 -04:00
Jonathan a21be0362c replace VectorCompare, CrossProduct, DotProduct
qv::dot handles inputs a bit more gracefully now
plane::distance_to for distance checks, and dplane has the fast version
2021-10-21 23:25:19 -04:00
Jonathan cb3c81aaf8 vec3_t gonedy 2021-10-21 20:21:28 -04:00