Eric Wasylishen
a183be75d7
light: minor tidying of CalcPoints ifdef
2017-02-24 14:11:47 -07:00
Eric Wasylishen
278c5f5b2b
light: LightFace_OccludedDebug: clear occluded flag in this debug mode
2017-02-24 00:24:29 -07:00
Eric Wasylishen
29c7f79a0b
light: misc stuff
2017-02-23 20:53:10 -07:00
Eric Wasylishen
d88581e2da
light: add GLM_ProjectPointOntoPlane
2017-02-22 01:40:58 -07:00
Eric Wasylishen
64e8090326
light: contributing faces: don't contribute if angle btn faces is 90 degrees or more
2017-02-22 01:40:53 -07:00
Eric Wasylishen
cafadddb62
light: expose faceextents_t in header
2017-02-21 22:59:40 -07:00
Eric Wasylishen
64dba663e0
light: faceextents_t: add another conversion
2017-02-21 21:19:15 -07:00
Eric Wasylishen
8ab0ef9687
mathlib: redo bilinear interpolation
2017-02-21 21:19:07 -07:00
Eric Wasylishen
b0662de90f
light: add some stuff to faceextents_t
2017-02-21 21:18:27 -07:00
Eric Wasylishen
8067e0fa45
mathlib: add PointsAlongLine
2017-02-21 21:18:16 -07:00
Eric Wasylishen
b31ae5d243
light: ltface.cc: use glm namespace
2017-02-20 14:39:56 -07:00
Eric Wasylishen
6c9f9f9727
light: fix minlight handling
2017-02-20 14:37:46 -07:00
Eric Wasylishen
c17c33a71c
light: rewrite blur
2017-02-20 14:37:41 -07:00
Eric Wasylishen
7c0e8f9b24
light: fix -extra4 downsampling to use occlusion values
2017-02-20 14:37:36 -07:00
Eric Wasylishen
418d83cbeb
light: skip raytracing occluded points
2017-02-20 14:36:50 -07:00
Eric Wasylishen
f890d739d3
light: improving faceextents_t
2017-02-20 14:32:37 -07:00
Eric Wasylishen
d40c6b9912
mathlib: add bilinear interpolation
2017-02-20 14:32:31 -07:00
Eric Wasylishen
21fa5c5949
Revert "light: rewrite -debugface picking code"
...
This reverts commit 20c92fc676 .
2017-02-16 15:55:13 -07:00
Eric Wasylishen
ea9c456367
Revert "light: Face_Pick: make more lenient"
...
This reverts commit 5292728fe3 .
2017-02-16 15:55:01 -07:00
Eric Wasylishen
d811d33d22
light: add slightly concave poly test
2017-02-16 15:47:45 -07:00
Eric Wasylishen
7294f06ccc
light: disable EdgePlanesOfNonConvexPoly test for now
2017-02-16 15:47:26 -07:00
Eric Wasylishen
6ea56b987a
light: fix mangle_from_vec
2017-02-15 00:14:51 -07:00
Eric Wasylishen
365c143039
light: use mangle_from_vec in CalcPoints_Debug to dump point normal
2017-02-14 23:52:39 -07:00
Eric Wasylishen
77baa2b90b
light: fix mangle_from_vec test epsilon
2017-02-14 23:50:05 -07:00
Eric Wasylishen
5292728fe3
light: Face_Pick: make more lenient
2017-02-14 23:46:10 -07:00
Eric Wasylishen
6f66473836
light: add mangle_from_vec
2017-02-14 23:45:38 -07:00
Eric Wasylishen
e8e5df0f6e
light: SetupContributingFaces_R: handle a type of invalid face that showed up in ad_swampy.bsp
2017-02-14 20:52:27 -07:00
Eric Wasylishen
bef9dd63d2
common: GLM_MakeInwardFacingEdgePlanes: handle non-convex poly
2017-02-14 20:51:36 -07:00
Eric Wasylishen
05e144a5ca
light: MakeEdgeToFaceMap: handle invalid faces with repeating vertices
2017-02-14 20:51:31 -07:00
Eric Wasylishen
20c92fc676
light: rewrite -debugface picking code
2017-02-13 13:33:11 -07:00
Eric Wasylishen
2a17b4bccf
build fix
2017-02-12 11:54:52 -07:00
Eric Wasylishen
3a20d5410b
common: add shrink and clip poly funcs
2017-02-12 00:20:38 -07:00
Eric Wasylishen
7300aacdff
light: Add -debugoccluded
2017-02-11 22:22:26 -07:00
Eric Wasylishen
3c86c3d707
light: fix SetupContributingFaces_R not working on non-phong shaded faces that share a plane
2017-02-11 16:00:10 -07:00
Eric Wasylishen
1957fb1489
light: expose WorldToTexCoord_HighPrecision() in header
2017-02-11 15:45:50 -07:00
Eric Wasylishen
69ebb0c7a9
light: tidy WorldToTexSpace
2017-02-11 15:45:45 -07:00
Eric Wasylishen
5fe4f23371
light: add a debug mode for showing contributing faces
2017-02-11 15:45:30 -07:00
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
6f72ab5eda
light: CalcPoints_Debug: log 'occluded' state
2017-02-10 15:54:35 -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
57d8ed77ea
light: CalcPoints: call SetupContributingFaces
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
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
b1fdca16c7
light: helpers for gamma correct downscaling (unused)
2017-02-08 16:53:20 -07:00
Eric Wasylishen
c441ddb884
light: factor out lightmap resampling
2017-02-08 15:03:24 -07:00
Eric Wasylishen
bc2d734e9a
light: move Lightmap_Soften into WriteLightmaps
2017-02-08 02:23:21 -07:00
Eric Wasylishen
089819d672
light: tweak .ppm dump code
2017-02-07 20:52:17 -07:00
Eric Wasylishen
4da0a70ab6
light: refactor box filtering code a bit
2017-02-07 20:51:57 -07:00
Eric Wasylishen
ea39ce6576
light: move negative value clamping to LightFace_ScaleAndClamp
2017-02-07 20:33:43 -07:00
Eric Wasylishen
613d75ea70
light: debug code for dumping lightmaps to .ppm images
2017-02-07 18:35:29 -07:00
Eric Wasylishen
4582637c78
light: restore Lightmap_ForStyle_ReadOnly
2017-02-07 17:59:16 -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
2dc01b8469
light: windows build fix
2017-02-06 22:04:55 -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
3ad6aab406
light: refactor WriteLightmaps
2017-02-01 14:38:42 -07: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
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
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
4c0194a05f
Revert "Revert "light: CalcPoints: also check submodel traces against the world""
...
This reverts commit c9b9ae568c .
2016-11-20 00:51:20 -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
d0d7a424d3
light: change isnan() to std::isnan()
...
should fix https://github.com/ericwa/tyrutils-ericw/issues/118 (Ubuntu 16.04 build)
2016-11-14 11:38:32 -07:00
Eric Wasylishen
c9b9ae568c
Revert "light: CalcPoints: also check submodel traces against the world"
...
This reverts commit 1cca79710c .
2016-11-06 23:43:07 -07:00
Eric Wasylishen
6a99a70773
light: liquid faces on shadow casting bmodels should cast shadows
2016-11-04 23:42:58 -06:00
Eric Wasylishen
1cca79710c
light: CalcPoints: also check submodel traces against the world
...
fixes https://github.com/ericwa/tyrutils-ericw/issues/115
2016-11-04 02:14:05 -06:00
Eric Wasylishen
dfcbfe5be1
light: fix invalid assertion (with glass, final ray color can be darker than initial)
2016-11-04 01:34:36 -06:00
Eric Wasylishen
11304cf059
light: hack around invalid normals in bounce lighting patches.. needs further investigation
2016-11-04 01:26:48 -06:00
Eric Wasylishen
8284eba493
light: hack to fix bounce + glass shadows (not implemented, but don't crash)
2016-11-04 01:08:03 -06: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
4f530fadb9
light: tweak the glass tinting again
2016-11-03 18:11:58 -06:00
Eric Wasylishen
a4afa749b7
light: tweak glass interaction with light
2016-11-03 17:24:27 -06:00
Eric Wasylishen
3b65ad592a
light: glass: only pick up the glass color when the ray exits the glass
2016-11-03 15:21:29 -06:00
Eric Wasylishen
91fcfe5b9a
light: use glass texture colors to tint rays
2016-11-03 02:26:53 -06:00
Eric Wasylishen
3d98dd70de
light: first draft of semi-opaque shadows for glass
2016-11-03 01:52:00 -06:00
Eric Wasylishen
6bd8864ff4
light: refactor LightFace_Sky
2016-11-03 01:44:17 -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
e5901dfee6
light: ensure modelinfo settings override .texinfo file if they have been set, for _dirt and _minlight
2016-11-02 18:10:59 -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
fab8d87416
light: ensure sky textures are detected case-insensitive
2016-10-17 17:47:08 -06:00
Eric Wasylishen
d9bb0be32e
light: move Face_Contents to common
2016-10-17 17:37:28 -06:00
Eric Wasylishen
299e68e7e5
build: support Ubuntu 14.04
2016-09-23 15:13:58 -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
048e19fbf2
build: make building on linux with embree easier
2016-09-23 00:06:21 -06:00
Eric Wasylishen
57834c438b
light: add "_lightignore" model key
2016-09-20 16:15:12 -06:00
Eric Wasylishen
c615839abb
light: don't save lightmaps where the maximum brightness is < 1
2016-09-20 00:17:12 -06:00
Eric Wasylishen
46a56df19f
light: add -bouncelightsdebug switch to render bounce lights
2016-09-20 00:04:02 -06:00
Eric Wasylishen
1d7fea8486
light: simplify debug mode condition
2016-09-19 22:14:40 -06:00
Eric Wasylishen
9500fd8ebb
light: apply minlight after adding bounce lights
2016-09-19 19:47:53 -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
12f55292f7
light: CheckTargetsMatched: for "targetname with no targetter" warning, allow any key to be the targetter
2016-09-19 16:08:08 -06:00
Eric Wasylishen
05251d9e1a
light: fix "options summary" log header
2016-09-19 14:46:16 -06:00
Eric Wasylishen
4ec0a62ce8
light: CheckEmptyValues: print entity classname and origin
2016-09-19 14:42:04 -06:00
Eric Wasylishen
d4395bc660
light: improved CheckTargets
2016-09-19 14:34:36 -06:00
Eric Wasylishen
63d2bcf91c
light: move empty values check to its own function
2016-09-19 14:28:50 -06:00
Eric Wasylishen
fdb5394cc5
light: remove hack requiring a light to add 1 unit of light to a lightmap, as it can cause artifacts, and it's redundant with -gate
2016-09-19 12:34:32 -06:00
Eric Wasylishen
28bec79830
light: add more fuzz (25%) to the bbox size for vis approximation.
...
Not sure if this is necessary, but fixes a tricky case in lightstest1.map (infinite reach light casting a sharp shadow across a large room)
2016-09-19 12:27:02 -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
8dab875adc
light: CheckTargets: also check for unmatched targetnames
2016-09-18 17:30:21 -06:00
Eric Wasylishen
18f0b89ee6
light: build fix for MSVC
2016-09-18 15:50:31 -06:00
Eric Wasylishen
0786b513a2
light: fix build of 073ede98c7
2016-09-18 15:46:42 -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
a2dc35a91f
light: fix debug logging
2016-09-18 03:03:29 -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
f5d347a18d
light: always assign "style" if targetname is set on a light
2016-09-17 17:48:11 -06:00
Eric Wasylishen
1a74834221
light: never receive dirtmapping on lit liquids
2016-09-16 11:37:04 -06:00
Eric Wasylishen
c7d210dc3a
light: special case support for skip-textured bmodels in the embree backend.
...
It only supports bmodels where all the faces are skipped
2016-09-10 18:32:22 -06:00
Eric Wasylishen
d7ba0330a6
light: restore "unmatched target" warning
2016-09-10 10:10:06 -06:00
Eric Wasylishen
bcddaf10dd
docs: update
2016-09-09 13:30:36 -06:00
Eric Wasylishen
687b1b20f6
light: bsp backend: fix and simplify Face_Contents to only look at texture names. it was broken when -splitspecial was used.
2016-09-09 13:04:53 -06:00
Eric Wasylishen
2bab853ca4
light: don't add styled lights to bounce calculation
2016-09-08 23:53:15 -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
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
08e1c1ce69
light: apply dirt to regular lights
2016-09-08 17:24:28 -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
272995765b
light: warn about empty key/values
2016-09-07 20:32:59 -06:00
Eric Wasylishen
66184a3849
light: CalcualateVertexNormals: skip degenerate faces
2016-09-07 15:12:19 -06:00
Eric Wasylishen
9111d8df9f
light: log embree version
2016-09-02 14:59:43 -06:00
Eric Wasylishen
e06556edfd
build: run tests on CI servers
2016-08-15 23:28:36 -06:00
Eric Wasylishen
5e9b62dc8b
light: add "testlight" target
2016-08-15 21:18:14 -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
e2f407a0e7
light: refactor GetDirectLighting
2016-08-12 12:00:33 -06:00
Eric Wasylishen
cc0d1f6b76
light: restore normalmap contribution in LightFace_Entity
2016-08-12 11:55:35 -06:00
Eric Wasylishen
ed43b29489
light: store normal contribution in ray stream
2016-08-12 11:51:27 -06:00
Eric Wasylishen
8ca5fafffc
light: some refactoring
2016-08-11 15:44:43 -06:00
Eric Wasylishen
4f58f61aad
light: GetLightDist: use entity->getFormula()
2016-08-11 14:37:26 -06:00
Eric Wasylishen
b849a79c3f
light: move GetDir to mathlib
2016-08-11 14:16:23 -06:00
Eric Wasylishen
9f607b858b
light: Add GetLightDist function
2016-08-10 12:22:41 -06:00
Eric Wasylishen
28b034a172
light: drop visdata support, no longer needed
2016-08-10 00:49:41 -06:00
Eric Wasylishen
3d19354514
light: EstimateVisibleBoundsAtPoint: increase to 1024 samples to fix lightstest1.map.
...
remove randomness. only expand AABB by 1% down from 10%, since using 1024 samples now, bbox will be closer to the actual one.
2016-08-09 23:31:48 -06:00
Eric Wasylishen
f3a1700d13
light: scale and clamp before smoothing, downscaling. fixes https://github.com/ericwa/tyrutils-ericw/issues/15
2016-08-09 22:19:11 -06:00
Eric Wasylishen
125f35e35f
light: coding style fixes
2016-08-09 21:47:20 -06:00
Eric Wasylishen
f857ab5820
light: remove redundant message
2016-08-09 21:19:24 -06:00
Eric Wasylishen
59f1ef9a1e
light: bounce: only save style 0 lightmap if some traces hit
2016-08-09 20:55:28 -06:00
Eric Wasylishen
af2f68c036
light: culling for local minlights
2016-08-09 19:37:52 -06:00
Eric Wasylishen
df8669a5fe
light: record stats for local minlight ents
2016-08-09 19:37:40 -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
9340ce223a
build: clean up request for C++11. require cmake 3.1 (which introduced CMAKE_CXX_STANDARD)
2016-08-09 16:00:09 -06:00
Eric Wasylishen
7d5067bddd
light: Add stats
2016-08-09 01:15:26 -06:00
Eric Wasylishen
3d5ab0db68
light: use LightSample_Brightness
2016-08-09 00:41:49 -06:00
Eric Wasylishen
3f573bd276
light: fix sign error in sunlight2 positioning
2016-08-08 20:36:31 -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
9004bed24e
light: don't add 0 brightness suns
2016-08-07 16:33:13 -06:00
Eric Wasylishen
5e6f2220e8
light: quick hack fix of spotlights in bounce mode
2016-08-06 17:31:39 -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
292d35879b
build: restore mingw support
2016-08-05 04:07:01 -04: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
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
cbd7290e3c
light: log when writing litfile
2016-07-31 17:54:00 -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
707ae70fe1
light: don't use c99 designated initializers (msvc compat)
2016-07-30 00:47:43 -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
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
3d85f49adb
light: entities: write null byte at the end of bsp->dentdata
2016-07-29 00:21:12 -06:00
Eric Wasylishen
7edf27de0c
build: fix escaping in light/CMakeLists.txt
2016-07-27 19:21:53 -06:00
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