Jonathan
2e0e23622b
Revert "reduce memory usage by only storing VPLs when we need to, and only once"
...
This reverts commit fcf39b2ef8 .
# Conflicts:
# include/light/light.hh
# include/light/surflight.hh
# light/bounce.cc
# light/light.cc
# light/ltface.cc
# light/surflight.cc
2023-08-26 23:03:25 -04:00
Eric Wasylishen
a2ea5d8217
style: remove all "using namespace polylib"
2023-08-07 15:33:09 -06:00
Eric Wasylishen
f8886b6e60
style: remove all "using namespace std"
2023-08-07 15:28:50 -06:00
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
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
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
Eric Wasylishen
dd6e49c89f
light: support _object_channel_mask on func_group
2023-02-20 00:07:08 -07: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
aca9820b03
light: don't bounce light for channel != 1
2022-12-13 23:59:58 -07:00
Eric Wasylishen
bded0ab344
light: fix negative lights breaking when bounce in use
2022-12-10 15:10:36 -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
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
c99addc41a
fix fastbounce lights being darker on extra2/4
...
use a more dynamic gate for non-fastbounce (slower but allows them to contribute)
2022-08-28 02:25:08 -04:00
Jonathan
928b7f6e16
fix crashes with bounceextra/4
2022-08-24 12:03:05 -04:00
Jonathan
6345d6b616
add support for fast bounce lighting, which is the same as the old code
2022-08-21 22:12:41 -04:00
Jonathan
48c6b7a370
decouple extra and bounce extra; this allows you to still use extra4 but not have to wait like 16x longer for bounce lights to work
2022-08-18 07:35:06 -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
d8fd13d481
use <= gating for brightness for surface and bounce lighting, since these can often be very small values (provides a moderate speed increase as well, counter-balancing the next change)
...
bounce lighting generates a grid of bounces rather than a single light, improving lighting in conditions with larger faces or where the midpoint is blocked by other geometry
2022-07-29 22:26:07 -04:00
Jonathan
ea5e7f5874
fix reported bounce light count
2022-07-29 13:27:31 -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
4e3739c751
use a reader/writer-esque lock (shared_mutex) instead of exclusive-only recursive lock to speed up plane stuff
2022-07-24 19:05:28 -04:00
Jonathan
2357f4e660
remove test print
2022-07-22 23:00:54 -04:00
Jonathan
b6153e3084
use make_unique where appropriate
...
use unordered_map/set where ordering isn't important (faster for searching and smaller footprint)
2022-07-18 20:16:50 -04:00
Jonathan
1aa2a9b250
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
...
# Conflicts:
# qbsp/qbsp.cc
2022-07-11 01:41:10 -04:00
Jonathan
f98dd05f56
new, simpler qbsp3-esque TJunc code;
...
- currently uses naive brute force approach to finding vertices on faces
- simplify 'face fragments', which now only need to contain vertex indices since they are already emitted
2022-07-11 01:40:10 -04:00
Eric Wasylishen
d32d6ea81d
light: rename options -> light_options
2022-07-10 17:28:28 -06:00
Jonathan
4c68ba42d3
simplify sample again
2022-07-10 14:11:17 -04:00
Jonathan
a329c901c6
just use sample difference instead of trying to re-calculate it
2022-07-10 13:47:08 -04:00
Jonathan
2a70cafa32
kinda fix overbrightness? still needs work..
...
allow lmshift force on light
2022-07-10 13:31:38 -04:00
Jonathan
8fc089aa34
fix lmscale with bounce lighting
2022-07-09 23:09:02 -04:00
Jonathan
fa2b67a365
fix blown out maps with extra/extra4 from bounce lighting
...
(cherry picked from commit 6295219a25 )
2022-07-05 20:06:57 -04: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
f089c5d145
fix bounced lighting
...
(cherry picked from commit 0baa788d7e )
2022-07-03 14:21:25 -04:00
Jonathan
5b8fbb660e
fix some weird maps with zero area faces trying to bounce
...
(cherry picked from commit b43e80911e )
2022-07-03 14:21:25 -04:00
Jonathan
9f734ff976
Merge branch 'type-cleanup' into brushbsp
...
# Conflicts:
# common/bspfile.cc
# include/common/bspfile.hh
# light/trace.cc
2022-06-30 05:23:05 -04:00
Jonathan
03ee5c52e8
add an entry point for specifically loading meta-only file formats, like .wal; used for discerning replacements from their source material (since replacements are often larger than the default, we need the scale info)
...
add a new meta format, which is just a JSON representation of the metadata contained in a .wal
simplify texture loading in `light`
fix `light` not handling replacement textures very well
string_iequals take string_view like the others
move averageColor to be alongside pixel data, where it belongs
2022-06-29 12:59:33 -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
4e73d9b196
remove unused struct
2022-06-23 23:45:55 -04:00
Jonathan
12a5c6555c
remove extra line
2022-06-23 23:29:11 -04:00
Jonathan
383843a454
fix missing make_unique
2022-06-22 16:12:20 -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
19fafd9d46
don't add bounce lights that have no color
...
increase bounce scale a bit to match Q2 again
2022-06-03 14:59:06 -04:00
Jonathan
c81e9ace28
remove old threading code entirely
...
add new parallel logging stuff in common/parallel which wraps parallel_for(_each) and provides automatic percentage indicator
fix issue with light not pulling in settings
move logging stuff into its own namespace and simplify
2022-03-01 10:28:59 -05:00