Daniel Svensson
ef8f28f33c
Fix embree4 bitrot.
2024-07-20 23:47:30 +02:00
Jonathan
f816b433d1
fix visible clip brushes
...
add support for the two missing content flags from re-release
2024-06-07 21:22:38 -04:00
Jonathan
b5089ce349
slight speedup by helping embree with alignment
...
merge some light algorithms together
allow changing attenuation on surface lights with _surflight_atten
replace some emplace_back's with push_back to improve compilation times
2024-06-02 19:49:32 -04:00
Jonathan
0f844ad3e2
don't output debug stuff if we don't need it
2024-05-29 07:12:56 -04: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
a09ad4672f
build: remove some constexpr's gcc 11 didn't like
2024-05-20 11:48:44 -06:00
Jonathan
6c9962eb8c
some more memory adjustments
...
settings cleanup, maputil/bsputil changes
(cherry picked from commit 59ac57306f13ff53f935f51bb5df1e59e76753ef)
# Conflicts:
# bsputil/bsputil.cc
2024-05-20 11:28:03 -04: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
9985d6c8fd
fix odr violations
...
not sure why these only started to be reported on this branch
2024-04-01 12:20:35 -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
b89bac4e8c
common: split start of bspfile.hh into bspfile_common.hh
...
old layout was confusing CLion because bspfile.hh included
itself
2024-03-11 20:14:59 -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
Jonathan
3d419853d3
store leaves on surf instead of surface light
2024-03-09 00:14:03 -05:00
Jonathan
6c1feb5af8
cut per-surface memory usage down by making streams re-usable per thread
2024-03-08 23:09:16 -05:00
Jonathan
6157945d4d
optimize Q2 brush info by using world-aligned defaults if they exist
...
optimize Q2 animations by using world-aligned defaults, since Q2 only needs the secondary texinfo for the texture
2024-03-05 11:11:20 -05:00
Eric Wasylishen
ee075b5781
qbsp: shrink node_t from 328 to 280 bytes
2024-02-27 23:34:47 -07:00
Eric Wasylishen
f3da00395d
style: replace (void) with ()
2024-02-26 21:07:22 -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
1e53d45a6c
qbsp: fix comment
2024-02-25 15:54:58 -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
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
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
b66c95a53f
tests: add q2_mist_transwater
2024-01-23 20:36:34 -07:00
Jonathan
53850d94ac
fix crash in embree tracing due to new batching code
...
simplify structs for tracing
2024-01-21 08:52:16 -05: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
Eric Wasylishen
1c692d6f47
qbsp: record portal type
2024-01-05 12:32:01 -07:00
Eric Wasylishen
8ab9960ca0
lightpreview: don't crash when vis is run more than once
2023-12-24 17:22: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
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
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
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
Jonathan
ec452e2291
remove implicit conversion for qplane3
2023-11-19 19:41:58 -05: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
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
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
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
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
f1bf0f546d
add missing #pragma once's
2023-11-08 21:30:44 -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