Commit Graph

247 Commits

Author SHA1 Message Date
Eric Wasylishen ea8a733b37 tests: add _suntexture test 2024-02-05 23:47:23 -07:00
Eric Wasylishen aa970c0d18 qbsp: only pick up .wad textures when compiling for non-Q2 games
fixes #404
2024-02-04 19:41:45 -07:00
Eric Wasylishen a5b77d4dc4 tests: remove quake_map_source tests 2024-02-03 14:18:25 -07:00
Eric Wasylishen e8747407d6 tests: add test for solid black lightmaps in HL mode 2024-01-28 21:46:47 -07:00
Eric Wasylishen 23591efba9 tests: add test for q1 faces which receive no light
they're allowed to be written as style 255 / lightofs -1 in Q1 mode
including lit water.
2024-01-28 21:02:53 -07: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 a8443ef0cf qbsp: make ALPHATEST imply DETAIL, TRANSLUCENT, and WINDOW (if solid)
like the existing logic for TRANS33/TRANS66
2024-01-23 21:16:40 -07:00
Eric Wasylishen b66c95a53f tests: add q2_mist_transwater 2024-01-23 20:36:34 -07:00
Eric Wasylishen 0583676af9 build fix 2024-01-22 21:59:49 -07:00
Eric Wasylishen 1b92d61cfb testmaps: add tjunc test matrix for q2 2024-01-22 21:34:49 -07:00
Eric Wasylishen 49d9c3be41 tests: add a test for Q2 fully black lightmaps
they can't be optimized with styles = [255, 255, 255, 255] like in Q1 mode
2024-01-14 20:31:28 -07:00
Eric Wasylishen 07e050f484 light: restore -bounce flag with no arguments as a shorthand for -bounce 1 2024-01-13 18:35:18 -07:00
Jonathan Linat 39074b8249
CI: Enable Qt5 + lightpreview (#406)
* chore(CI): refine current 'cmake.yml' file content

* chore(CI): enable Qt5 on Linux and macOS

* Appveyor.yml: remove deploy step

we are deploying from GitHub Actions now

* build-linux-64.sh: adjust .zip wildcard

to hopefully not break on PR builds

* build-linux-64.sh: remove fragile unzip/readelf lines

* lightpreview\CMakeLists.txt: only install Qt on Win/Mac

* lightpreview: attempt to fix mac Qt packaging

* lightpreview: apple fixes

* Install qtdbus on macOS

* try alternate dbus module name

* try cmake find_package for dbus

* also find Qt5PrintSupport

* build-osx.sh: remove coreutils install

we don't use sha256sum anymore

* lightpreview/CMakeLists.txt: create .app bundle on macOS

* Update CMakeLists.txt

* build-*: run cpack as part of the build command

on my macOS test system, running cpack separately
is doubling the build time

* cmake: factor out add_loader_path_to_rpath function, apply to all targets

* chore(CI): add steps to re-pack the 'doc' and 'bin' directories

* chore(CI): remove GitHub release-related step (to be re-introduced)

* chore(CI): adjust inflating destination directories

---------

Co-authored-by: Eric Wasylishen <ewasylishen@gmail.com>
2024-01-08 20:16:41 -07:00
Eric Wasylishen 4f9cb6c2e0 testmaps: add e3m4.map test case from LibreQuake
commit 07a310760307585cd5663a52ae5d535bc384081f
2024-01-05 12:32:01 -07:00
Eric Wasylishen 8db1d32e9f light: fix excessive bouncing with lit water, or _shadow -1
Fixes #397
2023-12-24 00:44:56 -07:00
Eric Wasylishen 6351cc50e6 rename: vec_t -> double 2023-12-23 21:09:16 -07:00
Eric Wasylishen f0c8d92993 qbsp: add -missing_textures_as_zero_size flag to allow writing 0x0 textures when a texture is missing
this allows us to write the texture name, but it's non-standard.

light: warn when a surface light template doesn't match any faces in the bsp
2023-12-21 00:05:40 -07:00
Eric Wasylishen 2210fd2701 tests.cc: more build fixes 2023-12-07 23:17:24 -07:00
Eric Wasylishen 3673162f63 fix build errors + test failures from double -> float changes 2023-12-07 23:06:52 -07:00
Eric Wasylishen 26588fbf6b tests: skip failing tests until the plane side issue is fixed 2023-12-04 20:25:19 -07:00
Eric Wasylishen e07f76cf75 tests: add a consistency check that face winding order is consistent with plane normal 2023-12-03 15:30:03 -07:00
Eric Wasylishen 05ae8b0d19 tests: remove unneeded may_fail() 2023-12-03 14:31:11 -07:00
Eric Wasylishen 3eb5cb7c64 qbsp: omit func_detail_illusionary from bspx brushlist
also func_illusionary_visblocker

fixes #371

qbsp: fix bspx brushes
2023-11-26 01:17:03 -07:00
Eric Wasylishen b58b976693 tests: add qbsp content type tests 2023-11-26 00:23:41 -07:00
Eric Wasylishen ad9fd7fc59 common: structured bspxbrushes reading/writing 2023-11-25 17:28:26 -07:00
Eric Wasylishen db0951dc40 light: support embree4 in addition to 3 2023-11-19 14:14:22 -07:00
Eric Wasylishen c77f4ba2dd qbsp: fix misc_external_map + -wrbrushes
- fix world extents not including external maps
- thanks @DaZombieKiller for pointing this out

Fixes #372
2023-11-18 15:14:38 -07:00
Eric Wasylishen f8d432c861 tests: add empty brush test case 2023-11-18 11:22:18 -07:00
Eric Wasylishen 8888506821 qbsp: fix -notex option 2023-11-09 23:57:07 -07:00
Eric Wasylishen a9838d9fc1 tests: fix build 2023-11-08 00:28:14 -07:00
Eric Wasylishen e9532346c7 vis: partly fix perf regression of Oct 2021
- drops usage of winding_storage_hybrid
- makes pstack_t trivially default initializable again (like the C
  original)
- we weren't making use of the unlimited size of winding_storage_hybrid;
  the original vis already has an allowance for if a winding exceeds
  the fixed stack allocation size (24) and we were still applying that
  limit

before:

cmake-build-release\tests\tests.exe -r=xml -sf=*benchmark.cc
Testing started at 1:53 PM ...

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|               45.15 |       22,149,002.06 |    0.1% |      0.01 | `create pstack_t`
|               47.04 |       21,256,429.80 |    0.1% |      0.01 | `create pstack_t + 1x AllocStackWinding`
|               48.28 |       20,710,594.32 |    0.2% |      0.01 | `create pstack_t + 2x AllocStackWinding`
|              128.52 |        7,780,603.30 |    0.3% |      0.01 | `setup + ClipStackWinding`

Benchmark from: https://www.quaddicted.com/tools/vis_benchmark

cmake-build-release\vis\vis.exe -nostate -nopercent gmsp3v2.bsp

153.31s elapsed

after:

cmake-build-release\tests\tests.exe -r=xml -sf=*benchmark.cc
Testing started at 1:46 PM ...

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|                1.64 |      610,528,630.06 |    0.3% |      0.01 | `create pstack_t`
|                3.29 |      303,895,535.45 |    0.6% |      0.01 | `create pstack_t + 1x AllocStackWinding`
|                5.20 |      192,172,148.84 |    0.2% |      0.01 | `create pstack_t + 2x AllocStackWinding`
|               66.84 |       14,960,818.66 |    1.0% |      0.01 | `setup + ClipStackWinding`

Benchmark from: https://www.quaddicted.com/tools/vis_benchmark

cmake-build-release\vis\vis.exe -nostate -nopercent gmsp3v2.bsp

141.42s elapsed
2023-11-05 13:58:36 -07:00
Eric Wasylishen 7cb6c6553b tests: add ClipStackWinding benchmark, qvec benchmark 2023-11-03 21:27:29 -06:00
Eric Wasylishen 8362ffa385 qbsp: fix memory/.bsp file corruption if map contains a texture name longer than 31 characters 2023-09-24 19:42:42 -06:00
Eric Wasylishen e6d9605b86 light: fix lightgrid assertion failure if lightgrid gets a nan (separate bug) 2023-09-17 20:27:29 -06:00
Eric Wasylishen ec7b848f76 tests: fix issue where stray bsp's in testmaps/ folder cause false test failures
- typically the CI tests read maps from testmaps/foo.map and write to cmake-build-release/tests/foo.bsp.
- having a stray testmaps/foo.bsp would cause the qbsp part of the test to write to cmake-build-release/tests/foo.bsp
- then the "light" part of the test would prefer to read the bad testmaps/foo.bsp instead of the correct cmake-build-release/tests/foo.bsp
2023-09-17 17:03:42 -06:00
Eric Wasylishen 872f5fe8a0 build: copy + install mingw dll's libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll 2023-09-16 14:28:06 -06:00
Eric Wasylishen 20f7a83efa tests: fix bad expectation for q1_sunlight 2023-09-11 22:11:33 -06:00
Eric Wasylishen 507c315f78 light: fix missing textures accidentally activating "suntexture" feature and breaking sunlight
Fixes #376
2023-09-11 21:44:38 -06:00
Eric Wasylishen f8886b6e60 style: remove all "using namespace std" 2023-08-07 15:28:50 -06:00
Eric Wasylishen a02a4ec316 imglib: fix wad3 loading (thanks to erysdren for the fix)
add a basic half-life test case (box map)
2023-07-18 17:57:51 -06:00
Eric Wasylishen 40a10b2c52 bspinfo: serialize missing textures (offset -1) to json as null
previously, we were writing a json dictionary which was confusing

- bspfile: fix reading a valid texture followed by a missing texture
(offset -1)

- add missing texture testcase
2023-07-18 00:17:24 -06:00
Eric Wasylishen f93a36c295 qbsp: don't write 0 size textures
write them as offset -1 in dmiptexlump_t::stream_write()
2023-07-17 23:32:38 -06:00
Eric Wasylishen aa74b76815 common: add qmat::transpose() 2023-07-06 17:13:14 -06:00
Eric Wasylishen 1c85bb882a light: minimize includes 2023-06-26 01:19:54 -06:00
Eric Wasylishen 3cfe9aeb67 build: fix build with PCH disabled 2023-06-25 14:52:01 -06:00
Eric Wasylishen 51def3282c tests: disable currently failing tests 2023-06-19 22:12:43 -06:00
Eric Wasylishen 010fbe5a3b tests: restore "sky gets an optimized lightmap" test
now that it's fixed
2023-06-19 21:59:06 -06:00
Eric Wasylishen 9a4f27a0de light: fix sky emitting light, disable test 2023-06-19 00:39:30 -06:00
Eric Wasylishen 8034215b3a tests: add "minlight doesn't bounce" test 2023-06-10 16:36:17 -06:00