Eric Wasylishen
f018b7324d
light: refactor phong shading to use GLM
2017-02-06 22:50:56 -07:00
Eric Wasylishen
7fdb77188c
light: work-in-progress stuff
2017-02-06 21:57:49 -07:00
Eric Wasylishen
cc71ad024f
qbsp: origin brush support
...
light: allow model offset on any brush entity with "origin" key set, not just ones with a "rotate_*" classname
2017-01-24 21:39:03 -07:00
Eric Wasylishen
75193bbe05
light: fix fscanf format warning
...
warning: format ‘%llu’ expects argument of type ‘long long unsigned int*’, but argument 3 has type ‘uint64_t* {aka long unsigned int*}’ [-Wformat=]
int cnt = fscanf(texinfofile, "%llu\n", &extended_texinfo_flags[i]);
2016-11-14 11:48:36 -07:00
Eric Wasylishen
91fcfe5b9a
light: use glass texture colors to tint rays
2016-11-03 02:26:53 -06:00
Eric Wasylishen
731e46d005
light: fix extended texinfo array type
2016-11-02 17:29:18 -06:00
Eric Wasylishen
fbeba25bd1
light: read _mincolor from .texinfo file
2016-11-02 17:23:25 -06:00
Eric Wasylishen
a6468984bf
all: finish c++ification
2016-10-17 19:52:17 -06:00
Eric Wasylishen
ec37b52807
light: disable "denormals are zero", causing build issues on gcc4.8/linux
2016-09-23 00:43:28 -06:00
Eric Wasylishen
46a56df19f
light: add -bouncelightsdebug switch to render bounce lights
2016-09-20 00:04:02 -06:00
Eric Wasylishen
722f753d8d
light: remove some unused vis-testing stuff
2016-09-19 19:21:04 -06:00
Eric Wasylishen
05251d9e1a
light: fix "options summary" log header
2016-09-19 14:46:16 -06:00
Eric Wasylishen
1045505670
light: avoid bouncing negative lights
2016-09-19 12:15:26 -06:00
Eric Wasylishen
b4e30032a3
light: MakeBounceLightsThread: avoid zero-area or small patches, which were getting NaN colors
2016-09-19 12:11:41 -06:00
Eric Wasylishen
857b4402ad
light: change assertions to Q_assert (so they are all enabled in release builds)
2016-09-18 15:41:56 -06:00
Eric Wasylishen
700e8d089f
light: add -verbose option
2016-09-17 23:49:41 -06:00
Eric Wasylishen
bcddaf10dd
docs: update
2016-09-09 13:30:36 -06:00
Eric Wasylishen
eaec325ab4
light: bounce: area-weight the patches when averaging them to get the light to emit for a face
2016-09-08 21:39:37 -06:00
Eric Wasylishen
18797f81c0
light: fix for -dirt not implying -minlight_dirt, -sunlight_dirt, -sunlight2_dirt
2016-09-08 15:21:18 -06:00
Eric Wasylishen
66184a3849
light: CalcualateVertexNormals: skip degenerate faces
2016-09-07 15:12:19 -06:00
Eric Wasylishen
5e9b62dc8b
light: add "testlight" target
2016-08-15 21:18:14 -06:00
Eric Wasylishen
a0f3881698
light: refactor global settings into a class
2016-08-12 18:49:32 -06:00
Eric Wasylishen
28b034a172
light: drop visdata support, no longer needed
2016-08-10 00:49:41 -06:00
Eric Wasylishen
677875a63e
light: cull lights based on estimated visible AABB of each light
2016-08-09 18:16:32 -06:00
Eric Wasylishen
1d4de5c17d
light: add more performance stats
2016-08-09 17:11:08 -06:00
Eric Wasylishen
7d5067bddd
light: Add stats
2016-08-09 01:15:26 -06:00
Eric Wasylishen
486606eb88
light: rename GetSurfaceVertex to Face_VertexAtIndex
2016-08-07 22:57:45 -06:00
Eric Wasylishen
1a0fb22e40
light: move some helper functions to common/bsputils.{h,cc}
2016-08-07 22:55:44 -06:00
Eric Wasylishen
7029ed5713
light: clean headers
2016-08-04 16:32:04 -06:00
Eric Wasylishen
2a3b87bf1f
light: rework bounce lighting for less memory use
2016-08-03 14:00:58 -06:00
Eric Wasylishen
9f0f2cdf83
light: add debug dump for lights
2016-08-01 21:38:14 -06:00
Eric Wasylishen
607706a684
light: fix dangling pointers when a light_t is copied
2016-08-01 21:38:03 -06:00
Eric Wasylishen
b4e0a7a5fa
light: GetLightValue: remove extra param
2016-07-31 18:53:41 -06:00
Eric Wasylishen
fee5669dbf
light: refactor checking if we need to write a litfile
2016-07-31 18:06:44 -06:00
Eric Wasylishen
225a155efd
light: fix unwanted phong on everything
2016-07-29 19:48:28 -06:00
Eric Wasylishen
d7bb75ae97
light: modelinfo: change to storing pointers in std::vector rather than modelinfo_t
2016-07-29 16:01:34 -06:00
Eric Wasylishen
6bb842cd47
light: refactor tracelist and selfshadowlist to be std::vector
2016-07-29 15:56:48 -06:00
Eric Wasylishen
b669767fe0
light: add an assertion for model offsets
2016-07-29 15:51:26 -06:00
Eric Wasylishen
a0d3a90df9
light: fix uninitialized model offset causing messed up lighting on submodels (!)
2016-07-29 13:34:42 -06:00
Eric Wasylishen
c3de3eb99a
light: -dumpface: also print model number
2016-07-29 12:28:15 -06:00
Eric Wasylishen
5b9405a93e
light: move suns to a std::vector
2016-07-27 11:05:54 -06:00
Eric Wasylishen
2651c79307
light: fixes to settings system
2016-07-27 02:20:25 -06:00
Eric Wasylishen
a68979a57b
light: add -nolights option
2016-07-27 02:00:11 -06:00
Eric Wasylishen
6da4ab87ae
light: reorganize settings
2016-07-27 00:49:34 -06:00
Eric Wasylishen
7757e834a3
light: clean up dirtmapping logic
2016-07-26 21:08:04 -06:00
Eric Wasylishen
da64f27015
light: add lockable_bool_t
2016-07-26 20:50:32 -06:00
Eric Wasylishen
fb1288a5c0
light: rename entity_t to light_t
2016-07-26 18:03:43 -06:00
Eric Wasylishen
f729171a44
light: entities: clean out some dead code
2016-07-26 18:01:28 -06:00
Eric Wasylishen
9279c86fb5
light: fix -addmin switch (temporary hack)
2016-07-26 16:09:16 -06:00
Eric Wasylishen
dc8525dfd2
light: entities: refactor EntDict_VectorForKey
2016-07-26 13:12:57 -06:00
Eric Wasylishen
02a2cee6a7
light: store lights in a vector (untested)
2016-07-26 02:13:58 -06:00
Eric Wasylishen
0501f07673
light: clean WorldValueForKey/SetWorldKeyValue
2016-07-24 16:56:40 -06:00
Eric Wasylishen
ca507336ca
light: use entdicts array for FIndModelInfo
2016-07-24 16:08:38 -06:00
Eric Wasylishen
203c32a613
light: misc fixes. lights not casting on world?
2016-07-24 12:55:07 -06:00
Eric Wasylishen
2c350b1f21
light: finish porting modelinfo reading to settings system
2016-07-24 00:31:58 -06:00
Eric Wasylishen
5566e1f85d
light: convert modelinfo_t to use settings system
2016-07-24 00:26:42 -06:00
Eric Wasylishen
cc2bb5158a
light: add class for a dictionary of settings
2016-07-23 22:54:32 -06:00
Eric Wasylishen
0cd0778860
light: fix typo, min_color should have been mincolor
2016-07-23 22:54:17 -06:00
Eric Wasylishen
2e9c58fb46
light: move command-line parsing to use settings system
2016-07-23 21:43:54 -06:00
Eric Wasylishen
df62b9fa16
light: handle worldspawn keys through new settings system
2016-07-23 20:26:09 -06:00
Eric Wasylishen
8b8cc4a37a
light: add transformers for color and mangle
2016-07-22 14:02:43 -06:00
Eric Wasylishen
f7d3bfbeb3
Merge branch 'stable'
2016-07-20 19:12:23 -06:00
Eric Wasylishen
4c59a00d2b
light: add -debugvert command
2016-07-20 19:05:55 -06:00
Eric Wasylishen
26fbffa2bf
light: add GetSurfaceVertex and GetSurfaceVertexPoint to header
2016-07-20 16:15:42 -06:00
Eric Wasylishen
5bf59a469d
light: option parser: allow negative numbers as option args
2016-07-20 16:04:26 -06:00
Eric Wasylishen
d86e6acec6
light: add SetString
2016-07-16 13:11:59 -06:00
Eric Wasylishen
ee50412f65
light: add FindSetting function
2016-07-15 10:44:35 -06:00
Eric Wasylishen
60d96df31c
light: set min/max values for some settings
2016-07-14 00:02:44 -06:00
Eric Wasylishen
08a6733204
light: refactor settings system
2016-07-13 22:55:55 -06:00
Eric Wasylishen
d467888d89
light: register settings in a map
2016-07-13 22:11:21 -06:00
Eric Wasylishen
cd013405e7
light: convert more settings to lockable_*_t
2016-07-13 21:51:04 -06:00
Eric Wasylishen
42657f9607
light: record setting names
2016-07-13 21:33:38 -06:00
Eric Wasylishen
e012a2c93e
light: finish c++ifying
2016-07-06 13:14:06 -06:00
Eric Wasylishen
1c8e7e6585
light: remove use of c99 designated initializers since they're not in c++11
2016-07-06 00:13:30 -06:00
Eric Wasylishen
34bc864616
light: print elapsed time to 3 decimal places
2016-07-04 21:06:34 -06:00
Eric Wasylishen
ec6352a5fe
light: option parser: allow negative numbers as option args
2016-06-30 14:14:59 -06:00
Eric Wasylishen
5054ced22d
light: fix embree support
2016-06-17 21:21:30 -06:00
Eric Wasylishen
7c3aa545bb
light: sunlight refactoring
2016-06-09 00:47:59 -06:00
Eric Wasylishen
aa998d7b7a
light: support sunlight options on command-line
2016-06-09 00:31:52 -06:00
Eric Wasylishen
4e5a7a79b1
light: refactor and make option parsing safer
2016-06-08 23:39:38 -06:00
Eric Wasylishen
f29c8fa0f6
light: clamp bouncecolorscale to [0,1]
2016-06-08 22:57:52 -06:00
Eric Wasylishen
d1c4470fc1
light: add "-novis" to help listing
2016-06-04 22:22:22 -06:00
Eric Wasylishen
ecea00cec2
light: tweaks to usage text
2016-06-01 17:38:30 -06:00
Eric Wasylishen
26fd4b6d28
light: tidy log message
2016-06-01 16:34:35 -06:00
Eric Wasylishen
72e07f82fb
light: print message when visdata in use
2016-06-01 16:04:18 -06:00
Eric Wasylishen
45daf59df7
light: improve usage message. recognize -help flag. show usage when an unknown command given.
2016-06-01 13:55:41 -06:00
Eric Wasylishen
3e8d9b7dfd
light: warn about gate > 1
2016-05-31 18:23:37 -06:00
Eric Wasylishen
826f44d8cf
light: disable "interior verts" spam
2016-05-31 18:19:35 -06:00
Eric Wasylishen
280aadfbd8
light: add -debugface option for debugging CalcPoints
2016-05-30 00:15:07 -06:00
Eric Wasylishen
a63a96e877
light: update usage text
2016-05-27 20:45:44 -06:00
Eric Wasylishen
21a4fd5287
light: allow disabling bounce on command line
2016-05-27 18:47:12 -06:00
Eric Wasylishen
bb19618763
light: add -phong 0 flag to force phong shading to be disabled
2016-05-27 18:18:50 -06:00
Eric Wasylishen
a4445bdd77
light: allow force-disabling dirtmapping at the command line
2016-05-27 17:52:56 -06:00
Eric Wasylishen
af6b4aa375
light: remove useless -no_parse_escape_sequences flag
2016-05-27 15:51:33 -06:00
Eric Wasylishen
b17e345087
light: remove broken -fence feature
2016-05-27 15:50:52 -06:00
Eric Wasylishen
d524b4c3ad
light: fix parsing of command-line argument to -soft and -anglesense, when those are the last params
2016-05-27 15:43:24 -06:00
Eric Wasylishen
30673903ed
light: refactor dirt*SetOnCmdline variables
2016-05-27 15:22:32 -06:00
Eric Wasylishen
ca0f0448fe
light: only allow one debug mode at a time
2016-05-27 12:25:51 -06:00
Eric Wasylishen
e290d844bf
light: only shadow-casting faces generate bounce lights
2016-05-20 13:34:30 -06:00
Eric Wasylishen
11ea23f6f2
light: don't delete litfile for -onlyents compile
2016-05-20 12:20:39 -06:00