Commit Graph

541 Commits

Author SHA1 Message Date
Eric Wasylishen f4a363b416 light: make DirtTrace return a hittype_t 2016-07-27 13:07:50 -06:00
Eric Wasylishen 197c898976 light: hack to allow "-dirt 0" to disable all dirmapping (todo: check -dirt 1 implies minlight, sunlight dirt properly?) 2016-07-27 12:37:57 -06:00
Eric Wasylishen ceec496bfe light: entities: add some debug logging 2016-07-27 12:15:28 -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 2b12654c49 light: remove dead code 2016-07-26 18:08:58 -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 8b1e1e0164 light: entities: delete some dead code 2016-07-26 16:41:27 -06:00
Eric Wasylishen 9279c86fb5 light: fix -addmin switch (temporary hack) 2016-07-26 16:09:16 -06:00
Eric Wasylishen 5b68158736 light: fix _project_mangle to be consistent with "mangle" (yaw pitch roll) 2016-07-26 16:09:04 -06:00
Eric Wasylishen 9fc8f0d6c1 light: entities: tidy surface light code a bit 2016-07-26 13:59:39 -06:00
Eric Wasylishen 6b51bad817 light: fix surface lights 2016-07-26 13:48:36 -06:00
Eric Wasylishen dc8525dfd2 light: entities: refactor EntDict_VectorForKey 2016-07-26 13:12:57 -06:00
Eric Wasylishen f716e14c89 light: minor cleanups 2016-07-26 13:04:17 -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 d8094c83e5 light: EntDict_FloatForKey: avoid throwing exceptions excessively 2016-07-24 16:00:00 -06:00
Eric Wasylishen 7fdd5f2da4 light: entities: clean up parsing and writing entdata 2016-07-24 15:09:57 -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 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 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 191949e569 Merge branch 'stable'
* stable:
  light: trace: fix MakeTnodes_r blowing up with ijed's rift1.map

# Conflicts:
#	light/trace.cc
2016-07-21 01:51:23 -06:00
Eric Wasylishen f05faf9614 light: trace: fix MakeTnodes_r blowing up with ijed's rift1.map 2016-07-21 00:29:58 -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 42c4195ad6 light: make -debugface print more debug info 2016-07-20 16:16:00 -06:00
Eric Wasylishen 26fbffa2bf light: add GetSurfaceVertex and GetSurfaceVertexPoint to header 2016-07-20 16:15:42 -06:00
Eric Wasylishen b15e0052bf light: fix phong shading on models with an offset 2016-07-20 16:06:48 -06:00
Eric Wasylishen 7f939b8146 light: hack to workaround https://github.com/ericwa/tyrutils-ericw/issues/67 . worldspawn was being inserted into the list of lights when it had a minlight value set (!?!) 2016-07-20 16:04:35 -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 c694bacc2f light: fix entity_t to be zero-initialized 2016-07-12 00:39:44 -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 e82f67eb34 light: trace: raise stack depth 128->256 to handle lavabloom_bad.bsp from Pritchard 2016-07-12 00:21:14 -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 1f4d20ee04 light: workaround weird syntax error 2016-07-07 00:07:01 -06:00
Eric Wasylishen 5b26bc4709 light: add EntData_Write and EntData_Parse (unused) 2016-07-06 17:46:17 -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 d225891ef5 light: c++ify remaining files 2016-07-05 22:27:41 -06:00
Eric Wasylishen 34bc864616 light: print elapsed time to 3 decimal places 2016-07-04 21:06:34 -06:00
Eric Wasylishen 50a677408b light: hack to workaround https://github.com/ericwa/tyrutils-ericw/issues/67 . worldspawn was being inserted into the list of lights when it had a minlight value set (!?!) 2016-06-30 14:49:55 -06:00
Eric Wasylishen ec6352a5fe light: option parser: allow negative numbers as option args 2016-06-30 14:14:59 -06:00
Eric Wasylishen a7e9d9bba4 light: embree: fix for liquid faces casting shadows! 2016-06-30 14:14:28 -06:00
Eric Wasylishen bdca751361 build: hack for install_name_tool causing Xcode build to fail when returning nonzero exit status 2016-06-30 14:14:06 -06:00
Eric Wasylishen 886f033748 build: fix up OS X embree packaging 2016-06-28 18:09:58 -06:00
Eric Wasylishen cc6ca58c8d build: add OS X packaging script 2016-06-28 16:16:43 -06:00
Eric Wasylishen 3e6018a95a build: switch back to dynamic linking embree, static was a pain, slow builds, etc. 2016-06-28 15:04:50 -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 b652f00fdd build: copy gplv3 and embree license into cpack archive 2016-06-18 17:55:09 -06:00
Eric Wasylishen f515671c51 build: fix EMBREE_STATIC_LIB define 2016-06-18 16:09:23 -07:00
Eric Wasylishen b983686972 build: use -msse3 if building with embree. make light target depend on embree target 2016-06-18 15:08:34 -06:00
Eric Wasylishen d9cf97f582 build local copy of embree and static link it 2016-06-18 14:50:14 -06:00
Eric Wasylishen cfe3553ac6 light: embree: disable robust flags 2016-06-17 21:21:30 -06:00
Eric Wasylishen 1458f097da light: build: rename embree license 2016-06-17 21:21:30 -06:00
Eric Wasylishen 57f4dd0ee9 light: build: fix cpack config 2016-06-17 21:21:30 -06:00
Eric Wasylishen c87a57165c light: build: edit "embree found" message, seems to cause build error on appveyor 2016-06-17 21:21:30 -06:00
Eric Wasylishen 5054ced22d light: fix embree support 2016-06-17 21:21:30 -06:00
Eric Wasylishen 7729e90d99 light: fix crash when no textures present 2016-06-10 21:29:23 -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 470dac14d7 light: handle fence textures 2016-06-10 11:47:59 -06:00
Eric Wasylishen a57393a3c4 light: test fence textures in TraceFaces 2016-06-10 00:07:30 -06:00
Eric Wasylishen e0a4b8c113 light: add todos about -fence 2016-06-09 01:48:47 -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 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 b33cd040f7 light: add a sanity check for writing lightmaps for skip/trigger/sky faces. still needs to be fixed. 2016-06-07 17:42:53 -06:00
Eric Wasylishen d1c4470fc1 light: add "-novis" to help listing 2016-06-04 22:22:22 -06:00
Eric Wasylishen 285e0f84af light: add warning for "_project_texture" missing texture 2016-06-01 20:35:55 -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 2d0ede48cf light: FixLightOnFace: only check against model 0, otherwise triggers etc. are wrongly considered to block lights 2016-05-31 18:18:25 -06:00
Eric Wasylishen 5303dae5fc light: CalcPoints: reduce distance to 0.25 2016-05-30 20:53:52 -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 0b8ec4d169 light: CalcPoints: increase distance to pull back from obstructions to from 0.1 to 1.0.
fixes room corner seams on calcpointstest.map
2016-05-29 17:16:11 -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 0b5786ebef light: remove hack for lights on faces, now that we correct them properly 2016-05-28 15:18:58 -06:00
Eric Wasylishen 329d9ee512 light: correct lights directly on faces 2016-05-28 15:18:11 -06:00
Eric Wasylishen 92a9369bbc light: remove hack for lights directly on faces, was breaking phong shading. 2016-05-28 13:38:12 -06:00
Eric Wasylishen 496fc4d52e light: phong: reduce epsilon used for barycentric coordinates test. fixes interpolation on testphongtjunc.map 2016-05-27 22:06:17 -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 35e92abfcf light: don't cast indirect light in phong/dirtdebug mode 2016-05-27 12:41:30 -06:00
Eric Wasylishen ca0f0448fe light: only allow one debug mode at a time 2016-05-27 12:25:51 -06:00
Eric Wasylishen 7687e4a927 light: fix normal interpolation outside the triangle when there are multiple choices of an edge to search across. 2016-05-21 20:29:17 -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
Eric Wasylishen 55df37941c light: add -bouncecolorscale flag 2016-05-20 12:00:57 -06:00
Eric Wasylishen 4e69914cb2 light: skip dirt on bouncedebug 2016-05-20 02:18:14 -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 8db1f56a20 light: add Lightmap_ClearAll util function 2016-05-19 02:35:17 -06:00
Eric Wasylishen 2c73da0856 light: fix dirtmapping to use interpolated normals 2016-05-15 15:51:51 -06:00
Eric Wasylishen a5356c161c light: bounce: scale bounced light by texture color 2016-05-14 20:51:21 -06:00
Eric Wasylishen 199cba7349 light: few optimizations to bounce code 2016-05-13 23:16:36 -06:00
Eric Wasylishen f967b89cea light: remove broken hitpoint feature of TraceLine 2016-05-11 16:46:51 -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 1ed000cbde light: move DirtTrace to trace.c 2016-05-11 16:16:49 -06:00
Eric Wasylishen b1691cf10a light: don't do bounce lighting when dirtdebug/phongdebug are in use 2016-04-30 01:04:53 -06:00
Eric Wasylishen 5e7e409966 light: bounce: remove some dead code 2016-04-30 01:00:57 -06:00
Eric Wasylishen bd5a15fc82 Revert "light: bounce: handle 0 dist between bounce light and surface point"
This reverts commit d3b6adb955.
2016-04-30 00:59:51 -06:00
Eric Wasylishen d3b6adb955 light: bounce: handle 0 dist between bounce light and surface point 2016-04-30 00:44:01 -06:00
Eric Wasylishen f446ba1ddf light: bounce: use both bounce light normal angle, and receiving surface normal angle to scale bounced light 2016-04-30 00:26:08 -06:00
Eric Wasylishen a283a623ae light: bounce: refactoring 2016-04-30 00:24:50 -06:00