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
Eric Wasylishen
9fa9124404
light: redesign Q2 phong check
...
- always do angle check
- always do gamedef specific exclusions (e.g. warping surfflags don't phong with non-warping)
- if Q2 style phong is requested, but Q1 is not in use, use the default phong angle
- always do smoothing group ID check (preparation for supporting this in Q1 mode via a key)
2022-11-30 23:24:51 -07:00
Eric Wasylishen
96bdf141bb
light: block phong if certain surfflag bits differ between the two faces
...
this prevents liquids from phonging with solids
2022-11-30 22:15:58 -07:00
Eric Wasylishen
ab78b43c52
decompile: BuildInitialBrush_Q2: prefer earlier brush sides
...
fixes issue with bevels sometimes being used to texture faces,
which have randomly wrong texture projections
2022-11-26 19:34:25 -07:00
Jonathan
62409458c6
remove some stuff that makes decompiling maps more annoying to build
2022-11-26 19:12:48 -05:00
Jonathan
96e88cfab1
allow a .map to be updated with a .ent file as input using replace-entities
2022-11-25 04:51:00 -05:00
Eric Wasylishen
f7370db0be
decompile: avoid generating three points from micro-faces
2022-11-25 01:05:41 -07:00
Eric Wasylishen
8b82460201
decompile: output source brush number
2022-11-25 00:32:31 -07:00
Eric Wasylishen
743e177694
decompile: BuildInitialBrush_Q2: fix handling of redundant planes
2022-11-25 00:32:18 -07:00
Eric Wasylishen
abb92d4b0f
qbsp: fix crash when using -omitdetail and an all-detail bmodel
2022-11-21 01:13:31 -07:00
Eric Wasylishen
04adb17b1b
qbsp: fix -nodetail in q2 mode
2022-11-21 00:10:26 -07:00
Eric Wasylishen
12d82db8b1
qbsp: implement -omitdetail for q2
2022-11-20 23:58:30 -07:00
Eric Wasylishen
5d3fab75b6
light: allow .wal_json metadata to contain "light": [ r, g, b ] to override emissive color
...
Use this to fix the "emissive lights" test case so it can run on CI without any texture data
2022-11-20 23:01:05 -07:00
Eric Wasylishen
efac0c5a31
qbsp: make -noallowupgrade also disallow the extended-limits (int16_t -> uint16_t) subformats
2022-11-20 12:13:06 -07:00
Eric Wasylishen
047973a30a
test_ltface: "emissive lights": disable test until we have a fix for needing real texture data
2022-11-19 19:37:42 -07:00
Eric Wasylishen
c84d7a687e
test_ltface: fix differing behaviour locally and on CI
2022-11-19 19:36:49 -07:00
Eric Wasylishen
37ced86cec
tests: fix light settings not clearing across tests
2022-11-19 19:02:55 -07:00
Eric Wasylishen
91a0c8e86a
test_ltface.cc: add assertions to catch command line options leaking
...
across tests
2022-11-19 18:41:46 -07:00
Eric Wasylishen
f3b3a4de2f
ci: make sure to fail CI if asan detects errors, but don't run leak checks for now
...
previous setting was causing CI to pass even with asan errors
2022-11-19 16:09:52 -07:00
Eric Wasylishen
0c4aab737d
light: fix angled emissive surfaces not shining on adjacent faces
2022-11-19 14:57:56 -07:00
Eric Wasylishen
c9111b2a6c
Merge pull request #337 from TTimo/colorcodes
...
Enable support for ANSI color codes on Windows 10 and newer, without …
2022-11-19 09:10:24 -08:00
Eric Wasylishen
9ab4ea8176
Move SetConsoleMode() call to logging::preinitialize(); helper
...
Don't do ENABLE_VIRTUAL_TERMINAL_INPUT as it breaks arrow key history
navigation in Windows Terminal after running one of the ericw-tools exe's.
2022-11-19 10:05:14 -07:00
Eric Wasylishen
9c3a807391
qbsp: warn and disable q2-style phong if used on a mirrored face
2022-11-17 23:51:00 -07:00
Jonathan
328fa6ade6
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-11-17 13:55:37 -05:00
Jonathan
670347e64e
fix infinite loop if map has uppercase animated textures
2022-11-17 13:55:31 -05:00
Eric Wasylishen
4c218f5e91
common: factor out LMSCALE_DEFAULT = 16.0;
2022-11-15 23:52:34 -07:00
ttimo
fb459253fe
Enable support for ANSI color codes on Windows 10 and newer, without needing to enable system wide. Good for CreateProcess CREATE_NEW_CONSOLE situations.
2022-11-15 11:09:19 -06:00