Commit Graph

282 Commits

Author SHA1 Message Date
Eric Wasylishen 27c40b6255 tests: add q2_mist_aux_implicitly_detail.map test 2024-11-18 19:54:07 -07:00
Eric Wasylishen 3d7916e966 qbsp: fix -notex 2024-11-03 23:37:31 -07:00
Eric Wasylishen c5bc920b4a qbsp: fix bmodel bounds if clip brushes are used
Previously only a special case was handled (all clip).

Fixes #438
2024-10-01 23:13:51 -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
Eric Wasylishen 7389adfa38 tests: update test expectation for last commit 2024-08-05 17:12:05 -06: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 0b2395dacd bsputil: fix --extract-entities and --extract-textures command line parsing
Fixes #435
2024-08-04 12:09:12 -06:00
Eric Wasylishen 2354209fea tests: rename test,cc > test_settings.cc 2024-08-04 11:46:27 -06:00
Eric Wasylishen 5b06cde21c tests: add a few more settings tests (parse remainder) 2024-08-04 11:43:33 -06:00
Eric Wasylishen adeb3e81aa light: fix _surflight_group 2024-07-25 22:45:18 -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 263dd5faa1 tests: check that we're not outputting >64 sided faces in Q1 mode 2024-07-05 21:54:33 -06:00
Eric Wasylishen 04604b18cd
tests: replace doctest with googletest (#431)
* tests: replace doctest with googletest

- googletest command-line output lists a nice summary of failed tests at the end, doctest's doesn't
- string test case names in doctest make IDE file structure view useless
- googletest has VS support
- doctest development stalled

other changes:
- get rid of doctest::skip(), all tests run now.
(was only applied to 3 tests: "winding", "mountain", "base1")

* check for test failure

* Revert "check for test failure"

This reverts commit a71d020c5a.

* fix test names to comply with gtest rules
2024-06-23 21:31:02 -06:00
Eric Wasylishen e44d73a05b tests: failing test for noclipfaces choosing to use a nodraw face
which ends up defeating the point of _noclipfaces 1
2024-06-01 12:03:53 -06:00
Eric Wasylishen cba902facd add test case for portal_can_see_through fix 2024-05-30 22:44:19 -06: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 e61630d4d9 qbsp: q2: adding structrual solid to a leaf now only clears detail bit, not other bits
fixes #420
2024-04-24 23:46:40 -06: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 28190f5065 light: warn rather than fatal error on invalid "delay" settings 2024-04-01 12:02:39 -06:00
Eric Wasylishen 75e062bbb4 tests: add test for RTC_SCENE_FLAG_ROBUST
tests for same issue as:
https://github.com/ericwa/ericw-tools/issues/269#issuecomment-2027921279
2024-03-30 22:57:38 -06:00
Eric Wasylishen 992b6f0064 light: fix "mangle" on _sun 1 entities
Fixes #266
2024-03-30 11:41:12 -06:00
Eric Wasylishen 3d68b12473 light: never write .lit/.lux in Q2 mode
fixes `-dirtdebug` broken in lightpreview
2024-03-16 15:07:18 -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 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
Eric Wasylishen 3fba6a6564 tests: add test for current behaviour of unknown q2 content/surface flags 2024-03-08 21:03:53 -07:00
Eric Wasylishen f9b374c6f7 tests: allow color values to be off by 1/255 2024-02-26 00:09:44 -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 ba5ad539b8 light: q2: opaque lit liquids receive light from both sides by default 2024-02-15 23:51:28 -07:00
Eric Wasylishen b12894de64 qbsp: fix "sides not found" warning spam in Q1 maps with sky
fixes #366
2024-02-11 18:48:34 -07:00
Eric Wasylishen 3a80e5ad1a tests: add -verbose flag 2024-02-11 16:38:57 -07:00
Eric Wasylishen 765d95e189 qbsp: q1: make liquids detail when -transwater is in use (i.e. by default)
Fixes #353
Fixes #244
2024-02-10 21:08:29 -07:00
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