Eric Wasylishen
f8886b6e60
style: remove all "using namespace std"
2023-08-07 15:28:50 -06:00
Eric Wasylishen
db42b2116a
use std::abs in remaining places that were using C abs()
2023-08-07 15:23:12 -06:00
Eric Wasylishen
7691706bda
build: only use <fmt/core.h>, other headers have a heavy compilation time impact
2023-07-02 17:08:14 -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
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
94357818f9
experiment with keeping sample data all together in memory, which might help caching. not certain.
2023-06-18 14:06:58 -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
1c6a76e1f8
light: autominlight extensions
...
- now apply per-luxel, not just to faces that are fully occluded
- add "_autominlight_target" key for specifying a target
to take the light sample from
- add "_autominlight" key: 0 = force off, default = apply to occluded luxels, 1 = apply to all luxels
wip / subject to change!
2023-06-16 00:14:27 -06:00
Jonathan
0c8c10f553
post-process phase, so minlight doesn't affect emissives
2023-06-10 14:20:53 -04:00
Eric Wasylishen
502a490e5b
light: hack around surface lights getting a black spot when a luxel lines up with a surflight emission point
2023-06-06 22:29:51 -06:00
Eric Wasylishen
17bea71bbe
light: experiment with alt lightgrid formula
...
take brightest side of cube, rather than averaging all 6 sides of cube
2023-05-22 20:41:11 -06:00
Eric Wasylishen
356e5ab963
build: fix build (avoid std::identity)
2023-05-11 00:37:35 -06:00
Eric Wasylishen
895a28584c
light: experimental autominlight for solid black sides of doors
2023-05-11 00:17:47 -06:00
Eric Wasylishen
290af832af
style: rename dirt related member variables to match the actual names
2023-05-08 23:02:59 -06:00
Eric Wasylishen
a73075234e
light: fix inheriting worldspawn _minlight_color by bmodels
2023-05-08 00:24:53 -06:00
Eric Wasylishen
c9e41ab4db
style: remove GLM_ prefix (no longer using glm)
2023-05-07 21:44:29 -06:00
Eric Wasylishen
3e446e6ea6
qbsp, light: fix inheriting minlight from worldspawn
...
Update q2_light_group.map to support this
2023-05-07 21:44:29 -06:00
Eric Wasylishen
5f7e08d0ef
light: CalcPoints: fix check for luxels being too far from the face to be visible
2023-04-29 19:52:31 -06: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
c2a787f6a3
light: add missing model offset for luxel occlusion check against bmodels with origin brush
2023-04-08 12:37:44 -06:00
Jonathan
5daaeee6fb
allow `surflight_minlight_scale` to be specified per brush
2023-03-26 18:29:37 -04:00
Eric Wasylishen
f0749450d3
light: support -extra for lightgrid
2023-03-04 11:05:50 -07:00
Eric Wasylishen
b17633f746
cleanup: set PackConstructorInitializers: Never
2023-02-20 10:23:59 -07:00
Eric Wasylishen
f8b189c527
light: fix sample occlusion / object channel mask interaction
2023-02-20 01:03:12 -07: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
8516bfb5e2
light: skip lightmapping sky faces if lightgrid is in use
2023-02-17 17:41:49 -07:00
Eric Wasylishen
8cc7b0e3f3
light: add test for sky getting an optimized lightmap
2023-02-17 00:24:08 -07:00
Eric Wasylishen
641fb780ac
light: allow customizing _world_units_per_luxel on func_group etc.
2023-02-17 00:07:43 -07:00
Eric Wasylishen
051cc29afb
light: add operator== for lightgrid_samples_t
2023-02-10 00:29:14 -07:00
Eric Wasylishen
13fcc75bac
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2023-02-06 22:04:34 -07:00
Eric Wasylishen
1eda091542
light: LightPoint_SurfaceLight: use pvs
2023-02-06 22:03:03 -07:00
Eric Wasylishen
5f31141ac1
Revert "light: hack for sky + LIGHTGRID lump"
...
This reverts commit af2e8ae404 .
2023-02-06 19:07:45 -07:00
Jonathan
5cd2a334f6
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2023-02-06 17:08:00 -05:00
Jonathan
11e2c02757
use 512 units per luxel for sky faces (not fully finished/working yet; they still get affected by dirt)
2023-02-06 17:07:46 -05:00
Eric Wasylishen
af2e8ae404
light: hack for sky + LIGHTGRID lump
...
just sample the sunlight omnidirectionally
2023-02-05 23:09:05 -07:00
Eric Wasylishen
74f149627a
light: finish implementing lightgrid_samples_t::add() to use lowest brightness slot
2023-02-05 21:52:25 -07:00
Eric Wasylishen
2ad437b9e5
light: remove debug spam
2023-02-05 21:46:03 -07:00
Eric Wasylishen
2cc513848b
light: write styles into the experimental lightgrid lump
2023-02-05 17:16:57 -07:00
Eric Wasylishen
ffdca9b1a4
light: fix GetSurfaceLighting returning negative values
2023-02-04 02:10:32 -07:00
Eric Wasylishen
cc8a50631d
light: lightgrid,: try averaging incoming light from 6 directions on a cube
2023-02-04 01:02:28 -07:00
Eric Wasylishen
fb17ee1218
light: add a LightFace_ScaleAndClamp equivalent for the lightgrid
2023-02-03 23:56:46 -07:00
Eric Wasylishen
999806f150
light: experimenting with generating a lightgrid
...
currently a hardcoded 64^3 grid in a LIGHTGRID bspx lump
non-finalized, likely going to change the lump
2023-02-03 01:17:52 -07:00
Eric Wasylishen
13481438e7
light: use DecompressAllVis() for getting visdata
2023-01-30 19:57:20 -07:00
Eric Wasylishen
8f49cf3894
refactor: Mod_Q1BSP_DecompressVis -> DecompressVis
2023-01-30 19:56:40 -07:00
Eric Wasylishen
e490eb3ade
refactor: move Mod_Q1BSP_DecompressVis to bsputils.cc
2023-01-30 19:56:34 -07:00
Eric Wasylishen
d2db75ee81
light: Mod_Q1BSP_DecompressVis: port safety check from DecompressRow
2023-01-30 19:56:24 -07:00