Jonathan
f089c5d145
fix bounced lighting
...
(cherry picked from commit 0baa788d7e )
2022-07-03 14:21:25 -04:00
Jonathan
5b8fbb660e
fix some weird maps with zero area faces trying to bounce
...
(cherry picked from commit b43e80911e )
2022-07-03 14:21:25 -04:00
Eric Wasylishen
40bba01b21
qbsp: brushbsp.cc import from qbsp3
2022-07-03 01:22:09 -06:00
Jonathan
cc16b886a4
move "points" instead of copying
...
pre-offset points
remove double calculation for pos/dir in lightface (didn't seem to have any visual effect on the output)
2022-07-02 08:49:34 -04:00
Jonathan
022676fe63
fix AABB accumulation
2022-07-02 08:49:30 -04:00
Jonathan
feaa15b712
only generate bounds if rays is enabled
...
don't lightmap sky again
2022-07-02 08:49:26 -04:00
Jonathan
cb4a1ad8a3
re-add nodraw/sky warning
2022-06-30 15:12:42 -04:00
Jonathan
74c2bb3385
Catch2 to 3.x again?
...
fix merge issue
2022-06-30 05:45:23 -04:00
Jonathan
f7016d1af0
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-06-30 05:24:53 -04:00
Jonathan
9f734ff976
Merge branch 'type-cleanup' into brushbsp
...
# Conflicts:
# common/bspfile.cc
# include/common/bspfile.hh
# light/trace.cc
2022-06-30 05:23:05 -04:00
Eric Wasylishen
862d9bd5f2
testqbsp: add q1_clip_func_wall
...
Ensure submodels that are all "clip" get bounds set correctly
2022-06-30 00:53:02 -06:00
Jonathan
ee65e46d0a
init palette for Q2
2022-06-30 02:43:25 -04:00
Eric Wasylishen
2127209955
qbsp: add CreateBrushWindings from qbsp3
2022-06-30 00:31:42 -06:00
Jonathan
410106ff90
fix uninitialized memory
2022-06-29 14:27:00 -04:00
Jonathan
03ee5c52e8
add an entry point for specifically loading meta-only file formats, like .wal; used for discerning replacements from their source material (since replacements are often larger than the default, we need the scale info)
...
add a new meta format, which is just a JSON representation of the metadata contained in a .wal
simplify texture loading in `light`
fix `light` not handling replacement textures very well
string_iequals take string_view like the others
move averageColor to be alongside pixel data, where it belongs
2022-06-29 12:59:33 -04:00
Jonathan
decee3ac83
Merge branch 'type-cleanup' into brushbsp
2022-06-28 10:35:29 -04:00
Jonathan
aac5027ec6
simplify texture load
2022-06-28 10:35:17 -04:00
Jonathan
292d5afb5e
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-06-28 06:08:04 -04:00
Jonathan
c1dc3cb7d8
Merge branch 'type-cleanup' into brushbsp
...
# Conflicts:
# include/common/bspfile.hh
2022-06-28 04:13:26 -04:00
Eric Wasylishen
1693bb3877
qbsp: side_t doesn't need sphere culling
2022-06-28 02:01:41 -06:00
Eric Wasylishen
b21e245d99
qbsp: surface.cc -> faces.cc
2022-06-28 00:23:47 -06:00
Eric Wasylishen
c64b869248
testqbsp: make winding test [.releaseonly] as it crashes on msvc debug builds
2022-06-28 00:21:59 -06:00
Eric Wasylishen
eb1f7acc02
qbsp: move PruneNodes to tree.cc for qbsp3 alignment
2022-06-28 00:06:18 -06:00
Jonathan
44c50717c3
move generic image loading routine to `img`
...
move light-specific "load textures from BSP" routine to light
fix a couple bugs with external wad textures (there should always be at least a 40-byte miptex in there)
light can now load external textures
move -paths to common settings
fix bug with missing texture not filling miptex name
2022-06-28 01:37:12 -04:00
Eric Wasylishen
29a622d106
testqbsp: use -noverbose by default
2022-06-27 22:44:08 -06:00
Eric Wasylishen
7439fc30db
testqbsp: fix absolute path in q1_wad_external
2022-06-27 22:40:38 -06:00
Jonathan
c23b7d2ec9
allow Quake-likes to load textures similarly to Q2 (finding best place to load them from)
...
allow Quake and Q2 to handle other texture formats (mainly just TGA for now)
2022-06-27 11:30:28 -04:00
Jonathan
bf1cb56e5a
fix build
...
add setting to control file priority
2022-06-27 10:41:24 -04:00
Jonathan
59bff81e9d
tests for new WAD stuff
2022-06-27 08:14:30 -04:00
Jonathan
26608c1b37
Merge branch 'type-cleanup' into brushbsp
...
# Conflicts:
# common/bspfile.cc
# common/bspinfo.cc
2022-06-27 08:14:03 -04:00
Jonathan
3b777a05a9
remove unnecessary init_palettes
2022-06-27 08:13:32 -04:00
Jonathan
732621c59a
fix bugs in miptex writing
...
clear FS when loading filesystem again (for tests mainly)
move img::load_palette to where it is in brushbsp
2022-06-27 08:13:04 -04:00
Jonathan
a7662a9c9b
fix noclipfaces being inverted from type-cleanup
2022-06-27 06:56:20 -04:00
Jonathan
cf04f644e0
Merge branch 'type-cleanup' into brushbsp
...
# Conflicts:
# common/bspinfo.cc
# include/common/bspfile.hh
# include/qbsp/map.hh
# include/qbsp/wad.hh
# qbsp/wad.cc
2022-06-27 06:44:45 -04:00
Jonathan
ba7c18fd35
Merge branch 'type-cleanup' of https://github.com/Paril/ericw-tools into type-cleanup
2022-06-27 03:58:41 -04:00
Jonathan
510023e089
step 1 of finishing the rewrite I started of the image subsystems.
...
- for Quake-likes, WADs will be added as file system archives directly when the first brush is encountered since the wad key is ready to go by that point.
- after loading the .map and before constructing the BSP, what I call secondary textures (animation frames for Quake-likes) are added to the list, and the BSP's miptex data is filled.
- BSP miptex data is now opaque to the BSP process; the BSP simply copies the raw miptex information from the input. This simplifies the BSP structures and reading/writing routines.
- the img subsystem supports reading from raw miptexes now, although in practice this only happens for Quake-likes atm
- instead of a "wal cache", maps now have a "meta cache" which stores the metadata information for all games instead of just Quake II
- texture meta can now be ref'd out rather than needing to be copied every time (mainly only a gain for the std::string)
- wad.cc/wad.hh is gone; wads are now pushed into the filesystem archive
- fixed broken wad_archive
- fs subsystem iterated on a little bit; supports marking archives as external (only used for wads currently; see `LoadTextureData`)
- load_tga has better error handling
- add in foot-gun protection to the BSP readers; now they assert on failure to read instead of silently propagating that error throughout the rest of the process
- bsputil uses img stuff now, so it should handle palettes better
2022-06-27 03:58:23 -04:00
Eric Wasylishen
c7111cc99e
qbsp: move FloodAreas to portals.cc for parity with qbsp3
2022-06-27 01:32:34 -06:00
Eric Wasylishen
e660182c37
testqbsp: readd "-nopercent" as test output is too verbose without
2022-06-27 01:20:16 -06:00
Eric Wasylishen
92dd54c0b1
bspfile: fix is_any_solid() implementation to be just (contents.native & Q2_CONTENTS_SOLID)
2022-06-27 01:19:31 -06:00
Eric Wasylishen
5624f7012a
qbsp: moving PortalThru->Portal_VisFlood, Portal_EntityFlood to portals.cc for qbsp3 parity
...
also fixes to both to match qbsp3
2022-06-27 01:13:21 -06:00
Eric Wasylishen
4c2111bfd3
testqbsp: re-enable base1.map test as well as dm1.map (disabled by default as it's too slow on debug builds)
2022-06-27 00:33:04 -06:00
Eric Wasylishen
95273ec189
ci: don't fail on empty vis test suite
2022-06-26 14:27:10 -06:00
Eric Wasylishen
22f0def4b1
update Catch2 to v3.0.1
2022-06-26 13:21:29 -06:00
Jonathan
2264de71a2
Revert "very slight speedup (~3% improvement) on normalize; don't sqrt if we don't need to (rare), and use multiplication instead of division"
...
This reverts commit 8fe525f5b2 .
2022-06-26 01:24:47 -04:00
Jonathan
00485553f3
/ should be *
2022-06-26 01:22:03 -04:00
Jonathan
033a84cac8
cache anything related to triangle-face info in a single struct that we access per ray
2022-06-25 22:22:24 -04:00
Jonathan
8fe525f5b2
very slight speedup (~3% improvement) on normalize; don't sqrt if we don't need to (rare), and use multiplication instead of division
2022-06-25 20:56:08 -04:00
Jonathan
a4c304272a
use floats for dealing with ray info, for consistency (and to avoid a bunch of float->double casts)
...
use raydir from hit point rather than calculating it twice
2022-06-25 04:47:26 -04:00
Jonathan
062ff86a0d
cache texture pointers, saving expensive lookups per ray
2022-06-25 04:28:00 -04:00
Jonathan
b4583908af
slight speed improvement; these weren't inlining properly, they do now though
2022-06-25 04:20:24 -04:00