Commit Graph

1496 Commits

Author SHA1 Message Date
Eric Wasylishen fc003c64cd cleanup: use more default comparison 2025-01-28 21:56:49 -07:00
Eric Wasylishen 41ac385840 docs: note that dmodel::origin is apparently unused 2025-01-23 23:49:09 -07:00
Eric Wasylishen de1e130e4f tests: better documentation and test for areaportals 2025-01-20 00:16:56 -07:00
Eric Wasylishen 4c1d4af2ed cleanup: use spaceship operator where possible 2025-01-01 16:57:21 -07:00
Eric Wasylishen bbe39c7c82 bspfile: make conversion operators/constructors explicit 2024-12-27 17:07:39 -07:00
Eric Wasylishen ca26b0e669 style: use twosided<T> instead of std::array<T,2> 2024-12-25 20:03:51 -07:00
Eric Wasylishen bbd5bc7ff8 qbsp: replace old .prt writing code with WritePortalfile 2024-12-15 22:34:40 -07:00
Eric Wasylishen 2b99fa3a62 common/prtfile: add WritePortalfile (unused currently) 2024-12-14 23:33:13 -07:00
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 d7eca5f317 cmdlib: fix broken Q_strcasecmp and Q_strncasecmp
string_view isn't null terminated, can't use C string functions
2024-11-29 00:15:54 -07:00
Eric Wasylishen a0953767a2 qbsp: more func_illusionary_visblocker fixes
See #441

- fix visblocker merging with detail_illusionary, by introducing a new content type
- fix _mirrorinside 0 not working on visblocker
2024-11-23 22:21:51 -07:00
Eric Wasylishen 9f4cfb0c3d cleanup: code formatting pass 2024-11-18 21:25:27 -07:00
Eric Wasylishen 8038b730e1 qbsp: fix func_illusionary_visblocker
Fixes #440
2024-11-18 21:19:41 -07:00
Eric Wasylishen cdedc6220c cleanup: remove some more const references to small objects 2024-11-17 22:08:44 -07:00
Eric Wasylishen 1337919805 cleanup: don't pass std::string_view by reference
by value is the same on MSVC, may be marginally better elsewhere

see:
https://quuxplusone.github.io/blog/2021/11/09/pass-string-view-by-value/
https://quuxplusone.github.io/blog/2021/11/19/string-view-by-value-ps/
2024-11-17 21:52:10 -07:00
Eric Wasylishen 9c016b0e3a cleanup: don't pass float_type by reference 2024-11-17 21:40:41 -07:00
Eric Wasylishen 1c6c48426a cleanup: don't pass float by reference (it's only 4 bytes) 2024-11-17 21:39:26 -07:00
Eric Wasylishen 4cffdc1cd2 cleanup: don't pass bool by reference 2024-11-17 21:37:17 -07:00
Eric Wasylishen 71933f2be1 cleanup: don't pass double by reference (it's only 8 bytes) 2024-11-17 21:34:54 -07:00
Eric Wasylishen c755f47c03 cleanup: don't pass size_t by reference (it's only 8 bytes) 2024-11-17 21:26:27 -07:00
Eric Wasylishen b8fdbe3d41 cleanup: don't pass contentflags_t by reference (it's only 8 bytes) 2024-11-17 21:23:09 -07:00
Eric Wasylishen 472077b8e1 common: add has_structural_solid() helper 2024-11-17 15:05:40 -07:00
Eric Wasylishen 49fe4dc33d common: add gtest printing support to aabb type 2024-11-17 15:05:40 -07:00
Eric Wasylishen 14d8b5f6fc common: fix bitflag_names 2024-10-31 19:05:23 -06:00
Eric Wasylishen b2f23f7642 build fix attempt 2024-09-18 23:33:13 -06:00
Eric Wasylishen 68a5b55af9 polylib: make winding printable for debugging/testing 2024-09-18 23:15:24 -06:00
Eric Wasylishen f5d105b34d qvec: allow gtest to print 2024-09-18 23:12:26 -06:00
Eric Wasylishen ed62ec1040 cleanup: remove unused game argument from contentflags_t::to_string() 2024-09-08 19:36:00 -06:00
Eric Wasylishen 6ff979e450 qbsp: redesign _chop and _chop_order
- add docs and tests
2024-09-07 11:36:04 -06:00
Jonathan 6c9b681b0f Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2024-08-26 06:12:09 -04:00
Jonathan 2b700f0514 allow non-fatal compiler errors
fix crash in whitespace trim
increase stack size
2024-08-26 06:12:05 -04:00
Eric Wasylishen 3f1659dd84 qbsp: only reuse edges once for software renderer compat
Issue reported by Izhido
2024-08-05 15:45:55 -06:00
Eric Wasylishen a6ee0c6c4d bsputil: move settings to header 2024-08-04 10:45:12 -06:00
Eric Wasylishen e5f01ce0e3 light: add _switchableshadow_target
Switchable shadows setup which works in id1

Fixes #432
2024-07-20 23:11:26 -06:00
Eric Wasylishen 8ac82b7c79
Add Ubuntu 24.04 CI, Fix Embree 4 (#434)
* Add Ubuntu 24.04 to CI matrix.

* Fix embree4 bitrot.

* For Linux, only upload artifact from Ubuntu 22.04 for now

Should fix this error reported on ubuntu-22.04's CI

Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

* Use system TBB and Embree 4 on ubuntu-24.04

* skip packaging of embree/TBB if using system provided packages

* For Linux, only upload artifact from Ubuntu 22.04 for now (fix)

* common: fix ASan error on non-null-terminated (16 char long) texture names

---------

Co-authored-by: Daniel Svensson <dsvensson@gmail.com>
2024-07-20 19:51:19 -06:00
Jonathan f816b433d1 fix visible clip brushes
add support for the two missing content flags from re-release
2024-06-07 21:22:38 -04: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
Jonathan 0f844ad3e2 don't output debug stuff if we don't need it 2024-05-29 07:12:56 -04:00
Eric Wasylishen 30868eacb7
light: LIGHTING_E5BGR9 + HDR .lit support (#427)
* light: Add support for LIGHTING_E5BGR9.

This is not really finished. Currently mutually exclusive with
regular RGBLIGHTING, and not tested with external .lit file.

* light: replace HDR_PackResult with a version following the OpenGL spec

- add HDR_UnpackE5BRG9 for unpacking
- caller is now responsible for scaling 128 -> 1
- expose in header for tests

* light: move HDR_PackE5BRG9/HDR_UnpackE5BRG9 to common/litfile.hh

* build: std::powf not available in gcc

* common: move LoadLitFile to litfile.hh

* common: LoadLitFile: return hdr variant as well

* lightpreview: add an Exposure slider

* lightpreview: support hdr .lit's, wip

* tests: refactoring to set up testing for hdr lit's

* tests: add test for -hdr and -bspxhdr

* tests: fix LM_Sample to deal with styles correctly

* lightpreview: fix glsl error

* lightpreview: show dialog box for glsl compile errors

---------

Co-authored-by: Daniel Svensson <dsvensson@gmail.com>
2024-05-26 21:55:10 -06:00
Eric Wasylishen a09ad4672f build: remove some constexpr's gcc 11 didn't like 2024-05-20 11:48:44 -06:00
Jonathan 6c9962eb8c some more memory adjustments
settings cleanup, maputil/bsputil changes

(cherry picked from commit 59ac57306f13ff53f935f51bb5df1e59e76753ef)

# Conflicts:
#	bsputil/bsputil.cc
2024-05-20 11:28:03 -04:00
Eric Wasylishen c714ce597a qbsp: use mapfile.cc for .map file parsing
BP loading is broken by this commit, will need
to re-introduce loading the texture sizes in mapfile.
2024-04-07 22:20:33 -06:00
Eric Wasylishen 9985d6c8fd fix odr violations
not sure why these only started to be reported on this branch
2024-04-01 12:20:35 -06:00
Jonathan 71aa8aaeea
Paril/mem write (#412)
* simplify light_surfaces storage

* memory on writes

* Revert "batch together traces on the whole surface - saves a small amount of time"

This reverts commit 72611b7e97.

# Conflicts:
#	light/ltface.cc

* fix a use-after-move

* don't try to write lightmap if it has no styles

* fix issue with alignment
2024-03-13 20:01:05 -06:00
Eric Wasylishen b89bac4e8c common: split start of bspfile.hh into bspfile_common.hh
old layout was confusing CLion because bspfile.hh included
itself
2024-03-11 20:14:59 -06:00
Eric Wasylishen 275695a37c qbsp: remove -transsky flag which was broken
unknown what it was useful for
2024-03-09 22:07:55 -07:00
Eric Wasylishen aa3b8479b4 qbsp: shrink node_t from 280 to 208 bytes
- contentflags_t from 80 to 8 bytes
2024-03-09 19:37:23 -07:00
Jonathan 3d419853d3 store leaves on surf instead of surface light 2024-03-09 00:14:03 -05:00
Jonathan 6c1feb5af8 cut per-surface memory usage down by making streams re-usable per thread 2024-03-08 23:09:16 -05:00
Jonathan 6157945d4d optimize Q2 brush info by using world-aligned defaults if they exist
optimize Q2 animations by using world-aligned defaults, since Q2 only needs the secondary texinfo for the texture
2024-03-05 11:11:20 -05:00