Eric Wasylishen
6b707b6d5a
light: use DecompressAllVis() for getting visdata
2023-01-09 00:43:49 -07:00
Eric Wasylishen
512ad03153
refactor: Mod_Q1BSP_DecompressVis -> DecompressVis
2023-01-08 20:43:53 -07:00
Eric Wasylishen
52fcb7a234
refactor: move Mod_Q1BSP_DecompressVis to bsputils.cc
2023-01-08 20:43:53 -07:00
Eric Wasylishen
2b8f8c826d
light: Mod_Q1BSP_DecompressVis: port safety check from DecompressRow
2023-01-08 20:43:53 -07:00
Eric Wasylishen
6697beb607
fix _cone default in q2 maps
2023-01-08 20:01:34 -07:00
Eric Wasylishen
91c678254a
light: tweaks to _cone support in q2
2023-01-08 19:57:25 -07:00
Jonathan
df5f894726
fix _cone in Q2
2023-01-08 20:03:06 -05:00
Eric Wasylishen
a9a11159f4
light: add _surface_minlight_scale light key
...
for tweaking minlight given to faces matching surface light templates.
minlight = _surface_minlight_scale * light
lower default from 64 to 1 in q1 mode
2022-12-30 23:06:28 -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
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
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
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
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
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
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
Jonathan
cde7fd2908
add back in `_bouncestyled` in worldspawn; default to true on Q2 mode
2022-12-06 21:23:05 -05: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
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
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
37ced86cec
tests: fix light settings not clearing across tests
2022-11-19 19:02:55 -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
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
Eric Wasylishen
eb3dfe7952
ltface: use bilinear interpolation in WriteSingleLightmap_FromDecoupled
2022-11-15 00:50:11 -07:00
Eric Wasylishen
46d460277a
ltface: support -world_units_per_luxel without -novanilla
...
first pass implementation - quality of vanilla LM is bad, due to nearest sampling
the decoupled lightmap
2022-11-14 23:58:31 -07:00
Eric Wasylishen
c6b19fe6da
light: implement -novanilla with -world_units_per_luxel
...
currently it's required because the non-novanilla path
isn't yet implemented
2022-11-14 00:30:37 -07:00
Eric Wasylishen
99e5f15d42
Revert "ci: use older embree/tbb which support Win8.1"
...
This reverts commit 50c4709d31 .
2022-11-13 16:52:14 -07:00
Eric Wasylishen
50c4709d31
ci: use older embree/tbb which support Win8.1
2022-11-13 15:54:30 -07:00
Eric Wasylishen
d7acd046c3
light/qbsp: add _surflight_rescale key
2022-11-12 17:07:02 -07:00
Eric Wasylishen
a5125583fa
light: clear global data so light can run multiple times per process
2022-11-11 16:52:07 -07:00