Eric Wasylishen
1c85bb882a
light: minimize includes
2023-06-26 01:19:54 -06:00
Eric Wasylishen
fbea58d679
code formatting pass
2023-06-25 18:29:48 -06:00
Jonathan
caa7418375
async threading for map progress, etc. no cancelling yet
2023-06-19 15:38:16 -04:00
Jonathan
08db6e9bf9
remove fastbounce, add emissivequality
...
emissivequality affects both emissives
2023-06-19 09:54:25 -04:00
Jonathan
aeece2a730
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
...
# Conflicts:
# light/ltface.cc
2023-06-19 04:12:11 -04:00
Jonathan
1fbe12767e
decouple lightmapping state from emissive state
...
allow sky to skip lightmapping if lightgrid is enabled in Q2 mode again
2023-06-19 04:11:20 -04:00
Eric Wasylishen
eae883b55c
fix test failures
2023-06-18 23:24:36 -06:00
Jonathan
fcf39b2ef8
reduce memory usage by only storing VPLs when we need to, and only once
...
fix visapprox auto not actually being auto
2023-06-18 13:29:53 -04:00
Jonathan
1e91b21989
use timed file watching, so we only compile any given map once
2023-05-30 12:14:56 -04:00
Jonathan
0ab3aae111
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
...
# Conflicts:
# common/bspfile.cc
2023-05-08 17:47:12 -04:00
Jonathan
1548f25daf
allow individual brush chop control
...
allow passing _surflight_targetname to set targetnames for switchable lights on bmodels
2023-05-08 17:44:32 -04:00
Eric Wasylishen
c9e41ab4db
style: remove GLM_ prefix (no longer using glm)
2023-05-07 21:44:29 -06:00
Eric Wasylishen
18a7df1a1b
style: reformat
2023-05-07 21:44:29 -06:00
Jonathan
39a54abfc6
add support for a region brush (code needs to be cleaned up a bit though)
...
allow _surflight_style on brush models
2023-04-28 13:31:50 -04:00
Jonathan
6035290c70
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
...
# Conflicts:
# include/common/imglib.hh
# light/entities.cc
# light/light.cc
# light/surflight.cc
2023-04-24 02:19:04 -04:00
Jonathan
dddc48e98b
simplify `needs_write` for surfflags
...
add `_surflight_color` key; allows overriding surface light color on an entity basis
load the .wal from wal_json and use the values as a base, if they exist
allow `_surflight_minlight_scale` to be specified on entities
2023-04-24 02:16:39 -04:00
Eric Wasylishen
e069d7b9b8
style: update settings api to follow current coding style
2023-04-16 11:55:38 -06:00
Eric Wasylishen
addc6e922b
tests: add test case for culling of surface lights in the void
2023-04-09 12:39:19 -06:00
Eric Wasylishen
d1e5daedf0
light: fix lighting output change in last commit
...
if the center of a surface light fragment was exactly coplanar with a wall, the last commit would reject it
whereas previously, we would still emit light
2023-04-08 23:43:43 -06:00
Eric Wasylishen
28776464c7
light: MakeSurfaceLight: cull surface light fragments that are in the void
2023-04-08 16:39:09 -06:00
Eric Wasylishen
098ce84d7b
light: fix minor threading bug with `total_surflight_points` stat
...
needs to be protected by mutex
2023-04-08 16:16:44 -06:00
Eric Wasylishen
eda6155844
cleanup: run ./clang-format-all.sh
...
clang-format version 15.0.7
2023-02-18 22:59:43 -07: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
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
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
Eric Wasylishen
2bd2515792
all: cleanup unused includes (Clion - detect not directly used)
2022-10-31 21:37:34 -06:00
Jonathan
3564f6085d
merge surface lighting and bounce code (wip)
2022-08-30 15:46:14 -04:00
Jonathan
26a18d5cc3
add logging::header/funcheader to easily and consistently print function or "active routine" headers
...
add OOP percent_clock wrapper to make printing percents easier, not used yet
2022-08-01 09:35:21 -04:00
Jonathan
3ee28fc416
fix crash in light from bounce lighting storage
...
move bounce lights to a forwardly linked list
fix minlight affecting style 0 for switchables
2022-07-29 00:41:24 -04:00
Jonathan
1d8a0c1df3
clang-format pass
2022-07-28 06:14:54 -04:00
Jonathan
0561766bc9
fix overblown lighting if light color is specified for radiosity
2022-07-22 22:10:22 -04:00
Eric Wasylishen
d32d6ea81d
light: rename options -> light_options
2022-07-10 17:28:28 -06:00
Jonathan
0483db5c55
remove sky visibility stuff; not necessary with the approx methods
...
show sky hits in light points stats
merge surface light stuff (minlight, etc)
default surface lights with radiosity to spotlight, to match Q2
(cherry picked from commit defa4cafce )
2022-07-04 20:47:06 -04:00
Jonathan
0bcd92300a
bounce lighting fix
...
change defaults for Q2 to look a bit closer to how it looked before
(cherry picked from commit b8bb4cdd2a )
2022-07-03 14:21:25 -04:00
Jonathan
f089c5d145
fix bounced lighting
...
(cherry picked from commit 0baa788d7e )
2022-07-03 14:21:25 -04:00
Jonathan
cc16b886a4
move "points" instead of copying
...
pre-offset points
remove double calculation for pos/dir in lightface (didn't seem to have any visual effect on the output)
2022-07-02 08:49:34 -04:00
Jonathan
022676fe63
fix AABB accumulation
2022-07-02 08:49:30 -04:00
Jonathan
feaa15b712
only generate bounds if rays is enabled
...
don't lightmap sky again
2022-07-02 08:49:26 -04:00
Jonathan
90c08ca1da
move bounce lighting into a post-processing operation and split LightFace into Direct and Indirect
2022-06-24 04:33:08 -04:00
Jonathan
c7169e11ee
split LightFace into three distinct phases: Create, Light, and Save
2022-06-24 02:54:41 -04:00
Jonathan
e97ad64bdc
allow a global override to enable radiosity mode on _surface
...
allow Q2-style rads and Q1-style rads to be added together; also mimic the behavior of _surface which loads multiple lights for a single surface
2022-06-21 17:29:26 -04:00
Jonathan
210d994445
cherry pick commit 96cd23761c from @Shpoike
...
Removed legacy switchable lightstyles limit (requires updated engines when exceeded). Added -facestyles argument that allows for >4 styles per face, as well as potentially increasing style indexes to 16bit for far far more switchable styles.
2022-06-21 15:35:39 -04:00
Jonathan
827d382d5a
support color on surflights
2022-06-21 15:07:30 -04:00
Jonathan
72914b4724
moving more raw pointers to vectors/smart pointers
...
support for radiosity _surface lights with `_surface_radiosity` key
allow lightstyles for _surface radiosity lights
bounce enabled by default on Q2
remove ValueForKey, use epairs directly
2022-06-21 13:41:51 -04:00
Jonathan
2b43f2f0c6
slight speed up to compiling surf lights
2022-06-19 12:35:43 -04:00
Jonathan
51f2bc1ff0
fix visapprox rays crashing
...
fix visapprox rays to work with surface lights; it's slower than vis but it at least works now
2022-06-19 12:09:12 -04:00
Jonathan
e366898796
re-introduce vis culling, mainly for Q2/surface lit maps
...
-novisapprox gone; replaced with -visapprox auto|none|vis|rays
2022-06-18 23:56:45 -04:00
Jonathan
41ef66190f
consistency rename; gtexinfo_t -> mtexinfo_t
2022-06-16 09:36:31 -04:00