Commit Graph

4217 Commits

Author SHA1 Message Date
Eric Wasylishen 8ab9960ca0 lightpreview: don't crash when vis is run more than once 2023-12-24 17:22:01 -07:00
Eric Wasylishen f47602050b lightpreview: disable "uploaded {} bytes face visibility texture" debug spam 2023-12-24 16:40:44 -07:00
Eric Wasylishen a928b13464 lightpreview: wrap properties panel in a vertical scroll bar 2023-12-24 16:29:11 -07:00
Eric Wasylishen 8db1d32e9f light: fix excessive bouncing with lit water, or _shadow -1
Fixes #397
2023-12-24 00:44:56 -07:00
Eric Wasylishen 6351cc50e6 rename: vec_t -> double 2023-12-23 21:09:16 -07:00
Eric Wasylishen 89908df90f light: fix nan's (fully black lightmap) in some cases when using _surface lights 2023-12-23 18:53:58 -07:00
Eric Wasylishen 73b694a7a8 lightpreview: still output logging::print to console 2023-12-23 18:32:25 -07:00
Eric Wasylishen f0c8d92993 qbsp: add -missing_textures_as_zero_size flag to allow writing 0x0 textures when a texture is missing
this allows us to write the texture name, but it's non-standard.

light: warn when a surface light template doesn't match any faces in the bsp
2023-12-21 00:05:40 -07:00
Maik Merten c62633f1a3 lightpreview: Add arrow-keys and pageUp/pageDown-keys for navigation.
This is useful for keyboards where WASD isn't practical, e.g., AZERTY-layout (France).
2023-12-14 23:15:24 -07:00
Eric Wasylishen 2210fd2701 tests.cc: more build fixes 2023-12-07 23:17:24 -07:00
Eric Wasylishen 3673162f63 fix build errors + test failures from double -> float changes 2023-12-07 23:06:52 -07:00
Jonathan 1eaf2170f8 Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
# Conflicts:
#	light/trace_embree.cc
2023-12-07 14:13:36 -05:00
Jonathan 9ed4f3d042 bunch of double -> float
fix Q2 animated textures
2023-12-07 14:11:46 -05:00
Eric Wasylishen 26588fbf6b tests: skip failing tests until the plane side issue is fixed 2023-12-04 20:25:19 -07:00
Eric Wasylishen e07f76cf75 tests: add a consistency check that face winding order is consistent with plane normal 2023-12-03 15:30:03 -07:00
Eric Wasylishen 05ae8b0d19 tests: remove unneeded may_fail() 2023-12-03 14:31:11 -07:00
Eric Wasylishen e9b9999062 vis: factor out duplicate code 2023-12-03 11:41:36 -07:00
Erika b45871efdb
vis algorithm improvement (2h42 -> 57m on ad_dm5) (#361)
* vis algorithm improvement, new commandline option -targetchecks

* vis: only calculate num_expected_targetchecks if needed

Fixes a bit of performance regression when -targetchecks was added, when running
with -targetchecks 0, apparently due to the cost of all the std::popcount's.

gmsp3v2.bsp, 32 threads:
18s (brushbsp branch 9388d43b1c)
21.1s (vis algorithm improvement)
18.2s (this commit)

* vis: default targetchecks to 0.5

gmsp3v2.bsp vis, 32 threads: 18.2s -> 10.6s

---------

Co-authored-by: Eric Wasylishen <ewasylishen@gmail.com>
2023-12-02 13:41:56 -07:00
Eric Wasylishen 3eb5cb7c64 qbsp: omit func_detail_illusionary from bspx brushlist
also func_illusionary_visblocker

fixes #371

qbsp: fix bspx brushes
2023-11-26 01:17:03 -07:00
Eric Wasylishen b58b976693 tests: add qbsp content type tests 2023-11-26 00:23:41 -07:00
Eric Wasylishen 9388d43b1c lightpreview: add checkbox for skipping light
fixes #394
2023-11-25 19:24:17 -07:00
Eric Wasylishen ad9fd7fc59 common: structured bspxbrushes reading/writing 2023-11-25 17:28:26 -07:00
Eric Wasylishen de0f66c16e lightpreview: fix vis culling with large .bsp's (use buffer textures rather than 1D textures)
disable VisualizeLeafs call as it has crashes that need to be investigated
2023-11-23 19:50:31 -07:00
Jonathan ec452e2291 remove implicit conversion for qplane3 2023-11-19 19:41:58 -05:00
Eric Wasylishen 3a262ad532 build: attempt to fix find_package(embree) call 2023-11-19 14:48:47 -07:00
Eric Wasylishen db0951dc40 light: support embree4 in addition to 3 2023-11-19 14:14:22 -07:00
Eric Wasylishen d5ffbd9d33 qbsp: remove unused type 2023-11-18 23:24:03 -07:00
Eric Wasylishen c77f4ba2dd qbsp: fix misc_external_map + -wrbrushes
- fix world extents not including external maps
- thanks @DaZombieKiller for pointing this out

Fixes #372
2023-11-18 15:14:38 -07:00
Eric Wasylishen f8d432c861 tests: add empty brush test case 2023-11-18 11:22:18 -07:00
iknowsomething 9d4a907281 maputil: fix newlines in "usage" text message 2023-11-18 11:22:18 -07:00
iknowsomething bf50e0d604 qbsp, maputil: add parser location to "brush primitives" error messages 2023-11-18 11:22:18 -07:00
iknowsomething 3969f857cb qbsp: fix crashing on empty brushes 2023-11-18 11:22:18 -07:00
iknowsomething 815e2c2cef qbsp, maputil: fix empty brush format detection (was detected as brush_primitives) 2023-11-18 11:22:18 -07:00
Eric Wasylishen 22ad2f4141 light: cache list of lightsurfs that are actuall emissive
light.exe -visapprox none ad_sepulcher.bsp

45.5s -> 22.7s
2023-11-13 23:35:32 -07:00
Erika c94d44ae61 possible alternate fix for #261
Eric: gmsp3v2.bsp vis: 51.96s -> 18.57s (32 threads)
2023-11-11 15:35:49 -07:00
Eric Wasylishen 64daf7ef75 vis: code style updates 2023-11-11 15:03:00 -07:00
Eric Wasylishen 189cc0586c vis:: restore warnings disabled in 74e1a0f6f0 2023-11-11 14:56:15 -07:00
Eric Wasylishen 5bcb2d4657 vis: remove MAX_PORTALS_ON_LEAF
reduces memory use a bit

gmsp3v2.bsp - 51.96s elapsed
2023-11-11 13:10:01 -07:00
Eric Wasylishen e3c6ace7ad vis: code style updates 2023-11-11 12:59:45 -07:00
Eric Wasylishen 37fc62ca0e vis: remove dead code from header 2023-11-11 12:29:30 -07:00
Eric Wasylishen 8888506821 qbsp: fix -notex option 2023-11-09 23:57:07 -07:00
Eric Wasylishen f3b559ad92 bsputil: --replace-textures prototype 2023-11-09 22:06:40 -07:00
Eric Wasylishen 8845866c00 qvec: use fold expression for qv::dot
seems to help codegen on msvc.

gmsp3v2.bsp vis times: 51.9s , 52.1s
prev commit was 56s
2023-11-09 00:25:31 -07:00
Jonathan 0ea6b0989c clean up vec stuff a bit
constexpr assignment operators
2023-11-09 01:38:17 -05:00
Eric Wasylishen 57d5b22a95 vis: use size_t when accessing vis winding points
no perf change observed
2023-11-08 22:41:38 -07:00
Eric Wasylishen 54e7aadda7 vis: revert alloca() back to stack storage in ClipStackWinding
- the MAX_WINDING limit was already enforced
- on Windows, alloca() generates __chkstk calls which adds a bit of overhead

gmsp3v2 benchmark (32 threads, 2 runs per config):

before (with alloca): 58.8s, 59.1s
this commit (no alloca): 56.2s, 56.4s
2023-11-08 22:31:52 -07:00
Eric Wasylishen f1bf0f546d add missing #pragma once's 2023-11-08 21:30:44 -07:00
Eric Wasylishen a9838d9fc1 tests: fix build 2023-11-08 00:28:14 -07:00
Eric Wasylishen c9edf4ddaa vis: huge speedup from fixing false sharing with stat counters
gmsp3v2.bsp, 32 threads 3950x, 157s -> 61s
2023-11-08 00:05:08 -07:00
Eric Wasylishen 7e5ad9a39b lightpreview: add support for Q1 visdata 2023-11-06 22:54:21 -07:00