Kevin Shanahan
462792e03b
qbsp: rename node member valid->fillmark
...
This is not a yes/no flag it's an integer mark to see if we have visited
the node within the same fill pass.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-06 08:45:47 +10:30
Kevin Shanahan
d65dc77ac7
qbsp: lift the hullnum check out of MarkLeakTrail
...
Makes it kind of obvious now that there is a bug here - if we have a small
leak in hull 0 or 1 which is sealed in hull 2 (due to brush expansion), then
we won't get a leak trail!
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-05 16:01:25 +10:30
Kevin Shanahan
75ef5aa9d8
qbsp: trivial rename of local ent variables to entity
...
Somewhat self indulgent, but this reads easier to me now.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-05 15:34:52 +10:30
Kevin Shanahan
926cf8eb95
qbsp: return first face number from MakeFaceEdges and pass to ExportDrawNodes
...
Removes another global variable.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-05 15:17:40 +10:30
Kevin Shanahan
26c2789d7e
qbsp: make planemap local to ExportNodePlanes{,_r}
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-05 15:11:31 +10:30
Kevin Shanahan
6dd0fbd085
qbsp: misc local variable naming changes for writebsp.c
...
Shouldn't be any functional changes to the code.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-05 14:54:04 +10:30
Kevin Shanahan
fe89facbd0
qbsp: rename face->texturenum to texinfo
...
Since it is an index into the global texinfo, not miptex.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-05 14:34:02 +10:30
Kevin Shanahan
617764bbf0
qbsp: add note about skip support to changelog
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-05 14:18:13 +10:30
Kevin Shanahan
d289742f1e
trivial: remove not-very-helpful comment from surfaces.c
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-05 14:15:39 +10:30
Kevin Shanahan
7ca00ded1f
qbsp: don't bother subdiving skip surfaces
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-05 14:15:03 +10:30
Kevin Shanahan
1432d99049
qbsp: cleanup texinfo flags before writing bsp
...
The TEX_SKIP flag isn't needed and although it *shouldn't* upset any
engines, better to not write it out at all.
Well, even better to not write anything about the skip texture to the BSP
file, but need to re-organise things a bit more before that can happen.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-05 14:13:23 +10:30
Kevin Shanahan
38722f9eab
qbsp: don't output skip surfaces in the bsp file
...
* Don't create edges in MakeFaceEdges
* Don't output faces in GrowNodeRegions
* Don't output marksurfaces in CountLeaves/ExportLeaf
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-05 14:00:23 +10:30
Kevin Shanahan
a37ee84d17
qbsp: don't worry about preserving alignment of skip textures
...
And potentially save some texinfos.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-05 13:55:37 +10:30
Kevin Shanahan
b1144517b5
qbsp: don't worry about splitting skip faces when selecting split planes
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-05 13:34:53 +10:30
Kevin Shanahan
8e4c6e65ac
qbsp: output detail brush count only if non-zero
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-05 13:32:38 +10:30
Kevin Shanahan
4ff4acb8c5
qbsp: create a skip flag for SKIP textures
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-05 12:01:15 +10:30
Kevin Shanahan
3426e7e8c2
qbsp: add func_group support
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-04 21:18:55 +10:30
Kevin Shanahan
4063d8aade
light: implement the _softangle key for spotlights
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-03 21:37:21 +10:30
Kevin Shanahan
fec6d64bf1
light: be more consistent with lightmap/colormap variable names
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-03 20:14:09 +10:30
Kevin Shanahan
0420f83ab9
light: rename scaledLight -> GetLightValue
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-03 13:51:33 +10:30
Kevin Shanahan
fc90cfdff4
light: use fadedist instead of scaledDistance()
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-03 13:46:31 +10:30
Kevin Shanahan
45057df2ad
light: update the documentation of coloured lighting cmdline options
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-03 13:42:06 +10:30
Kevin Shanahan
a8d8150791
light: implement the -gate option
...
Precalculate the distance at which lights will fade to zero brightness.
For lights with inverse falloff, use the gate value to determine the
cut-off distance. Use this value to cull samples and avoid the ray
tracing overhead.
Hopefully not too controversially, I am going to default this to "on" with
a gate value of 0.001. Unless you have > 1000 lights contributing
fractional light values across your map, this is not going to make any
visible difference.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-03 13:36:52 +10:30
Kevin Shanahan
8b1a501087
light: trivial tidy up
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-03 13:26:28 +10:30
Kevin Shanahan
f5e7e594e4
light: remove redundant ray trace in SingleLightFace
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-03 13:05:11 +10:30
Kevin Shanahan
4879c7e874
light: use TestLine instead of CastRay for LOS test
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-03 13:00:22 +10:30
Kevin Shanahan
888494f0c1
light: test spotlight cone before ray tracing
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-03 12:56:10 +10:30
Kevin Shanahan
bea0f0f983
light: bsp_origin is just zero, don't need rel vector
...
May as well keep dist as the actual distance and just call ScaledDistance
twice (poor function name, btw - it's effectively the equivalent of the
"fade gate" stuff)
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-03 12:50:01 +10:30
Kevin Shanahan
310e28e12a
light: use uintptr_t for aligning light data in memory
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-03 12:32:32 +10:30
Kevin Shanahan
f075de2fb5
light: re-organise lightinfo_t structure
...
Rename member lightmapcolors -> colormaps
Remove unused member surfnum
Re-order things so the data lumps are together at the end.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-02 13:39:03 +10:30
Kevin Shanahan
052805c4ca
light: fix race in allocation of white/coloured lightmap data
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-02 12:18:54 +10:30
Kevin Shanahan
9b470d126b
light: make targetent pointer const
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-02 12:17:57 +10:30
Kevin Shanahan
bf6a5e2bfa
qbsp: comment possible csg optimisation for later testing
...
Not really the performance hot spot right now though.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-02 11:41:22 +10:30
Kevin Shanahan
4cbbb44a23
light: minor tidy up of spot falloff check in SingleLightFace
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-02 11:30:49 +10:30
Kevin Shanahan
c0ebc18d96
light: constify surf pointer in LightSingleFace
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-02 11:29:39 +10:30
Kevin Shanahan
453fd7fe31
light: better variable names in WriteLitFile
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-02 11:27:47 +10:30
Kevin Shanahan
b746947595
light: use VecStr convenience function for log messages
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-02 11:27:10 +10:30
Kevin Shanahan
625fc2c61b
common: add VecStr convenience function
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-02 11:25:40 +10:30
Kevin Shanahan
a1e0f192c7
light: fix use of incorrect color for !nominlimit case
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-01 22:03:36 +10:30
Kevin Shanahan
c458099ec7
light: implement the 4x4 oversampling option
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-01 17:26:44 +10:30
Kevin Shanahan
57a161afa2
light: place oversample points correctly around original
...
Looks like the original code biased these to one side, but the
oversampling will be more accurate if we evenly distribute the points
around the actual lightmap point.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-01 12:42:57 +10:30
Kevin Shanahan
ad129c59da
light: rename sunmangle variable as sunvec
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-01 11:58:50 +10:30
Kevin Shanahan
f07007f8ad
light: setup spotlight paramters once at load time
...
We were calculating these values for every light and for every surface,
which seems a little excessive... Also made the variable names a bit more
sensible - we had stored a direction vector, not the actual mangle values.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-01 11:50:57 +10:30
Kevin Shanahan
580b2912fb
light: don't let negative lights on a new style count as a hit
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-01 10:58:11 +10:30
Kevin Shanahan
a3ac989224
light: trivial VectorMA substituion
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-01 10:56:19 +10:30
Kevin Shanahan
a8621afa55
changelog: catch up missed entries since v0.5
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-01 10:19:03 +10:30
Kevin Shanahan
8ce739fe3f
light: remove bsp30 support and automatically generate .lit when needed
...
Check whether any of the entities have colored fields set and if so,
enable colored light output. Can still be overridden from the command line
if needed.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-01 10:07:53 +10:30
Kevin Shanahan
65b38c4952
build: add simple target for building OS X fat binaries
...
The "fatbin2" target isn't working yet since I don't have the right cross
compiler set up, but once I do then adding CC=foo to the $(MAKE) command
should be all that is needed.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-01 09:20:34 +10:30
Kevin Shanahan
e0eabb1095
build: use the correct build dir variable for qbsp objects
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-01 09:19:42 +10:30
Kevin Shanahan
49e5d76273
build: add LDFLAGS from environment when linking
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-01 09:19:16 +10:30