Commit Graph

318 Commits

Author SHA1 Message Date
Eric Wasylishen 25d6aad5bf light: add _selfshadow as an alias for _shadowself 2017-06-27 12:27:39 -06:00
Eric Wasylishen 4dcfc12f50 light: refactor _shadowself handling 2017-06-26 17:42:50 -06:00
Eric Wasylishen 6e707130be light: rename dynamic shadow stuff to switchshadstyle" for QC,
and "_switchableshadow" for the mapper.
2017-06-26 13:41:24 -06:00
Eric Wasylishen b71f769c0a light: experimental support for switchable bmodel shadows:
Current specs/limitations:
- only supported for sunlight and regular lights
- enabled with "_dynamicshadow" "1"
- writes the lightstyle to a "dynshadowstyle" entity key, hardcoded
- only handles one dynamic occluder for a given lightmap sample
- styled lights passing through a dynamic occluder turn non-styled
2017-06-25 20:06:46 -06:00
Eric Wasylishen fb4e089e81 light: accept "_minlight" in worldspawn as an alias for "light"
docs: note that _minlight_color and _mincolor are supported on
worldspawn
2017-06-24 21:31:08 -06:00
Eric Wasylishen ca58e90e15 common: remove EQUAL_EPSILON from mathlib.hh 2017-04-26 14:25:55 -06:00
Eric Wasylishen 5eb4fd8790 common: make Face_Plane_E return a plane3f 2017-04-24 01:54:25 -06:00
Eric Wasylishen 68b084a6c3 replace glm with qvec 2017-04-24 00:26:49 -06:00
Eric Wasylishen 7887318def common: move vec_from_mangle and mangle_from_vec to mathlib 2017-04-23 19:31:00 -06:00
Eric Wasylishen 60418ce9a7 light: add maximum switchable lights to log message 2017-04-22 11:53:55 -06:00
Eric Wasylishen 10386581a6 light: make bounce of styled lights opt in with "_bouncestyled" worldspawn key 2017-03-27 16:44:04 -06:00
Eric Wasylishen 8a83e3d351 light: BounceLightsForFaceNum(): return indices so we have 1 main copy of the bounce lights 2017-03-15 13:22:43 -06:00
Eric Wasylishen c2c3e915e6 light: fix leak of lightsurf->realfacenums 2017-03-15 13:22:35 -06:00
Eric Wasylishen 33fbe56e12 light: save poly edge planes for bouncelights 2017-03-15 10:59:31 -06:00
Eric Wasylishen 1d66039b2c light: save poly for bouncelights 2017-03-15 10:59:25 -06:00
Eric Wasylishen 154158ddba light: BounceLightsForFaceNum: avoid an unnecessary std::vector copy 2017-03-15 10:59:16 -06:00
Eric Wasylishen 686696c362 light: Palette_GetColor: return glm vector 2017-03-12 15:41:52 -06:00
Eric Wasylishen 102bdc49f0 light: drop IntersectSingleModel api 2017-03-12 15:06:07 -06:00
Eric Wasylishen ccb6ea27b1 light: some temporary api compatibility stuff 2017-03-12 12:58:30 -06:00
Eric Wasylishen 63e8f42c87 light: ray stream api: allow getting hit face 2017-03-07 13:37:52 -07:00
Eric Wasylishen 553f02d582 light: restore performance of bounce lighting 2017-03-06 22:50:20 -07:00
Eric Wasylishen 48a6314dfb light: bounce styled lights 2017-03-05 20:05:34 -07:00
Eric Wasylishen 461afbc15d light: remove ltface2.cc/hh 2017-03-01 13:20:09 -07:00
Eric Wasylishen b163f766bb light: drop unneeded light2.cc/hh 2017-02-27 19:10:55 -07:00
Eric Wasylishen 34947ced9c light: delete RotationAboutLineSegment 2017-02-27 19:06:28 -07:00
Eric Wasylishen 69d5669773 light: delete some dead code 2017-02-27 17:43:56 -07:00
Eric Wasylishen 97a00f0f41 light: avoid recomputing things in CalcPointNormal 2017-02-26 22:58:08 -07:00
Eric Wasylishen 6c946038ee light: move edgeToFaceMap_t stuff to phong.hh/cc 2017-02-25 14:44:59 -07:00
Eric Wasylishen 22b5684c23 light: save the actual face number of each sample point 2017-02-24 21:05:59 -07:00
Eric Wasylishen 29c7f79a0b light: misc stuff 2017-02-23 20:53:10 -07:00
Eric Wasylishen cafadddb62 light: expose faceextents_t in header 2017-02-21 22:59:40 -07:00
Eric Wasylishen 6f66473836 light: add mangle_from_vec 2017-02-14 23:45:38 -07:00
Eric Wasylishen 7300aacdff light: Add -debugoccluded 2017-02-11 22:22:26 -07:00
Eric Wasylishen 1957fb1489 light: expose WorldToTexCoord_HighPrecision() in header 2017-02-11 15:45:50 -07:00
Eric Wasylishen 5fe4f23371 light: add a debug mode for showing contributing faces 2017-02-11 15:45:30 -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 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 bc2d734e9a light: move Lightmap_Soften into WriteLightmaps 2017-02-08 02:23:21 -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 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 c035907ff8 light: move Face_MakeInwardFacingEdgePlanes() 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 a6468984bf all: finish c++ification 2016-10-17 19:52:17 -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 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 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 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 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 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 637f3e4c1f light: fix compile error 2016-08-09 15:51:16 -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 1a0fb22e40 light: move some helper functions to common/bsputils.{h,cc} 2016-08-07 22:55:44 -06: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