Commit Graph

3657 Commits

Author SHA1 Message Date
Eric Wasylishen 8f49cf3894 refactor: Mod_Q1BSP_DecompressVis -> DecompressVis 2023-01-30 19:56:40 -07:00
Eric Wasylishen 912dd0cdeb vis: migrate CalcPHS from DecompressRow to Mod_Q1BSP_DecompressVis 2023-01-30 19:56:37 -07:00
Eric Wasylishen e490eb3ade refactor: move Mod_Q1BSP_DecompressVis to bsputils.cc 2023-01-30 19:56:34 -07:00
Eric Wasylishen d2db75ee81 light: Mod_Q1BSP_DecompressVis: port safety check from DecompressRow 2023-01-30 19:56:24 -07:00
Eric Wasylishen 85e394a0ea light: cleanup unused function declarations 2023-01-30 19:56:15 -07:00
Eric Wasylishen 302d600f4c qbsp: strip _tb_ keys, convert __TB_empty to skip 2023-01-30 00:28:31 -07:00
Eric Wasylishen 9edad10b0f common: add convenience version of EntData_Parse 2023-01-30 00:08:45 -07:00
Eric Wasylishen e722ff14c9 fs: hack around directory called "light" in CWD blocking use of a texture called "light" 2023-01-29 21:35:15 -07:00
Eric Wasylishen 837524999b fs: handle filesystem_error in directory_archive::load()
we were hitting this on CI when attempting to load a texture called
"light"; file_size() was throwing because it was attempting to
get the file size of a directory called "light".
2023-01-29 18:56:24 -07:00
Eric Wasylishen 23e98c0e94 test: remove unwanted doctest::may_fail() from light tests 2023-01-29 16:53:23 -07:00
Eric Wasylishen ad77f8fc57 Revert "light: remove unnecessary/confusing scale factor on sunlight direction"
This reverts commit 94dcccf662.
2023-01-29 16:33:30 -07:00
Eric Wasylishen 94dcccf662 light: remove unnecessary/confusing scale factor on sunlight direction 2023-01-29 15:20:42 -07:00
Eric Wasylishen 439d0de7f2 testmaps: test case for hint brush causing faces to be deleted 2023-01-29 15:06:55 -07:00
Jonathan 531a0d781f fix crash on bad texel fetch from scaled textures 2023-01-29 14:01:07 -05:00
Eric Wasylishen 6ede7925bc light: apply model offset to embree meshes
Fixes shadows in incorrect places when using shadow-casting rotators
Fixes https://github.com/ericwa/ericw-tools/issues/326
2023-01-24 20:18:14 -07:00
Eric Wasylishen 83d3774714 tests: hack for spurious test failure on CI only 2023-01-24 01:40:21 -07:00
Eric Wasylishen 2d64108ea4 light: add basic test case for _sun 1 entities 2023-01-24 00:57:26 -07:00
Eric Wasylishen fa8af3845b light: fix default _sunlight angle to be pointing straight down 2023-01-24 00:52:28 -07:00
Jonathan 36b8b21990 set -wrnormals by default on -q2rtx
inherit -phong from worldspawn
2023-01-18 15:49:51 -05:00
Eric Wasylishen c109712079 light: fix spots in AO map in certain cases when combined with phong
The previous GetUpRtVecs (get tangent/bitangent) was not handling normals very near 0,0,1
whereas qv::MakeTangentAndBitangentUnnormalized does
2023-01-16 22:37:28 -07:00
Eric Wasylishen e520c96e28 light: CalcPoints: switch to jitter method for fixing luxels touching world
The previous method involved geometrically shrinking all sides of a face by 1 unit,
and snapping the luxel to the shrunken face. The problem is this could end up moving
the luxel a lot (e.g. 4 units) into vastly different lighting, causing lightmap artifacts.

Jitter method moves the luxel only +/- 0.5 units currently.
2023-01-16 02:01:45 -07:00
Eric Wasylishen ee5c016b57 fix macOS build 2023-01-08 20:43:31 -07:00
Eric Wasylishen a497254874 tests: add q2 light cone test 2023-01-08 20:26:32 -07:00
Eric Wasylishen 6697beb607 fix _cone default in q2 maps 2023-01-08 20:01:34 -07:00
Eric Wasylishen a2399ab48c tests: add dirt / object_channel_mask interaction test
was already working correctly
2023-01-08 19:59:19 -07:00
Eric Wasylishen 91c678254a light: tweaks to _cone support in q2 2023-01-08 19:57:25 -07:00
Jonathan df5f894726 fix _cone in Q2 2023-01-08 20:03:06 -05:00
Eric Wasylishen ff09b4c31e qbsp: fix comment about vanilla tools 2023-01-06 12:14:08 -07:00
Eric Wasylishen e9cd29a394 tests: add test case for WINDOW being non-mirrored 2023-01-06 12:07:30 -07:00
Eric Wasylishen 64c0d8c0c4 qbsp: fix AUX to be non-mirrorinside by default 2023-01-06 12:00:32 -07:00
Eric Wasylishen aa928e1515 tests: add q2 ladder test case 2023-01-03 17:40:56 -07:00
Eric Wasylishen c43371213e tests: move benchmarks to new file, add clip benchmark 2023-01-03 16:20:22 -07:00
Eric Wasylishen a9a11159f4 light: add _surface_minlight_scale light key
for tweaking minlight given to faces matching surface light templates.

minlight = _surface_minlight_scale * light

lower default from 64 to 1 in q1 mode
2022-12-30 23:06:28 -07:00
Eric Wasylishen 710e70d74b testqbsp: add (failing) test case with off-grid geo and missing faces 2022-12-23 00:04:22 -07:00
Eric Wasylishen 1fb53cbe4d qbsp: fix area assignment on leaking q2 maps
reverts c9243d4fea
2022-12-21 21:18:06 -07:00
Eric Wasylishen 54ada5be6d bspinfo: don't crash if light data is missing 2022-12-21 20:58:08 -07:00
Eric Wasylishen fe5ce3765a test: add a few more area-related assertions 2022-12-21 20:56:18 -07:00
Eric Wasylishen 20af42c9aa test_ltface: disable "surface lights minlight" test for now 2022-12-21 01:10:39 -07:00
Eric Wasylishen 8f79f6a972 vis: rename portal_t -> visportal_t
fixes symbol collision causing crashes on macOS
2022-12-21 01:03:03 -07:00
Eric Wasylishen ba155a3bf5 build: avoid msvc-only constructor 2022-12-20 23:51:56 -07:00
Eric Wasylishen 3d0c756b4f light: fix minlight color on surface lights
- extra `* 255` was unnecessary, setting_color already does this
- don't use qvec3b as it was causing colors to wrap around the 0..255 range
2022-12-20 23:44:21 -07:00
Eric Wasylishen 108d299482 test_ltface: test case for minlight surflight 2022-12-20 22:54:22 -07:00
Eric Wasylishen f652af9c7d bsputils: add .lit loader 2022-12-20 22:46:20 -07:00
Eric Wasylishen bf75ae8717 test_ltface: refactor to allow q1 tests as well 2022-12-20 00:19:05 -07:00
Eric Wasylishen 35fe26b7a6 qbsp: fix FindTargetEntity (was breaking hiprotate) 2022-12-19 00:55:20 -07:00
Eric Wasylishen 6ac564c64f build: remove unused subprocess.h dependency 2022-12-19 00:36:04 -07:00
Jonathan d5e29a1c90 add _nofill key, which causes an entity to not count as an entity for the purposes of occupancy (for lights in walls, etc)
add _nonudge key, to disabling nudging of lights "stuck" inside walls
2022-12-15 04:30:22 -05:00
Eric Wasylishen 6451a3f2aa qbsp: fix _mirrorinside 1 on func_detail_fence (q2) 2022-12-15 00:18:22 -07:00
Eric Wasylishen 8caaf7236f test: add q2 test case for alpha mask textures 2022-12-14 23:19:58 -07:00
Eric Wasylishen 82aa1e4396 light: make "_light_alpha 0" behave as expected (invisible to light) 2022-12-14 21:46:36 -07:00