Jonathan
b5089ce349
slight speedup by helping embree with alignment
...
merge some light algorithms together
allow changing attenuation on surface lights with _surflight_atten
replace some emplace_back's with push_back to improve compilation times
2024-06-02 19:49:32 -04:00
Jonathan
71aa8aaeea
Paril/mem write ( #412 )
...
* simplify light_surfaces storage
* memory on writes
* Revert "batch together traces on the whole surface - saves a small amount of time"
This reverts commit 72611b7e97 .
# Conflicts:
# light/ltface.cc
* fix a use-after-move
* don't try to write lightmap if it has no styles
* fix issue with alignment
2024-03-13 20:01:05 -06:00
Jonathan
3d419853d3
store leaves on surf instead of surface light
2024-03-09 00:14:03 -05:00
Eric Wasylishen
12b8066246
light: change remaining double -> float
...
tiny perf improvement on base1-test.map with light params:
-emissivequality high
before: 7.4s
after: 6.9s
no visible changes in base1.
2024-02-25 23:42:45 -07:00
Jonathan
9ed4f3d042
bunch of double -> float
...
fix Q2 animated textures
2023-12-07 14:11:46 -05:00
Jonathan
7d881768fa
Revert "Revert "reduce memory usage by only storing VPLs when we need to, and only once""
...
This reverts commit 2e0e23622b .
Disable rescale by default on sky faces.
Light is now in control of rescales' default value.
Multiply omni light faces by 0.5 to better match qrad3
Remove some asserts to increase perf
2023-09-04 02:51:20 -04:00
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
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