Commit Graph

298 Commits

Author SHA1 Message Date
Eric Wasylishen 6f1b4252d2 common: split surfflags_t::native into native_q1 and native_q2 2025-02-01 14:47:50 -07:00
Eric Wasylishen c06dbb0693 tests: add a texture case sensitivity test 2025-01-28 21:42:13 -07:00
Eric Wasylishen 5a94c671a2 tests: fix broken test after img::clear() change 2025-01-24 20:34:51 -07:00
Eric Wasylishen 887ba83151 tests: clear fs, imglib between tests 2025-01-23 23:47:32 -07:00
Eric Wasylishen de1e130e4f tests: better documentation and test for areaportals 2025-01-20 00:16:56 -07:00
Eric Wasylishen b1ee327092 refactor: replace EXPECT_VECTORS_UNOREDERED_EQUAL with gtest matchers 2025-01-19 23:18:28 -07:00
L-P d0788ac01f
Add _hulls property to allow a bmodel to set for which hulls it should have clipnodes (#442)
* Add _hulls bmodel property

Whitelist hulls for which to generate clipnodes.

* Fix _hulls when hull 0 is omitted

Add test

---------

Co-authored-by: Eric Wasylishen <ewasylishen@gmail.com>
2024-12-09 00:06:26 -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 dabae0143f tests: EXPECT_EQ -> ASSERT_EQ 2024-12-07 14:19:27 -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 dfa164ffce qbsp: more func_illusionary_visblocker fixes..
fix illusionary_visblocker covered by func_detail_illusionary
2024-11-23 23:02:26 -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 4e11e3ebe1 qbsp: remove treating __TB_empty as skip 2024-11-23 10:39:30 -07:00
Eric Wasylishen 9d6ce6d83c qbsp: fix func_illusionary_visblocker behaviour
- support liquid brushes (they are converted to mist - so empty contents for Q1)
- force _mirrorinside 1

Fixes #441
2024-11-20 20:19:34 -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 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