Eric Wasylishen
cba902facd
add test case for portal_can_see_through fix
2024-05-30 22:44:19 -06:00
Eric Wasylishen
30868eacb7
light: LIGHTING_E5BGR9 + HDR .lit support ( #427 )
...
* light: Add support for LIGHTING_E5BGR9.
This is not really finished. Currently mutually exclusive with
regular RGBLIGHTING, and not tested with external .lit file.
* light: replace HDR_PackResult with a version following the OpenGL spec
- add HDR_UnpackE5BRG9 for unpacking
- caller is now responsible for scaling 128 -> 1
- expose in header for tests
* light: move HDR_PackE5BRG9/HDR_UnpackE5BRG9 to common/litfile.hh
* build: std::powf not available in gcc
* common: move LoadLitFile to litfile.hh
* common: LoadLitFile: return hdr variant as well
* lightpreview: add an Exposure slider
* lightpreview: support hdr .lit's, wip
* tests: refactoring to set up testing for hdr lit's
* tests: add test for -hdr and -bspxhdr
* tests: fix LM_Sample to deal with styles correctly
* lightpreview: fix glsl error
* lightpreview: show dialog box for glsl compile errors
---------
Co-authored-by: Daniel Svensson <dsvensson@gmail.com>
2024-05-26 21:55:10 -06:00
Eric Wasylishen
e61630d4d9
qbsp: q2: adding structrual solid to a leaf now only clears detail bit, not other bits
...
fixes #420
2024-04-24 23:46:40 -06:00
Eric Wasylishen
c714ce597a
qbsp: use mapfile.cc for .map file parsing
...
BP loading is broken by this commit, will need
to re-introduce loading the texture sizes in mapfile.
2024-04-07 22:20:33 -06:00
Eric Wasylishen
28190f5065
light: warn rather than fatal error on invalid "delay" settings
2024-04-01 12:02:39 -06:00
Eric Wasylishen
75e062bbb4
tests: add test for RTC_SCENE_FLAG_ROBUST
...
tests for same issue as:
https://github.com/ericwa/ericw-tools/issues/269#issuecomment-2027921279
2024-03-30 22:57:38 -06:00
Eric Wasylishen
992b6f0064
light: fix "mangle" on _sun 1 entities
...
Fixes #266
2024-03-30 11:41:12 -06:00
Eric Wasylishen
3d68b12473
light: never write .lit/.lux in Q2 mode
...
fixes `-dirtdebug` broken in lightpreview
2024-03-16 15:07:18 -06:00
Jonathan
71aa8aaeea
Paril/mem write ( #412 )
...
* simplify light_surfaces storage
* memory on writes
* Revert "batch together traces on the whole surface - saves a small amount of time"
This reverts commit 72611b7e97 .
# Conflicts:
# light/ltface.cc
* fix a use-after-move
* don't try to write lightmap if it has no styles
* fix issue with alignment
2024-03-13 20:01:05 -06:00
Eric Wasylishen
275695a37c
qbsp: remove -transsky flag which was broken
...
unknown what it was useful for
2024-03-09 22:07:55 -07:00
Eric Wasylishen
aa3b8479b4
qbsp: shrink node_t from 280 to 208 bytes
...
- contentflags_t from 80 to 8 bytes
2024-03-09 19:37:23 -07:00
Eric Wasylishen
3fba6a6564
tests: add test for current behaviour of unknown q2 content/surface flags
2024-03-08 21:03:53 -07:00
Eric Wasylishen
f9b374c6f7
tests: allow color values to be off by 1/255
2024-02-26 00:09:44 -07:00
Eric Wasylishen
12b8066246
light: change remaining double -> float
...
tiny perf improvement on base1-test.map with light params:
-emissivequality high
before: 7.4s
after: 6.9s
no visible changes in base1.
2024-02-25 23:42:45 -07:00
Eric Wasylishen
ba5ad539b8
light: q2: opaque lit liquids receive light from both sides by default
2024-02-15 23:51:28 -07:00
Eric Wasylishen
b12894de64
qbsp: fix "sides not found" warning spam in Q1 maps with sky
...
fixes #366
2024-02-11 18:48:34 -07:00
Eric Wasylishen
3a80e5ad1a
tests: add -verbose flag
2024-02-11 16:38:57 -07:00
Eric Wasylishen
765d95e189
qbsp: q1: make liquids detail when -transwater is in use (i.e. by default)
...
Fixes #353
Fixes #244
2024-02-10 21:08:29 -07:00
Eric Wasylishen
ea8a733b37
tests: add _suntexture test
2024-02-05 23:47:23 -07:00
Eric Wasylishen
aa970c0d18
qbsp: only pick up .wad textures when compiling for non-Q2 games
...
fixes #404
2024-02-04 19:41:45 -07:00
Eric Wasylishen
a5b77d4dc4
tests: remove quake_map_source tests
2024-02-03 14:18:25 -07:00
Eric Wasylishen
e8747407d6
tests: add test for solid black lightmaps in HL mode
2024-01-28 21:46:47 -07:00
Eric Wasylishen
23591efba9
tests: add test for q1 faces which receive no light
...
they're allowed to be written as style 255 / lightofs -1 in Q1 mode
including lit water.
2024-01-28 21:02:53 -07:00
Eric Wasylishen
d512abd27d
qbsp: merge across liquids by default in q1
...
- change option name to -nomergeacrossliquids
- add docs
- allow using it in q2 as well (requested by jitspoe)
2024-01-25 23:04:31 -07:00
Eric Wasylishen
0aeb0acd94
qbsp: adjust tjunc logic
2024-01-24 00:22:27 -07:00
Eric Wasylishen
a8443ef0cf
qbsp: make ALPHATEST imply DETAIL, TRANSLUCENT, and WINDOW (if solid)
...
like the existing logic for TRANS33/TRANS66
2024-01-23 21:16:40 -07:00
Eric Wasylishen
b66c95a53f
tests: add q2_mist_transwater
2024-01-23 20:36:34 -07:00
Eric Wasylishen
0583676af9
build fix
2024-01-22 21:59:49 -07:00
Eric Wasylishen
1b92d61cfb
testmaps: add tjunc test matrix for q2
2024-01-22 21:34:49 -07:00
Eric Wasylishen
49d9c3be41
tests: add a test for Q2 fully black lightmaps
...
they can't be optimized with styles = [255, 255, 255, 255] like in Q1 mode
2024-01-14 20:31:28 -07:00
Eric Wasylishen
07e050f484
light: restore -bounce flag with no arguments as a shorthand for -bounce 1
2024-01-13 18:35:18 -07:00
Jonathan Linat
39074b8249
CI: Enable Qt5 + lightpreview ( #406 )
...
* chore(CI): refine current 'cmake.yml' file content
* chore(CI): enable Qt5 on Linux and macOS
* Appveyor.yml: remove deploy step
we are deploying from GitHub Actions now
* build-linux-64.sh: adjust .zip wildcard
to hopefully not break on PR builds
* build-linux-64.sh: remove fragile unzip/readelf lines
* lightpreview\CMakeLists.txt: only install Qt on Win/Mac
* lightpreview: attempt to fix mac Qt packaging
* lightpreview: apple fixes
* Install qtdbus on macOS
* try alternate dbus module name
* try cmake find_package for dbus
* also find Qt5PrintSupport
* build-osx.sh: remove coreutils install
we don't use sha256sum anymore
* lightpreview/CMakeLists.txt: create .app bundle on macOS
* Update CMakeLists.txt
* build-*: run cpack as part of the build command
on my macOS test system, running cpack separately
is doubling the build time
* cmake: factor out add_loader_path_to_rpath function, apply to all targets
* chore(CI): add steps to re-pack the 'doc' and 'bin' directories
* chore(CI): remove GitHub release-related step (to be re-introduced)
* chore(CI): adjust inflating destination directories
---------
Co-authored-by: Eric Wasylishen <ewasylishen@gmail.com>
2024-01-08 20:16:41 -07:00
Eric Wasylishen
4f9cb6c2e0
testmaps: add e3m4.map test case from LibreQuake
...
commit 07a310760307585cd5663a52ae5d535bc384081f
2024-01-05 12:32:01 -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
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
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
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
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
ad9fd7fc59
common: structured bspxbrushes reading/writing
2023-11-25 17:28:26 -07:00
Eric Wasylishen
db0951dc40
light: support embree4 in addition to 3
2023-11-19 14:14:22 -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
Eric Wasylishen
8888506821
qbsp: fix -notex option
2023-11-09 23:57:07 -07:00
Eric Wasylishen
a9838d9fc1
tests: fix build
2023-11-08 00:28:14 -07:00
Eric Wasylishen
e9532346c7
vis: partly fix perf regression of Oct 2021
...
- drops usage of winding_storage_hybrid
- makes pstack_t trivially default initializable again (like the C
original)
- we weren't making use of the unlimited size of winding_storage_hybrid;
the original vis already has an allowance for if a winding exceeds
the fixed stack allocation size (24) and we were still applying that
limit
before:
cmake-build-release\tests\tests.exe -r=xml -sf=*benchmark.cc
Testing started at 1:53 PM ...
| ns/op | op/s | err% | total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
| 45.15 | 22,149,002.06 | 0.1% | 0.01 | `create pstack_t`
| 47.04 | 21,256,429.80 | 0.1% | 0.01 | `create pstack_t + 1x AllocStackWinding`
| 48.28 | 20,710,594.32 | 0.2% | 0.01 | `create pstack_t + 2x AllocStackWinding`
| 128.52 | 7,780,603.30 | 0.3% | 0.01 | `setup + ClipStackWinding`
Benchmark from: https://www.quaddicted.com/tools/vis_benchmark
cmake-build-release\vis\vis.exe -nostate -nopercent gmsp3v2.bsp
153.31s elapsed
after:
cmake-build-release\tests\tests.exe -r=xml -sf=*benchmark.cc
Testing started at 1:46 PM ...
| ns/op | op/s | err% | total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
| 1.64 | 610,528,630.06 | 0.3% | 0.01 | `create pstack_t`
| 3.29 | 303,895,535.45 | 0.6% | 0.01 | `create pstack_t + 1x AllocStackWinding`
| 5.20 | 192,172,148.84 | 0.2% | 0.01 | `create pstack_t + 2x AllocStackWinding`
| 66.84 | 14,960,818.66 | 1.0% | 0.01 | `setup + ClipStackWinding`
Benchmark from: https://www.quaddicted.com/tools/vis_benchmark
cmake-build-release\vis\vis.exe -nostate -nopercent gmsp3v2.bsp
141.42s elapsed
2023-11-05 13:58:36 -07:00