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
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
Eric Wasylishen
d32d6ea81d
light: rename options -> light_options
2022-07-10 17:28:28 -06:00
Jonathan
2a70cafa32
kinda fix overbrightness? still needs work..
...
allow lmshift force on light
2022-07-10 13:31:38 -04:00
Jonathan
865217c655
adjust final output warning
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
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
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
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
033a84cac8
cache anything related to triangle-face info in a single struct that we access per ray
2022-06-25 22:22:24 -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
70d87a52d6
more pointers to vectors
2022-06-23 16:05:11 -04:00
Jonathan
e2c8594450
simplify sample stuff
...
don't clear lightmap if we haven't written to it yet
2022-06-23 01:25:01 -04:00
Jonathan
c6521aa0b6
move aligned allocator to cmdlib
2022-06-23 00:39:28 -04:00
Jonathan
436a9183e7
use aligned allocator for rays
2022-06-22 23:42:38 -04:00
Jonathan
eb50be92f8
use "resize" function to circumvent weird crashing issue
2022-06-22 22:55:05 -04:00
Jonathan
1d221d3999
only use Embree stuff
2022-06-22 22:23:48 -04:00
Jonathan
3f75bb4039
put ExportObj behind an option
2022-06-22 18:13:56 -04:00
Jonathan
cb3ef7b19f
allow radlights to specify an entity dictionary instead (if the input is a .ent, it is an entity dict) which is more flexible
2022-06-22 17:03:00 -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
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
c79e263753
simplify bspx code
...
remove old obj preview for wrnormals
2022-06-20 20:42:34 -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
e57633bbca
the old Safe read/writes are gonedy now
2022-06-16 20:22:03 -04:00
Jonathan
41ef66190f
consistency rename; gtexinfo_t -> mtexinfo_t
2022-06-16 09:36:31 -04:00
Jonathan
17656eff78
don't return string ref, since it can be modified after it's inserted because of the vector growing
2022-06-14 18:34:01 -04:00
Jonathan
78b979d670
Merge branch 'type-cleanup' into brushbsp
...
# Conflicts:
# include/light/entities.hh
# qbsp/brush.cc
# qbsp/map.cc
2022-06-14 17:19:30 -04:00
Jonathan
d24ea4922a
entdict cleanup
2022-06-14 17:18:13 -04:00
Jonathan
b2a0f8039e
remove dm/start/coop checking
...
remove entity target(name) checking; as mods and maps get more complex, this is best left up to the editors to use the FGD to report these things.
2022-06-13 07:10:53 -04:00
Jonathan
812797f7ed
enable lighting for warp/sky in Q2
...
simplify bitflag definitions
change nudging light warning to make more sense
another #define -> constexpr pass
2022-06-10 06:29:14 -04:00
Jonathan
0d56c49d7a
remove hardcoded lightstyles max, use config option
2022-06-10 04:22:12 -04:00
Jonathan
11f937f0ad
add mottling that was used for _minlight on objects in Q2 maps
...
fix _minlight for Q2
set up a few better defaults for Q2
temp-ish fix for areaportals
2022-06-02 01:05:41 -04:00
Jonathan
65852ef042
adjust settings_set to only accept one token per entry
...
radlights is now a set (only loads one though)
2022-06-01 20:42:06 -04:00
Jonathan
e5685b0909
fix "soft"'s special weirdness
2022-05-15 21:27:34 -04:00
Jonathan
8012d46e46
fix this so soft works at the end of the list
2022-05-15 21:24:01 -04:00
Eric Wasylishen
8fe5d9d694
common: adjust formatting of usage line
...
-remove version hash as it's printed above
-rename `usage` variable to `programDescription`
2022-05-15 17:44:17 -06:00
Eric Wasylishen
e9abb212bb
settings: allow setting_enum to parse numeric representation of enums
...
use it for light forumla. disallow enums in setting_numeric.
2022-05-10 22:55:41 -06:00
Eric Wasylishen
abc799554d
build: fix all clang-cl warnings
2022-05-10 21:57:17 -06:00
Eric Wasylishen
d763b2e336
build: support clang-cl
2022-05-10 21:39:58 -06:00
Eric Wasylishen
4042f1c7b9
light: fix compile after previous change
2022-05-09 23:27:33 -06:00
Jonathan
cc0e1a5561
move Face_IsLightmapped to light
...
Fix q2rtx, needs to include lightstyle for nodraw for emissive invisibles with lightstyles
fix wal (for the 900th time)
auto-set -nolighting for -q2rtx
2022-04-30 23:27:21 -04:00
Jonathan
1b852e3a20
fix WINDOW issue
...
surflight_subdivide minimum 1.0, to allow for people breaking their computers
2022-04-30 22:26:08 -04:00