Jonathan
426668701e
clip_back/clip_front to match ChopWindingInPlace
...
simplify constructors for winding heap
use std::vector again for mapentity_t since it's being copied because of the std::list
2022-08-08 21:08:27 -04:00
Jonathan
335db1c0e4
move map_source_location to parser as parser_source_location since the locations actually come from there rather than from the map; now the parser keeps track of the location, so it's a bit easier to follow
2022-08-05 23:17:15 -04:00
Jonathan
24168c8e40
clang pass
2022-08-02 21:57:33 -04:00
Eric Wasylishen
52dff47a86
fix linux build
2022-08-01 12:47:20 -06: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
d1c3b56e1d
don't jitter sun entities
2022-07-31 09:15:51 -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
91124d296f
fix mismatch in surface lighting cull calculation
2022-07-29 21:29:04 -04:00
Jonathan
ea5e7f5874
fix reported bounce light count
2022-07-29 13:27:31 -04:00
Jonathan
85f25bbc78
Q2-specific fix; -1 lightmaps are always fullbright, which can cause actual full-dark areas to be full bright by mistake
2022-07-29 10:40:02 -04:00
Jonathan
14ac139cce
fix race condition; map operator[] modifies if it doesn't exist
2022-07-29 09:42:11 -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
d9a9046e46
fix some foot-guns with qbsp_plane_t - type is auto-set now
2022-07-28 05:51:55 -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
0561766bc9
fix overblown lighting if light color is specified for radiosity
2022-07-22 22:10:22 -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
da9546e260
change settings semantics to be simpler and more clear:
...
- no more "isLocked" - use getSource directly (locked is a confusing name)
- no more split parse/setValue functions. there's only one entry point each now, and all they do is pass along the source passed to it from its parser.
- no separate setters, use setValue(value, source)
- add a "game target" source, which is low priority and indicates to the user that the value would have been default but was changed to a better value for the game target
2022-07-14 09:03:59 -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
Eric Wasylishen
050886f32c
tests: unify tests under one target
...
to ease sharing code. vis/light tests are going to need the testqbsp infrastructure.
2022-07-10 16:36:15 -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
773d20052c
write out style numbers to verbose
2022-07-09 01:36:26 -04:00
Jonathan
865217c655
adjust final output warning
2022-07-09 01:36:26 -04:00
Jonathan
30bd8467c3
fix wrong boolean used for warning
2022-07-09 01:36:26 -04:00
Jonathan
0e4066f312
fix LMSTYLE containing 16-bit values sometimes
2022-07-09 01:36:26 -04:00
Jonathan
56e1e2dde0
adjust lightstyle overrun warnings to be less annoying
...
fix potential overrun in lightstyle writing
2022-07-09 01:36:26 -04:00
Jonathan
7f64c9dfeb
simplify saving
2022-07-09 01:36:25 -04:00
Jonathan
88905d4a69
secondary fix to lmstyle code
2022-07-09 01:36:25 -04:00
Jonathan
b1a30496c3
fix bspx_lightmap not getting output by bspinfo
...
fix LMSTYLE getting output when there's no need for it from -novanilla
2022-07-09 01:36:25 -04:00
Jonathan
adc54dac61
fix bug with output of lmstyle/lmoffset lumps
...
bspinfo will output proper atlasses now
use faceextents_t everywhere
2022-07-08 02:06:07 -04:00
Jonathan
43c5e942b2
move faceextents_t & friends to common
...
use stb_image_write for PNGs for better compression on bsp.json
add in code for spitting out a lightmap from a face. doesn't support other styles and such yet.
2022-07-08 02:06:06 -04:00
Jonathan
705ab73169
rename light option `lmscale` to `lightmap_scale` to reflect its qbsp usage (a forced replacement of the "default" lightmap scale)
...
allow qbsp to be passed an `-lmscale` to facilitate a global lmscale change for BSPX
fix code paths for writing both lightmap sizes out
# Conflicts:
# include/qbsp/qbsp.hh
2022-07-08 02:06:06 -04:00
Jonathan
14455e97e6
fix for Q2 phong values not applying properly
...
(cherry picked from commit 0d76e62846 )
2022-07-06 19:33:07 -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
f4854ddb20
simplify minlight stuff
...
adjust scalar for surface lights so they are visible without bounce
2022-07-04 22:43:07 -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
a0d81372d1
improved path detection (and overriding) routines
...
(cherry picked from commit 32f33fb4b3 )
2022-07-03 18:23:40 -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
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
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
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