Commit Graph

380 Commits

Author SHA1 Message Date
Jonathan 0c827208ec Allow `-subdivide 0` to turn off subdivision
imglib now lives in common
fs 'load' split into two functions, where and load. the former allows you to query for and return archive & path for a given file, whereas the latter handles that for you.
use log verbose in light rather than own verbose flag
2021-11-21 15:08:02 -05:00
Jonathan 8cadf06d81 New FS!
First FS test: use it for decompile for Q2 to prevent unnecessary suffixes
2021-11-05 19:25:37 -04:00
Jonathan 0e361f9323 Support for Q2BSP decompilation
- there's still a couple failure cases - specifically base1 in the outdoor area has a side that wasn't able to match to a face
- the clip brush at the start of base1 gets cut into a bunch of pieces because of the whole "check for texinfo, compare and split into multiple pieces" thing, but I'm pretty sure it's just one single brush - we need to ignore the splitting thing on clip brushes since they don't care about texture
- triggers don't pull in a temp texture
- origin brushes?
2021-10-27 17:56:56 -04:00
Jonathan 443be60a74 Compress texinfo a bit 2021-10-22 03:50:15 -04:00
Jonathan a21be0362c replace VectorCompare, CrossProduct, DotProduct
qv::dot handles inputs a bit more gracefully now
plane::distance_to for distance checks, and dplane has the fast version
2021-10-21 23:25:19 -04:00
Jonathan cb3c81aaf8 vec3_t gonedy 2021-10-21 20:21:28 -04:00
Jonathan 95b47db922 More qmat/qvec where appropriate
Add a json.hh file which includes common JSON serialization types
surfflags_t::extended uses booleans instead of a bitflag for simplicity
JSON serialization for surfflags
2021-10-19 21:15:00 -04:00
Jonathan a7de4bdae2 Remove unused thingies
Use qplane3 where we can
2021-10-17 06:24:02 -04:00
Jonathan fd18fc154c Fix various warnings by testing a clang-cl compile 2021-10-12 14:39:15 -04:00
Jonathan e6fd6b653e A few more vec3_t -> qvec
qmat follows other type conventions (T, N, M) and is annotated differently so it's not as confusing to follow
Removed qmat::operator[] - it's not clear from calling it that it's column-major (as evidenced by the comments needing to explicitly make clear at call sites that it's column, not row), so I've collapsed them into two separate functions that explicitly fetch either a column or a row. This also ties them nicely into qvec<N>.
2021-10-12 12:03:59 -04:00
Jonathan 01b8abf93c Removed a lot of unused functions
Moved vector-related operations from mathlib to qvec, moved a few into qv::
Use clamp/max/min directly instead of #define'ing them
Move a few single-use functions directly above their usages
2021-10-10 14:04:09 -04:00
Jonathan 1b1679fa22 normals are now a special tuple-ish type, so that we can calculate tangents and bitangents for Q2RTX if requested (currently it always does it, but we can fix that later)
always emit texinfo for q2 brush sides
2021-10-08 14:17:48 -04:00
Jonathan 16d3bcc7c7 Revert "clang /macOS: un-constexpr things that were erroring"
This reverts commit 33745c3cb8.
Value-initialize v which removes the need for the bottom `if constexpr` expression.
2021-10-06 03:42:46 -04:00
Eric Wasylishen 33745c3cb8 clang /macOS: un-constexpr things that were erroring
neither clang nor gcc like the qvec(Args..) constructor
being constexpr.

GCC's error says:
error: member ‘qvec<3, double>::v’ must be initialized by mem-initializer in ‘constexpr’ constructor
2021-10-05 23:18:52 -06:00
Jonathan 52839d4e7f Run clang-format pass 2021-10-05 15:54:06 -04:00
Jonathan 0833d84a7a Calculate tangents and bitangents (need to clean this up)
Implement formatters for qvec
Add -nolighting, which skips all non-lightstyled lights
2021-10-05 01:07:13 -04:00
Jonathan 037c587352 Merge remote-tracking branch 'remotes/origin/qbsp-contentflags' into type-cleanup
# Conflicts:
#	bspinfo/bspinfo.cc
#	include/common/bspfile.hh
#	include/light/light.hh
#	include/light/trace.hh
#	light/light.cc
#	light/ltface.cc
#	light/trace.cc
#	qbsp/brush.cc
#	qbsp/csg4.cc
#	qbsp/outside.cc
#	qbsp/qbsp.cc
2021-10-03 13:08:50 -04:00
Jonathan ae4512da2c BSPX structurization and cleanup
Some more vec3_t removals
A bunch of float -> vec_t in light
Simplified construction of lockables
mapdata_t writes directly to an mbsp instead of vector copies
2021-10-03 12:16:13 -04:00
Eric Wasylishen 2fc1e9099a light: remove dead / non-working code for non-embree light tracing 2021-10-02 21:12:12 -06:00
Jonathan 792951792c some more cleanup 2021-10-02 05:56:45 -04:00
Jonathan 9d828d2085 Structured texture data!
Move vis decompress/compress back to vis since phs is handled there now too
Fix missing textures in Q1BSP
Comment areaportaling for now
2021-09-30 11:33:04 -04:00
Jonathan a6f6cc2d15 qvec now has an empty default initializer, for speed purposes; fixed up places that relied on this behavior
simplified constructor for qvec(T...) that uses fold expressions
simplified rgba_miptex_t
fixed a lot of broken winding_base_t behavior
merged all winding types into winding_base_t
removed now-empty files
2021-09-27 20:44:15 -04:00
Jonathan 87d31e6d4f A lot of type-y stuff here:
- bsp store vectors now
- vis stored in a way that is compatible with both Q2 and Q1
- binary reading of stuff, so swapping is done at load time now
- vis cleanup, although there's still a lot of raw long modification that should get simplified later
2021-09-25 23:58:02 -04:00
Jonathan 6ff2d67d12 major C++-esque change to BSP conversion:
- main mbsp types are declared first in the files, and types that were single-member are now not structs
- conversion is handled by the sub-types themselves. Currently no diagnostic for *what* members overflow, but, overflow is handled via thrown exceptions on all overflowable members
- aabb type is used where appropriate now, simplifying a few areas
2021-09-22 17:30:46 -04:00
Jonathan 49fd62b9f3 Lotta more file stuff. Have to think about fscanf though. 2021-09-19 22:20:39 -04:00
Jonathan 326626f127 Remove some old stuff
Cleanup/rework of logging system. I'm not too happy about it still, but, it's at least a bit easier to follow now.
Started cleanup of file-related stuff.
2021-09-19 18:17:28 -04:00
Jonathan 17606fde4b Use variant instead of having all BSP types allocated at once (even though they are smol)
Move ownership of pointers to the bsp structures themselves for now.
2021-09-16 11:52:37 -04:00
Jonathan e8bd554cc0 winding_t is now a C++ type - a hybrid stack/heap array.
In preparation for converting all of the vec_t[3] to qvec's, the Vector routines are now templated and work with any type that provides indexing operators.
Polylib.cc is gone, since this all needs to be in header now
qvec can now implicitly convert from T[N]
constexpr where appropriate
static inline -> inline
side_t is now an enum, moved into mathlib
2021-09-16 03:10:51 -04:00
Jonathan 1dd4df1b20 calloc/malloc/free -> new/new/delete (except for specific scenarios) 2021-09-14 11:39:12 -04:00
Jonathan 7f8d2cfb49 Fix single line functions 2021-09-14 02:56:44 -04:00
Jonathan 4e7542b111 Clang format pass
typedef -> using
include guards -> pragma once
typedef struct x { } y; -> struct y { }
some fixes to extremely old code that shouldn't be required any more
2021-09-14 02:32:26 -04:00
Jonathan 00efa6e67d Fix operator<
Introduce gamedef, to reduce rewriting of data in bspversions
fix name of needs_subdivision
include value in texinfo, in prep for Q2
2021-09-07 01:41:32 -04:00
Jonathan 437459a4dd Finish using game everywhere 2021-09-06 18:09:13 -04:00
Jonathan 3bc9b1b0f8 Instead of directly comparing BSP version pointers just for game type, I compacted quake2/hexen2 into a single enum.
Feature check in bspver for colored lightmaps, which replaces the many "version == q2 || version == qbism || version == hl".
2021-09-06 17:13:37 -04:00
Jonathan 8fd1d89b8d Fix double-delete
Fix typo
2021-09-05 17:39:17 -04:00
Jonathan dad0e61f63 Fix for texinfo/miptex searching routines
surf flags now use the "native + extended" format that will eventually be used for brush contents. Q1 output seems identical, haven't tested Q2 yet.
2021-09-05 16:56:29 -04:00
Jonathan eaa86c71c6
Q2BSP + QBSP (#313)
* Add QBSP - the BSP2-esque variant to Q2BSP - to bspinfo, and all of its accompanying structures.

* pass around ident, since Q2 needs it - admittedly it's a bit ugly, but it works for now.
conversion for QBSP

* Fix light

* _qbsp_ -> _qbism_

* Introduced bspversion_t, a struct that holds pertinent information about different BSP versions and also acts as a tagged pointer type for direct comparisons. This makes a lot of code paths simpler. I'm not entirely set on the wordings or usages yet, and maybe we can stuff boolean flags inside of them for different behaviors (for instance Q2, QBism and HL would have the "colored lightmap" boolean set to true, which replaces the check-for-all-three in the lightmapper)
Swapped arguments to ConvertBSPFormat to have the conversion target last instead of first
Finished rename of qbsp -> qbism
Tested:
 - bspinfo on various BSPs I had laying around (Q1, Q2, Qbism)
 - bsputil converting between Q2 and Qbism, and that they loaded in engine/roundtripped properly
Not tested:
 - vis/rad on anything major (I still can't run rad due to embree being weird)
 - bsputil conversion of Q1-esque maps
2021-08-23 09:56:33 -06:00
Eric Wasylishen b5fcdec19e cleanup: remove "byte" typedef 2021-02-07 14:02:35 -07:00
Eric Wasylishen 3b629f3ce9 light: fix q2 lightstyles 2021-01-01 00:14:52 -07:00
Eric Wasylishen d8b30c1080 light: don't throw an error on -v (passed by quark) 2020-12-29 16:40:09 -07:00
Julian Priestley 1b714108cd
Add ability to set phong in worldspawn #267 (#305) 2020-11-30 00:42:42 -07:00
Eric Wasylishen b35cb8eb7e light: fixes for bjptools skip faces (which have no associated model) 2020-08-20 12:08:46 -06:00
Eric Wasylishen 03ed0697a4 light: add -litonly option for re-lighting a bsp without modifying it 2020-08-03 00:40:13 -06:00
Eric Wasylishen 22469857f0 light: rename new -light flag to -radlights, because it was clobbering
the existing -light flag for setting minlight
2019-12-11 01:17:53 -07:00
Eric Wasylishen b132152891 light: allow starting assigning switchable styles before default of 32 2019-10-31 00:40:23 -06:00
Shpoike 89365949bc Squashed commit of the following:
commit 8ca122916d
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 20:54:23 2019 -0600

    fix linker error (radlights is in 2 .cpp files)

commit 8f06fc9c8d
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 20:53:57 2019 -0600

    add clarification comment

commit 038a553fb0
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 20:30:27 2019 -0600

    fix tests compilation

commit 02e94ec507
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 19:59:25 2019 -0600

    hlbsp: use q_snprintf

commit 669a5a7911
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 19:56:21 2019 -0600

    Reformat

commit 6653760982
Merge: 347a455 ac3553c
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 19:28:06 2019 -0600

    Merge remote-tracking branch 'origin/master' into hlbsp

    # Conflicts:
    #	include/qbsp/qbsp.hh

commit 347a455102
Author: Shpoike <Shpoike@users.noreply.github.com>
Date:   Thu Mar 28 02:18:16 2019 +0000

    Misc HLBSP tweaks

    Added support for multiple -wadpath args.
    Added -xwadpath (for eg valve/*.wad to avoid bloat/license issues).
    Reworked hint brushes - the non-hint surfaces can use any name, just so long as they're not 'hint', for compat with zhlt.
    Support 'bevel' and 'null' textures for compat with zhlt.

commit 7fb22c7367
Author: Shpoike <Shpoike@users.noreply.github.com>
Date:   Thu Mar 28 01:59:42 2019 +0000

    Support for halflife-style .rad surface lights (probably too bright, but the basics work).

commit 2da504fb62
Author: Shpoike <Shpoike@users.noreply.github.com>
Date:   Thu Mar 28 01:56:27 2019 +0000

    Add minus-prefixed textures for halflife's randomised-textures feature, instead of getting crash-to-desktop errors when the map is loaded.

commit 6366199bdb
Author: Shpoike <Shpoike@users.noreply.github.com>
Date:   Thu Mar 21 04:51:24 2019 +0000

    First attempt at hlbsp output.
2019-07-04 21:08:17 -06:00
Eric Wasylishen c6386c8ec0 light: fix format string warnings 2018-07-23 23:12:03 -06:00
MaxED 07447a633e Rewritten parts of surface light logic. Should resemble qrad3 looks a bit more now...
Added "surflightscale", "surflightbouncescale" and "surflightsubdivision" cmdline/worldspawn settings.
Fixed: a face should not be skipped when it has both sky and nodraw texinfo flags.
Fixed some non-windows compilation errors.
2018-05-25 14:59:22 +03:00
MaxED 520ad485a4 Merge branch 'master' of https://github.com/ericwa/ericw-tools into q2-surfacelights 2018-05-08 15:50:45 +03:00
MaxED 0661098bc5 Quake 2 support: area lights, palette/texture loading, transparent/sky/fence face flags. 2018-05-08 15:50:01 +03:00
MaxED 00e60f923e Q2 doesn't need .lit files (#211)
* Ignore embree

* Don't ignore embree...

* Q2 doesn't need .lit files.
Also fixed a typo.
2018-04-14 15:43:46 -07:00
Eric Wasylishen ebb508c7db light: remove transparent lightmaps spam 2017-12-28 12:50:32 -07:00
Eric Wasylishen 69879b4104 light: add -highlightseams flag 2017-12-05 15:09:34 -07:00
Eric Wasylishen b8b17123d1 light: don't set up bounce lights in debug modes 2017-12-04 23:37:43 -07:00
Eric Wasylishen d9f112a97f light: add -phongdebug_obj flag 2017-11-25 23:12:23 -07:00
Eric Wasylishen 8ce7a682b1 light: add -debugneighbours 2017-11-23 23:45:15 -07:00
Eric Wasylishen b85d627c8f change branding to ericw-tools 2017-10-19 16:35:37 -06:00
Eric Wasylishen 2dc22b7088 common: add loadversion to mbsp_t 2017-10-03 14:17:42 -06:00
Eric Wasylishen dff71edfe9 light: very early q2 support. half of the faces seem to be saved without lightmaps for some reason 2017-10-03 00:33:14 -06:00
Eric Wasylishen 8813d272cb common, light, vis: change from bsp2_t to mbsp_t 2017-10-01 22:32:20 -06:00
Eric Wasylishen c5370b16eb light: update -help text 2017-06-27 19:31:19 -06:00
Eric Wasylishen fef1142808 light: add shadowworldonlylist 2017-06-27 13:13:32 -06:00
Eric Wasylishen 78ed70e2a5 light: modelinfo_t: take bsp param 2017-06-27 12:59:17 -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 902c45c946 all: make VectorCompare take an explicit epsilon 2017-04-26 14:20:45 -06:00
Eric Wasylishen 68b084a6c3 replace glm with qvec 2017-04-24 00:26:49 -06:00
Eric Wasylishen b911c70372 light: do bounce after phong 2017-03-19 14:20:47 -06:00
Eric Wasylishen 880ad3b381 bpsutil, common, light, vis: bounds check bsp->dfaces access 2017-03-18 16:31:52 -06: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 69d5669773 light: delete some dead code 2017-02-27 17:43:56 -07:00
Eric Wasylishen 6c946038ee light: move edgeToFaceMap_t stuff to phong.hh/cc 2017-02-25 14:44:59 -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 5292728fe3 light: Face_Pick: make more lenient 2017-02-14 23:46:10 -07:00
Eric Wasylishen 20c92fc676 light: rewrite -debugface picking code 2017-02-13 13:33:11 -07:00
Eric Wasylishen 7300aacdff light: Add -debugoccluded 2017-02-11 22:22:26 -07:00
Eric Wasylishen 5fe4f23371 light: add a debug mode for showing contributing faces 2017-02-11 15:45:30 -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 bd0556cf22 light: switch to new Face_Centroid 2017-02-09 00:17: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
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 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 91fcfe5b9a light: use glass texture colors to tint rays 2016-11-03 02:26:53 -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 ec37b52807 light: disable "denormals are zero", causing build issues on gcc4.8/linux 2016-09-23 00:43:28 -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 05251d9e1a light: fix "options summary" log header 2016-09-19 14:46:16 -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 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 700e8d089f light: add -verbose option 2016-09-17 23:49:41 -06:00
Eric Wasylishen bcddaf10dd docs: update 2016-09-09 13:30:36 -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 18797f81c0 light: fix for -dirt not implying -minlight_dirt, -sunlight_dirt, -sunlight2_dirt 2016-09-08 15:21:18 -06:00
Eric Wasylishen 66184a3849 light: CalcualateVertexNormals: skip degenerate faces 2016-09-07 15:12:19 -06:00
Eric Wasylishen 5e9b62dc8b light: add "testlight" target 2016-08-15 21:18:14 -06:00
Eric Wasylishen a0f3881698 light: refactor global settings into a class 2016-08-12 18:49:32 -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 7d5067bddd light: Add stats 2016-08-09 01:15:26 -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 7029ed5713 light: clean headers 2016-08-04 16:32:04 -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 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 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 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 9279c86fb5 light: fix -addmin switch (temporary hack) 2016-07-26 16:09:16 -06:00
Eric Wasylishen dc8525dfd2 light: entities: refactor EntDict_VectorForKey 2016-07-26 13:12:57 -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 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 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 f7d3bfbeb3 Merge branch 'stable' 2016-07-20 19:12:23 -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 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 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 34bc864616 light: print elapsed time to 3 decimal places 2016-07-04 21:06:34 -06:00
Eric Wasylishen ec6352a5fe light: option parser: allow negative numbers as option args 2016-06-30 14:14:59 -06:00
Eric Wasylishen 5054ced22d light: fix embree support 2016-06-17 21:21:30 -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 d1c4470fc1 light: add "-novis" to help listing 2016-06-04 22:22:22 -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 280aadfbd8 light: add -debugface option for debugging CalcPoints 2016-05-30 00:15:07 -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 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 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 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 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 6ba2d99782 light: bounce: add some debug code 2016-04-29 22:52:33 -06:00
Eric Wasylishen bd68abad32 light: add LightWorld log header 2016-04-29 22:51:32 -06:00
Eric Wasylishen 99f6451741 light: bounce: don't generate bounce lights for "skip" texture 2016-04-29 22:43:42 -06:00
Eric Wasylishen 72c47c1b56 light: bounce: refactor a bit 2016-04-29 18:11:14 -06:00
Eric Wasylishen 9271a405d1 light: bounce: fix scaling of sunlight brightness 2016-04-29 13:06:40 -06:00
Eric Wasylishen ebf04ceb24 light: bounce: multithread MakeBounceLights 2016-04-29 11:40:10 -06:00
Eric Wasylishen 2bca34265c light: use vis acceleration for bounce lights 2016-04-29 11:27:02 -06:00
Eric Wasylishen 6459e53316 light: bounce: force a "gate" like cutoff for bounce lights 2016-04-28 23:18:49 -06:00