Commit Graph

3621 Commits

Author SHA1 Message Date
Eric Wasylishen fe5ce3765a test: add a few more area-related assertions 2022-12-21 20:56:18 -07:00
Eric Wasylishen 20af42c9aa test_ltface: disable "surface lights minlight" test for now 2022-12-21 01:10:39 -07:00
Eric Wasylishen 8f79f6a972 vis: rename portal_t -> visportal_t
fixes symbol collision causing crashes on macOS
2022-12-21 01:03:03 -07:00
Eric Wasylishen ba155a3bf5 build: avoid msvc-only constructor 2022-12-20 23:51:56 -07:00
Eric Wasylishen 3d0c756b4f light: fix minlight color on surface lights
- extra `* 255` was unnecessary, setting_color already does this
- don't use qvec3b as it was causing colors to wrap around the 0..255 range
2022-12-20 23:44:21 -07:00
Eric Wasylishen 108d299482 test_ltface: test case for minlight surflight 2022-12-20 22:54:22 -07:00
Eric Wasylishen f652af9c7d bsputils: add .lit loader 2022-12-20 22:46:20 -07:00
Eric Wasylishen bf75ae8717 test_ltface: refactor to allow q1 tests as well 2022-12-20 00:19:05 -07:00
Eric Wasylishen 35fe26b7a6 qbsp: fix FindTargetEntity (was breaking hiprotate) 2022-12-19 00:55:20 -07:00
Eric Wasylishen 6ac564c64f build: remove unused subprocess.h dependency 2022-12-19 00:36:04 -07:00
Jonathan d5e29a1c90 add _nofill key, which causes an entity to not count as an entity for the purposes of occupancy (for lights in walls, etc)
add _nonudge key, to disabling nudging of lights "stuck" inside walls
2022-12-15 04:30:22 -05:00
Eric Wasylishen 6451a3f2aa qbsp: fix _mirrorinside 1 on func_detail_fence (q2) 2022-12-15 00:18:22 -07:00
Eric Wasylishen 8caaf7236f test: add q2 test case for alpha mask textures 2022-12-14 23:19:58 -07:00
Eric Wasylishen 82aa1e4396 light: make "_light_alpha 0" behave as expected (invisible to light) 2022-12-14 21:46:36 -07:00
Eric Wasylishen 8ce8b9233b light: _shadow_channel_mask defaults to _light_channel_mask if unset 2022-12-14 18:29:05 -07:00
Eric Wasylishen 513c47406b light: fix surface lights to check channel mask 2022-12-14 00:26:38 -07:00
Eric Wasylishen 287ac96363 light: fix sunlight to check object channel mask 2022-12-14 00:15:23 -07:00
Eric Wasylishen aca9820b03 light: don't bounce light for channel != 1 2022-12-13 23:59:58 -07:00
Eric Wasylishen ff73f13830 light: skip vis culling if lighting channels are used 2022-12-13 23:54:49 -07:00
Eric Wasylishen ccb72a3bf5 light: expand test case for light channels 2022-12-13 23:42:26 -07:00
Eric Wasylishen 00754e588e light: setting an _object_channel_mask implicitly enables shadow casting 2022-12-13 23:37:00 -07:00
Eric Wasylishen ea0ed34506 light: fix light bounds culling breaking channel masking
the bounds are only calculated for mask 1, so only apply bounds culling for lights on channel 1
2022-12-13 23:32:14 -07:00
Eric Wasylishen 8aa49699f8 light: rename channel mask keys
models:
_object_channel_mask

lights:
_light_channel_mask
_shadow_channel_mask
2022-12-13 23:20:27 -07:00
Eric Wasylishen 181d608c7a light: add missing RTC_SCENE_FLAG_CONTEXT_FILTER_FUNCTION now needed
also check channelmask/shadowmask in Embree_FilterFuncN
2022-12-13 20:04:22 -07:00
Eric Wasylishen 92d5c75424 light: experimental light channel mask feature 2022-12-13 19:13:58 -07:00
Eric Wasylishen 8728d982c3 light: remove more dead code 2022-12-13 18:59:35 -07:00
Eric Wasylishen 54e598c5fb light: clean up dead code 2022-12-12 18:02:33 -07:00
Eric Wasylishen 6ebd4eba58 tests: log .bsp copying 2022-12-12 17:58:02 -07:00
Eric Wasylishen 63cac32f88 light: quick experiment with a _light_group feature for lights that only affect linked bmodels 2022-12-11 15:36:08 -07:00
Eric Wasylishen bded0ab344 light: fix negative lights breaking when bounce in use 2022-12-10 15:10:36 -07:00
Eric Wasylishen e7b20733d3 qbsp: write .prt files in text mode for TB compatibility 2022-12-09 22:54:56 -07:00
Eric Wasylishen 24f79d13bb light: recognize _cone as an alias for spotlight cone angle (q2 compat) 2022-12-09 00:59:49 -07:00
Eric Wasylishen a5b83e088b light: work around visblocking opaque liquids causing light artifacts with -visapprox vis
in cases when we actually want light to shine through these surfaces
2022-12-09 00:07:50 -07:00
Eric Wasylishen 924847661c test_ltface: add test for `-visapprox vis` issue with opaque liquids 2022-12-08 21:46:35 -07:00
Eric Wasylishen 331dbfc20d vis: refactor output_group and advanced_group to avoid name clash with light 2022-12-08 21:32:39 -07:00
Eric Wasylishen 2ff9eda020 vis: refactor winding_t -> viswinding_t 2022-12-08 21:29:22 -07:00
Eric Wasylishen 642c4b589c tests: add vis_main() taking std::vector 2022-12-08 21:27:37 -07:00
Eric Wasylishen a70c8f4835 light: fix artifacting with translucent shadows
Embree is allowed to call the filter function more than necessary.
The previous implementation had side effects that would cause
the translucent shadows to get darker in this case.

As a limitation, we're back to only allowing 1 layer of glass per ray.
2022-12-07 00:23:26 -07:00
Eric Wasylishen 3e673d2119 qbsp/light: restore TRANS33/TRANS66 faces casting translucent shadows by default 2022-12-06 23:38:43 -07:00
Jonathan cde7fd2908 add back in `_bouncestyled` in worldspawn; default to true on Q2 mode 2022-12-06 21:23:05 -05:00
Eric Wasylishen 7ce14a376f qbsp/light: make liquids not cast shadows by default
previously opaque Q2 liquids (e.g. lava, opaque water) were casting shadows / dirt
2022-12-06 17:03:39 -07:00
Eric Wasylishen 185d12996b Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp 2022-12-06 15:19:46 -07:00
Eric Wasylishen eae434736a light: support _minlightMottle on worldspawn 2022-12-06 15:18:16 -07:00
Jonathan 15b9a78fd1 fix gate being incorrect
add surflight grouping
fix minlight on color'd _surface lights
2022-12-05 20:35:44 -05:00
Eric Wasylishen 82fff17ac4 docs: document how to install sphinx 2022-12-04 21:04:23 -07:00
Eric Wasylishen e73aa29dd1 light: adjust epsilon to fix q2_light_flush.map test case 2022-12-04 00:10:01 -07:00
Eric Wasylishen 555f07ed61 test_lftace: add a test for an issue of wrapped luxels interacting with surface lights 2022-12-03 14:27:00 -07:00
Eric Wasylishen 41de747a9a qbsp: for "Q2 phong (value set, LIGHT unset) used on a mirrored face." warning, don't set value to 0
- setting value to 0 was not a robust way to disable phong
- it could actually have the reverse effect if "value 1" was
  being used to change a smoothing group, setting value back to 0
  could reintroduce unwanted smoothing
- that hack should be less useful with the phong system improvements
  in the previous commits
2022-12-01 01:23:28 -07:00
Eric Wasylishen f66e4790a4 qbsp/light: add no_phong texinfo flag (currently not used/exposed) 2022-12-01 01:16:17 -07:00
Eric Wasylishen 1065adecc6 qbsp/light: implement _phong_group key, equivalent to Q2 "value" field 2022-12-01 00:25:05 -07:00