Eric Wasylishen
b54f893942
common: add GLM_InterpolateNormal
2017-02-11 11:02:37 -07:00
Eric Wasylishen
8ed7544063
light: fix up barycentric coords code, add tests
2017-02-11 11:02:28 -07:00
Eric Wasylishen
9aae46bd1c
light: adjust Light_PointInSolid to take a model param
2017-02-10 15:54:07 -07:00
Eric Wasylishen
1f40e3a58f
light: extra field for contrib faces
2017-02-10 15:52:12 -07:00
Eric Wasylishen
a9f99076fd
common: add GLM_ClosestPointOnPolyBoundary
2017-02-10 15:52:12 -07:00
Eric Wasylishen
87868275de
light: clean CalcPoints
2017-02-10 15:52:12 -07:00
Eric Wasylishen
71a3dd769a
light: clean up LightFace() function
2017-02-10 15:52:12 -07:00
Eric Wasylishen
d30c970d8b
light: always call MakeEdgeToFaceMap
2017-02-10 15:52:12 -07:00
Eric Wasylishen
b9d0de0ec8
light: expose some stuff in the light2 header
2017-02-10 15:52:12 -07:00
seth
10df0bf88e
Merge remote-tracking branch 'upstream/master'
2017-02-10 16:53:17 -05:00
Eric Wasylishen
8acbea291c
light: remove unused struct
2017-02-09 14:19:08 -07:00
Eric Wasylishen
bd0556cf22
light: switch to new Face_Centroid
2017-02-09 00:17:22 -07:00
Eric Wasylishen
f09cadbc76
light: switch to new world space <-> texture space code
2017-02-08 17:51:22 -07:00
Eric Wasylishen
70644907e0
Revert "light: move Lightmap_Soften into WriteLightmaps"
...
This reverts commit bc2d734e9a .
2017-02-08 17:10:26 -07:00
Eric Wasylishen
90bf0134de
common: move vec3_t_to_glm() to mathlib.hh
2017-02-08 15:01:03 -07:00
Eric Wasylishen
bc2d734e9a
light: move Lightmap_Soften into WriteLightmaps
2017-02-08 02:23:21 -07:00
Eric Wasylishen
3acc48269e
light: add lanczos filter
2017-02-07 14:27:51 -07:00
Eric Wasylishen
4813bf6aa2
common: remove unused function
2017-02-07 11:44:02 -07:00
Eric Wasylishen
1211fd86d1
light: move bounce to its own file
2017-02-07 00:51:05 -07:00
Eric Wasylishen
c7756496cd
light: move phong shading code to its own file
2017-02-07 00:06:29 -07:00
Eric Wasylishen
9246454bfc
light: refactor some more stuff to GLM
2017-02-06 23:00:48 -07:00
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
seth
e68e38a08f
Merge remote-tracking branch 'upstream/master'
...
Fixed conflicts
2017-02-05 14:06:24 -05:00
seth
4a119e2098
Added _bouncescale to light sources
2017-02-05 13:47:47 -05:00
Eric Wasylishen
9330d2c087
light: rename Face_MakeInwardFacingEdgePlanes() to Face_AllocInwardFacingEdgePlanes()
...
do memory allocation inside the function.
2017-02-01 14:38:42 -07:00
Eric Wasylishen
be3c84ec98
light: add a EdgePlanes_PointInside() function to bsputils.{hh,cc}
2017-02-01 14:38:42 -07:00
Eric Wasylishen
c035907ff8
light: move Face_MakeInwardFacingEdgePlanes() to bsputils.{hh,cc}
2017-02-01 14:38:42 -07:00
Eric Wasylishen
29b420c7dd
light: move Light_PointInSolid to bsputils.{hh,cc}
2017-02-01 14:38:42 -07:00
Eric Wasylishen
4ec1d92191
light: dirt_off_radius, dirt_on_radius
2017-01-30 16:11:56 -07:00
Eric Wasylishen
b46cba40a4
light: entity warnings: print bbox for bmodel entities
...
fixes https://github.com/ericwa/tyrutils-ericw/issues/120
2016-11-24 17:10:15 -07:00
Eric Wasylishen
186485ec47
light: revert ee89d41b6d since it's now handled within the trace code
2016-11-03 18:27:40 -06:00
Eric Wasylishen
91fcfe5b9a
light: use glass texture colors to tint rays
2016-11-03 02:26:53 -06:00
Eric Wasylishen
ee89d41b6d
light: light passing through glass lights up the back side, scaled by (1-alpha)
2016-11-02 21:35:11 -06:00
Eric Wasylishen
ed708f5154
light: allow both _mincolor and _minlight_color on bmodels
2016-11-02 18:05:44 -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
cefadfa1f4
build: fix on MSVC 2013
2016-10-17 19:25:27 -07:00
Eric Wasylishen
a6468984bf
all: finish c++ification
2016-10-17 19:52:17 -06:00
Eric Wasylishen
64ec89312d
common: Add Q_assert_unreachable()
2016-10-17 18:16:23 -06:00
Eric Wasylishen
d9bb0be32e
light: move Face_Contents to common
2016-10-17 17:37:28 -06:00
Eric Wasylishen
57834c438b
light: add "_lightignore" model key
2016-09-20 16:15:12 -06:00
Eric Wasylishen
46a56df19f
light: add -bouncelightsdebug switch to render bounce lights
2016-09-20 00:04:02 -06:00
Eric Wasylishen
801d9652c0
common: add util function to get a face number
2016-09-20 00:01:15 -06:00
Eric Wasylishen
722f753d8d
light: remove some unused vis-testing stuff
2016-09-19 19:21:04 -06:00
Eric Wasylishen
f7091c27f8
light: add some tests for the EntDict_Check* functions
2016-09-19 19:16:45 -06:00
Eric Wasylishen
26dcb4f10f
light: refactor warnings code. warn if an entity targets itself
2016-09-19 18:28:16 -06:00
Eric Wasylishen
494f9bb050
common: make Q_assert inline
2016-09-18 15:44:04 -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
b2fb764e36
common: new assertion macro used in all builds (debug/release)
2016-09-18 15:39:16 -06:00
Eric Wasylishen
073ede98c7
light: when there are too many lightstyles on a face, sort them by descending average brightness and take the top 4
...
previous behaviour was random, which made needlessly ugly artifacts.
2016-09-18 15:12:57 -06:00
Eric Wasylishen
8bff999601
light: move lightmaps array to lightsurf_t
2016-09-18 02:22:26 -06:00
Eric Wasylishen
700e8d089f
light: add -verbose option
2016-09-17 23:49:41 -06:00
Eric Wasylishen
81c7b39fa7
light: tidy LightStyleForTargetname
2016-09-17 17:49:01 -06:00
Eric Wasylishen
33093151c6
common: ClipWinding: fix constness
2016-09-10 15:32:50 -06:00
Eric Wasylishen
ce812f5570
light: apply AO when calculating how much light a surface reflects (wrong? but matches 0.15.5)
2016-09-08 21:07:29 -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
f6c4309f6d
light: catch std::stof parse exceptions and log a warning
2016-09-07 20:04:53 -06:00
Eric Wasylishen
5e9b62dc8b
light: add "testlight" target
2016-08-15 21:18:14 -06:00
Eric Wasylishen
07dd9d72b2
light: add missing include
2016-08-12 19:22:04 -06:00
Eric Wasylishen
d7948c4bdd
light: move settings system to its own files
2016-08-12 19:15:25 -06:00
Eric Wasylishen
a0f3881698
light: refactor global settings into a class
2016-08-12 18:49:32 -06:00
Eric Wasylishen
ed43b29489
light: store normal contribution in ray stream
2016-08-12 11:51:27 -06:00
Eric Wasylishen
b849a79c3f
light: move GetDir to mathlib
2016-08-11 14:16:23 -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
4fb903bd8e
common: add more AABB functions
2016-08-09 17:56:55 -06:00
Eric Wasylishen
79525b9aee
common: mathlib: add UniformPointOnSphere
2016-08-09 17:20:51 -06:00
Eric Wasylishen
1d4de5c17d
light: add more performance stats
2016-08-09 17:11:08 -06:00
Eric Wasylishen
0b6578e4b3
common: mathlib: add some AABB functions
2016-08-09 16:27:51 -06:00
Eric Wasylishen
637f3e4c1f
light: fix compile error
2016-08-09 15:51:16 -06:00
Eric Wasylishen
4be2fe289e
common: add RandomDir
2016-08-09 15:29:23 -06:00
Eric Wasylishen
7d5067bddd
light: Add stats
2016-08-09 01:15:26 -06:00
Eric Wasylishen
68e1736ad1
light: move more stuff to bsputils.cc
2016-08-07 23:07:20 -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
939778bd23
build: add snprintf wrapper from QuakeSpasm (vs2013 compat)
2016-08-06 15:47:40 -07:00
Eric Wasylishen
a807204fe6
build: vs2013 compat changes
2016-08-06 15:37:00 -07:00
Eric Wasylishen
7029ed5713
light: clean headers
2016-08-04 16:32:04 -06:00
Eric Wasylishen
fcc54c547f
light: change CalcPoints to only trace the model the face belongs to
2016-08-04 12:24:07 -06:00
Eric Wasylishen
2a3b87bf1f
light: rework bounce lighting for less memory use
2016-08-03 14:00:58 -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
307d0efc28
light: minor cleanups
2016-07-31 17:00:35 -06:00
Eric Wasylishen
03f703d931
light: remove redundant light value from lightsample_t
2016-07-31 11:47:27 -06:00
Eric Wasylishen
882348ac0a
light: use embree ray stream api
2016-07-30 00:40:45 -06:00
Eric Wasylishen
225a155efd
light: fix unwanted phong on everything
2016-07-29 19:48:28 -06:00
Eric Wasylishen
6bb842cd47
light: refactor tracelist and selfshadowlist to be std::vector
2016-07-29 15:56:48 -06:00
Eric Wasylishen
14f0af42be
light: add an assertion for settings system
2016-07-29 15:50:39 -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
f4a363b416
light: make DirtTrace return a hittype_t
2016-07-27 13:07:50 -06:00
Eric Wasylishen
2771041a0a
light: lockable_setting_t: fix isLocked()
2016-07-27 12:31:30 -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
cbfe1e8ebf
light: simplify settings logic a bit
2016-07-27 01:55:23 -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
8b1e1e0164
light: entities: delete some dead code
2016-07-26 16:41:27 -06:00
Eric Wasylishen
dc8525dfd2
light: entities: refactor EntDict_VectorForKey
2016-07-26 13:12:57 -06:00
Eric Wasylishen
0b8ef0778d
light: entity_t: keep a pointer to the entdict_t rather than a copy
2016-07-26 12:43:58 -06:00
Eric Wasylishen
b71ae5a200
light: fix MatchTargets
2016-07-26 12:31:45 -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
dc856a329d
light: use settings system for lights
2016-07-24 12:23:46 -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
a5f8af389f
light: tweaks to lightsettings_t (unused)
2016-07-24 00:21:59 -06:00
Eric Wasylishen
8851a3d8c3
light: remove some dead code
2016-07-23 23:27:19 -06:00
Eric Wasylishen
cc2bb5158a
light: add class for a dictionary of settings
2016-07-23 22:54:32 -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
aab9d1dd46
light: Add lightsettings_t class
2016-07-23 16:20:08 -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
2c0f39ea38
light: make TriArea non-static
2016-07-20 19:06:12 -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
19f47e08f9
light: add setStringValue() to settings classes
2016-07-14 14:38:29 -06:00
Eric Wasylishen
9637d410e1
light: add missing include
2016-07-14 00:23:08 -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
7646175048
Merge branch 'stable'
...
* stable:
light: trace: raise stack depth 128->256 to handle lavabloom_bad.bsp from Pritchard
light: use Face_TextureName() everywhere we need texture names. Handle negative miplump->dataofs[texnum].
build: appveyor: use v140_xp toolset for xp compatibility
# Conflicts:
# appveyor.yml
2016-07-12 00:25:50 -06:00
Eric Wasylishen
992b2e51bc
light: use Face_TextureName() everywhere we need texture names. Handle negative miplump->dataofs[texnum].
2016-07-12 00:20:00 -06:00
Eric Wasylishen
78810fa765
common: fix COM_Parse const-ness
2016-07-06 17:06:28 -06:00
Eric Wasylishen
37324f9245
light: entities: remove stored classname
2016-07-06 16:29:25 -06:00
Eric Wasylishen
1f723c94e6
light: entities: remove entity_t.target and entity_t.targetname
2016-07-06 14:26:14 -06:00
Eric Wasylishen
431a2077d5
light: entities: replace lighttargets array with a std::vector
2016-07-06 14:08:01 -06:00
Eric Wasylishen
47c0c7ccc9
light: entities: replace epairs with std::map
2016-07-06 13:42:32 -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
913d6f068c
light: DirtTrace: return hitdist instead of hitpoint
2016-06-19 16:39:59 -06:00
Eric Wasylishen
1d3774a9e0
light: make DirtTrace take dir / dist instead of endpoint to reduce VectorNormalize calls
2016-06-19 15:38:09 -06:00
Eric Wasylishen
5054ced22d
light: fix embree support
2016-06-17 21:21:30 -06:00
Eric Wasylishen
3b07fb3879
Revert "light: add cull_backfaces hack used by CalcPoints, to handle the case when a shadow-casting bmodel is obstructing the midpoint of a face."
...
This reverts commit 412e169ef6 .
2016-06-10 13:16:15 -06:00
Eric Wasylishen
412e169ef6
light: add cull_backfaces hack used by CalcPoints, to handle the case when a shadow-casting bmodel is obstructing the midpoint of a face.
...
probably should be removed and CalcPoints made more robust.
2016-06-10 12:23:22 -06:00
Eric Wasylishen
7c3aa545bb
light: sunlight refactoring
2016-06-09 00:47:59 -06:00
Eric Wasylishen
dbae785404
light: refactor sunlight handling so command-line options can be adde
2016-06-08 22:08:00 -06:00
Eric Wasylishen
0e5438ab14
light: fix saving bogus lightmaps for non-lightmapped faces when -bounce is in use
2016-06-07 20:26:19 -06:00
Eric Wasylishen
dba4739444
light: make Light_PointInSolid non-static
2016-05-30 20:53:05 -06:00
Eric Wasylishen
43ab4171d7
light: store bsp in lightsurf for convenience
2016-05-30 20:52:56 -06:00
Eric Wasylishen
280aadfbd8
light: add -debugface option for debugging CalcPoints
2016-05-30 00:15:07 -06:00
Eric Wasylishen
7f182cf107
light: lit water: receive light from either side of the face
2016-05-29 16:01:31 -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
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
55df37941c
light: add -bouncecolorscale flag
2016-05-20 12:00:57 -06:00
Eric Wasylishen
e0f8213cc9
common: add userinfo param to DiceWinding
2016-05-19 23:55:12 -06:00
Eric Wasylishen
7715310afe
common: add AllocWindingEdges, FreeWindingEdges, PointInWindingEdges
2016-05-19 22:02:45 -06:00
Eric Wasylishen
a6f4dad172
light, vis: move plane_t to mathlib.h
2016-05-19 15:26:30 -06:00
Eric Wasylishen
2cdc5e7c68
common: actually move WindingFromFace to polylib
2016-05-19 15:18:33 -06:00
Eric Wasylishen
45010089f3
light, common: move WindingFromFace to bspfile.c/h
2016-05-19 15:07:31 -06:00
Eric Wasylishen
fff12697e5
light: move DicePatch to polylib.c
2016-05-19 15:03:21 -06:00
Eric Wasylishen
a0f636a69a
light: bounce: refactor to do in a second lighting pass
2016-05-19 02:53:18 -06:00
Eric Wasylishen
a5356c161c
light: bounce: scale bounced light by texture color
2016-05-14 20:51:21 -06:00
Eric Wasylishen
f73b9de0b3
common: make VectorLength, VectorNormalize static inline
2016-05-13 21:10:00 -06:00
Eric Wasylishen
d0480049e8
light: move TRACE_HIT_ constants to trace.c
2016-05-11 16:30:26 -06:00
Eric Wasylishen
7bd93cce37
light: move private BSP tracing stuff from light.h to trace.c
2016-05-11 16:23:02 -06:00
Eric Wasylishen
3fb8b7d1e5
light: delete -lightturb and related flags for generating lightmaps for TEX_SPECIAL textures.
...
mankrip's lit water implementation relies on qbsp splitting water, so this code is not needed.
2016-04-29 23:23:28 -06:00
Eric Wasylishen
72c47c1b56
light: bounce: refactor a bit
2016-04-29 18:11:14 -06:00
Eric Wasylishen
67a64f9be4
vis: support PRT1-AM portals generated by txqbsp-xt
2016-04-29 12:20:35 -06:00
Eric Wasylishen
2bca34265c
light: use vis acceleration for bounce lights
2016-04-29 11:27:02 -06:00
Eric Wasylishen
713b92dcb5
light: preliminary bounce implementation
2016-04-27 19:19:29 -06:00
Eric Wasylishen
d426c8d9da
light: some setup for bounced lighting
2016-04-26 15:14:22 -06:00
Eric Wasylishen
c58528499d
light: when interpolating a normal that lies outside of a face, recursively look it up on adjacent faces
2016-04-26 00:29:50 -06:00
Eric Wasylishen
f3132f342c
light: Mod_LeafPvs: return whether we found a real pvs
2016-04-24 18:24:41 -06:00
Eric Wasylishen
318fc23481
light: implement "_bleed" light key.
...
"_bleed" "1" on a light entity skips the test that a light is on the front side of a face. useful for special effects.
2016-04-23 22:21:59 -06:00
Eric Wasylishen
5ac18e5c6f
light: index some PVS info at startup
2016-04-22 20:11:59 -06:00
Eric Wasylishen
d309aa02b0
light: refactor CalcPvs to calculate the face pvs in a cleaner way
2016-04-22 19:15:49 -06:00
Eric Wasylishen
338ceae8c8
light: add face to lightsurf struct
2016-04-21 00:13:31 -06:00
Eric Wasylishen
1ea4d52eab
light: add -novis flag
2016-04-20 23:57:04 -06:00
Eric Wasylishen
e1bad1bbd6
light: rewrite normal interpolation
2016-04-20 01:39:42 -06:00
Eric Wasylishen
bc0e76f959
common: polylib: add WindingBounds from q2 tools. Add missing consts
2016-04-19 01:39:37 -06:00
Eric Wasylishen
8fd3f41b42
light: expose GetLightValue in entities.h
2016-04-19 01:28:33 -06:00
Eric Wasylishen
0c93c5c3d0
light: DirtTrace: add extra argument for hit face
2016-04-19 01:26:21 -06:00
Eric Wasylishen
2a4168f35c
light: add _minlight_exclude bmodel key
2016-04-17 22:51:14 -06:00
Eric Wasylishen
fff8cbffbc
light: use vis data
2016-04-14 20:15:52 -06:00
Eric Wasylishen
321eac8aaa
light: make PrintFaceInfo non static
2016-04-12 01:07:37 -06:00
Eric Wasylishen
c86731ab58
light: make TriangleArea non static
2016-04-11 00:47:21 -06:00
Eric Wasylishen
cf8e3fc935
light: augment DirtTrace with the hit plane
2016-04-10 22:30:42 -06:00
Eric Wasylishen
986334a86b
light: unify "_anglescale" worldspawn key and "-anglescale" command line option, previously they were different.
...
Fix "-anglescale" command line option which was broken.
Make sunlight2 use the global anglescale setting.
2016-04-10 18:25:15 -06:00
Eric Wasylishen
b6c9873289
light: return hit normal for DirtTrace
2016-04-10 15:27:21 -06:00
Eric Wasylishen
0a6708edb0
light: remove embree support
2016-04-10 14:43:37 -06:00
Eric Wasylishen
d5a4e07deb
common: fix VECT_MAX macro
2016-04-10 14:43:17 -06:00
Eric Wasylishen
ab9be6bbf2
light: refactoring
2016-04-07 13:16:21 -06:00
Eric Wasylishen
c9aad9d2ce
light: Refactor CalcPoints, store whether a point is occluded
2016-04-06 18:29:24 -06:00
Eric Wasylishen
a6a89db530
light: refactor tracelist to be a list of modelinfo_t instead of dmodel_t
2016-04-05 23:25:36 -06:00
Eric Wasylishen
e11e9d5c1f
light: embree support
2016-03-30 14:58:21 -06:00
Eric Wasylishen
d2f1eb2b2b
light: support _phong and _phong_angle on bmodels for compatibility with other qbsp's.
2016-03-05 22:51:17 -07:00
Eric Wasylishen
41972a376a
qbsp, light: Strip texinfo flags other than TEX_SPECIAL.
...
Write extended ones to a "mapname.texinfo" file.
Support "_dirt" and "_minlight" flags on func_detail/group.
2016-03-05 00:26:54 -07:00
Eric Wasylishen
0b4c044473
light: fix dirtmapping traces
2016-03-04 20:40:14 -07:00
Eric Wasylishen
98a020fde7
vis: fix ambient sounds when using func_detail, broken in tyrutils-ericw-v0.15.3
2016-03-04 15:38:08 -07:00
Eric Wasylishen
fec88c3186
light: fix build on MSVC
2016-03-02 19:21:30 -08:00
Eric Wasylishen
492d94c1fe
light: new phong shading keys, "_phong_angle" and "_phong".
...
"_phong" "1" is a shortcut for "_phong_angle" "89".
"_phong_angle" sets the max angle in degrees between faces that will get smoothed.
2016-03-02 20:00:05 -07:00
Eric Wasylishen
f641e93ca2
light: convert light.c to light.cc
2016-03-02 17:07:02 -07:00
Eric Wasylishen
4ed6db3020
light: add new TraceFaces API which gives accurate info on the first hit face of a trace.
...
Need to use this for: dirtmapping, fence textures, GI
2016-02-21 22:31:06 -07:00
Eric Wasylishen
4e74e530c0
light: dynamically allocate memory for lighting each face
2016-02-20 14:43:38 -07:00
Eric Wasylishen
22dd1726de
light: move lightsurf_t etc. to header
2016-02-20 14:41:58 -07:00
Eric Wasylishen
1fd1637de1
light: add -phongdebug option
2016-02-15 20:27:03 -07:00
Eric Wasylishen
7128a8e956
code formatting, normalize most whitespace to 4 spaces
2016-02-15 16:20:29 -07:00
Eric Wasylishen
1630b8756e
tyrutils-ericw-spike rebased on to 998c9d3acb
2016-02-15 16:16:37 -07:00
Eric Wasylishen
a439f891a1
CalcPoints: Skip the trace if a PointContents says the point is already unobstructed.
...
Handles beveled walkways in telefragged.bsp which touch a wall along one edge, but don't split the wall.
Previously, the walkways were blocking most of the traces for the wall, messing up all of the wall sample points.
2016-02-11 22:38:23 -07:00
Eric Wasylishen
063786bf02
build: fix spurious errors in VS2015 IDE
2015-12-07 14:37:46 -08:00
Eric Wasylishen
420125cc67
replace tabs with spaces.
...
for FILE in $(find . -name "*.h" -or -name "*.c"); do cat $FILE | expand > temp; cat temp > $FILE; done
2015-12-07 15:08:48 -07:00
Eric Wasylishen
c149ed2bf6
build: VS2015 support
2015-12-07 14:23:13 -07:00
Eric Wasylishen
e6fcf3d6da
light: add -surflight_dump option to export generated surface lights to a map file
2015-12-05 20:27:51 -07:00
Eric Wasylishen
81cefad71a
light: handle surface lights on rotators
2015-12-05 20:07:20 -07:00
Eric Wasylishen
50b556993a
light: experimental -parse_escape_sequences option to toggle \b escape sequence (toggles bold text)
2015-11-26 18:30:10 -07:00
Eric Wasylishen
f154a00e3a
light: fix "_mincolor" bmodel key which was only accepting 0-255
...
now accepts 0-1 or 0-255.
2015-11-20 14:27:25 -08:00
Eric Wasylishen
d0fb0bd410
light: remove entity->fadedist, it was error-prone, and instead just check light level. it's only very slightly slower.
2015-10-25 23:18:17 -06:00
Eric Wasylishen
1e9a0ac2b3
light: add "-sunsamples" flag to control number of samples for _sunlight_penumbra and _sunlight2
2015-10-23 19:54:41 -06:00
Eric Wasylishen
545ba66ebc
vis: Reuse each cluster's visdata for all leafs in the cluster
2015-10-20 02:26:35 -06:00
Eric Wasylishen
792a7eae6e
vis: raise MAX_MAP_VISIBILITY to 128MB
2015-10-19 23:48:19 -06:00
Eric Wasylishen
a3b985e721
hexen2 support, patch from Spike
2015-10-16 21:18:53 -06:00
Eric Wasylishen
46cbcfd12b
light: add -dirtangle flag to control dirtmapping cone angle
2015-08-28 20:22:54 -06:00
Eric Wasylishen
3c918db489
light: add -onlyents switch
2015-08-20 12:14:13 -06:00
Eric Wasylishen
3005504fe5
vis, light: set low process priority on windows
2015-08-05 12:10:17 -06:00
Eric Wasylishen
5302a3b539
light: add -surflight_subdivide command line flag to control subdivision size
2015-08-05 12:10:14 -06:00
Eric Wasylishen
e9f240b623
light: .lux file support from Spike
2015-07-09 16:34:12 -06:00
Eric Wasylishen
e242a9c910
light: Add gamma control with -gamma flag and "_gamma" key
2015-07-09 16:33:07 -06:00
Eric Wasylishen
26a03ace45
light: optimization: avoid iterating over non-light entities in light thread.
2015-06-02 00:51:37 -06:00
Eric Wasylishen
54e7c2ab8e
light: fence texture tracing
2015-04-27 00:26:42 -06:00
Eric Wasylishen
6fe67cd2fb
light: allow setting _dist and _range in worldspawn
2015-04-25 20:46:00 -06:00
Eric Wasylishen
ef471ee44f
Support "_dirt" "-1" on bmodels to disable dirtmapping
2015-04-25 20:45:54 -06:00
Eric Wasylishen
be8c42460c
_sunlight2 (sky light, light dome) support from q3map2
...
_sunlight penumbra (deviance) from q3map2
light penumbra from q3map2
2015-04-25 20:45:44 -06:00
Eric Wasylishen
741d341332
Dirtmapping (ambient occlusion) from q3map2
2015-04-25 20:45:32 -06:00
Kevin Shanahan
50b78f3d61
qbsp, common: support both DP and RMQ variants of the BSP2 format
...
Turns out there are two types of "BSP2" format - one that I think was
created by MH and implemented in the RMQ project (this is the one I
implemented previously) and one by LordHavoc which exteneded the
coordinate limits beyond 32k, implemented in Darkplaces. The
Darkplaces version of BSP2 will get the name BSP2 and the RMQ version,
which is more limited, will get the name BSP2rmq.
qbsp will only create the BSP29 or BSP2 formats, but will cope with a
BSP2rmq format file for an -onlyents compile. The rest of the tools
can use any of the three formats.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-09-28 11:48:37 +09:30
Kevin Shanahan
4b1e3aec1a
light, vis, bsputil, bspinfo: Add BSP2 support
...
Add BSP2 support to the remaining utils. Since these share the common
bspfile.[ch] files, it was more effort than is justifiable to break this
into multiple staged patches - so you just get this disgustingly big
commit instead. Here is basically what was done:
* Modify the bspdata_t struct with a union of the two bsp formats
* Modify the tools to use bsp2_t for all internal processing
* Split out the byte swapping routines for the different bsp data types
* Add simple (although verbose) code to convert bsp29 <-> bsp2
Hundreds of lines added to bspfile.c, but mostly trivial stuff. The tools
internally had little modification except to substitute the bsp2 type
names.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-09-25 15:18:50 +09:30
Kevin Shanahan
e970bea8c7
common: save the bsp version in the bspdata struct
...
Adjust the Load and Write API functions as appropriate.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-08-22 13:25:47 +09:30
Kevin Shanahan
89abf25218
common: convert all tools to instanced bsp data
...
Transition all tools to access the BSP data via the bspdata struct instead
of the shared globals. Remove the compatibility code from bspfile which
copied the global values to/from the instanced bspdata struct.
Mostly the changes just involved passing along the bspdata struct to the
various functions which needed to reference the data. TraceLine and
MakeTNodes in light got some extra changes so that we cache the node
dplane pointer and remove the need to pass the bspdata struct to every
trace operation!
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-08-22 11:01:08 +09:30
Kevin Shanahan
d0617760f5
common: add the ability to pass an arg to spawned threads
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-08-20 19:27:40 +09:30
Kevin Shanahan
6ddb109dde
light: convert WriteLitFile to use the bspdata struct
...
Avoids reference to global LightDataSize. Need to move writing the lit
file above the call to WriteBSPFile, since that will do the byte swapping.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-08-20 15:23:04 +09:30
Kevin Shanahan
5facda6ff9
common: constify vec3_origin
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-08-20 13:30:05 +09:30
Kevin Shanahan
51419621ec
common: add the bsp2/bsp29 data types
...
Rename the default bsp29 data types and add the bsp2 data types to
the common bspfile.h. Propogate the bsp29 names into the other tools as
simple renames for now.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-08-20 13:25:16 +09:30
Kevin Shanahan
0092347789
common: use stdint types in the common bspfile.h
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-08-20 12:25:51 +09:30
Kevin Shanahan
69c86e59b8
common: move AMBIENT and MAXLIGHTMAP definitions
...
Keep the ambient sound definitions near the leaf and lightmaps limit near
the face definition.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-08-20 12:20:57 +09:30
Kevin Shanahan
42bcf2da7c
common: rename HEADER_LUMPS -> BSP_LUMPS
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-08-20 09:30:26 +09:30
Kevin Shanahan
9a2cd81b8c
common: add the bsp version defines to bspfile.h
...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-08-20 09:18:26 +09:30