Commit Graph

858 Commits

Author SHA1 Message Date
Eric Wasylishen 2fc1e9099a light: remove dead / non-working code for non-embree light tracing 2021-10-02 21:12:12 -06:00
Eric Wasylishen 8a7164791e light: fix "don't do this on Q2" logic for 0 light faces 2021-10-02 21:00:45 -06:00
Eric Wasylishen f7c0c80a26 qbsp, light: allow _minlight to go up to 510 instead of 255 on func_detail/etc. 2021-09-25 13:11:15 -06:00
Eric Wasylishen d5a647c6a3 trace_embree.cc: try <climits> for UCHAR_MAX 2021-09-22 23:08:06 -06:00
Eric Wasylishen 5cfe40d79a trace_embree.cc: add missing <cstdint> include (for UCHAR_MAX) 2021-09-22 22:58:33 -06:00
Eric Wasylishen 80a4aa1b97 Merge branch 'master' into qbsp-contentflags 2021-09-22 00:12:27 -06:00
Eric Wasylishen 6c19c3c927 Revert "Revert "Q2bsp VIS support (#315)""
This reverts commit 5465ab4ff6.
2021-09-20 18:38:31 -06:00
Eric Wasylishen 405ce25913 Revert "Revert "Q2BSP + QBSP (#313)""
This reverts commit e9052f3002.
2021-09-20 18:38:28 -06:00
Eric Wasylishen a6f90438f6 build: fix homebrew build 2021-09-19 20:35:44 -06:00
Eric Wasylishen e9052f3002 Revert "Q2BSP + QBSP (#313)"
This reverts commit eaa86c71c6.
2021-09-19 14:58:34 -06:00
Eric Wasylishen 5465ab4ff6 Revert "Q2bsp VIS support (#315)"
This reverts commit 90973e1198.
2021-09-19 14:56:25 -06:00
Jonathan c575334dff Fix testlight 2021-09-13 10:15:11 -04:00
Eric Wasylishen 28b4ec7f3f
ci: fix linux CI (#321) 2021-09-12 16:40:56 -06:00
Jonathan c95a1e2ccb q2 and bug fixes
# Conflicts:
#	include/qbsp/qbsp.hh
#	include/qbsp/winding.hh
#	qbsp/brush.cc
#	qbsp/csg4.cc
#	qbsp/merge.cc
2021-09-12 08:34:01 -04:00
Eric Wasylishen 3f2d8c57c1 build: fix finding embree license with mac package 2021-09-12 01:30:20 -06:00
Eric Wasylishen bd3452bfdc build: simplify light build (embree handling) 2021-09-12 01:30:20 -06:00
Eric Wasylishen 3d9d167360 build: fix build-osx.sh 2021-09-11 13:12:25 -06:00
Jonathan 00efa6e67d Fix operator<
Introduce gamedef, to reduce rewriting of data in bspversions
fix name of needs_subdivision
include value in texinfo, in prep for Q2
2021-09-07 01:41:32 -04:00
Jonathan 437459a4dd Finish using game everywhere 2021-09-06 18:09:13 -04:00
Jonathan 3bc9b1b0f8 Instead of directly comparing BSP version pointers just for game type, I compacted quake2/hexen2 into a single enum.
Feature check in bspver for colored lightmaps, which replaces the many "version == q2 || version == qbism || version == hl".
2021-09-06 17:13:37 -04:00
Jonathan 8fd1d89b8d Fix double-delete
Fix typo
2021-09-05 17:39:17 -04:00
Jonathan dad0e61f63 Fix for texinfo/miptex searching routines
surf flags now use the "native + extended" format that will eventually be used for brush contents. Q1 output seems identical, haven't tested Q2 yet.
2021-09-05 16:56:29 -04:00
Jonathan 90973e1198
Q2bsp VIS support (#315)
* Add QBSP - the BSP2-esque variant to Q2BSP - to bspinfo, and all of its accompanying structures.

* pass around ident, since Q2 needs it - admittedly it's a bit ugly, but it works for now.
conversion for QBSP

* Fix light

* _qbsp_ -> _qbism_

* Introduced bspversion_t, a struct that holds pertinent information about different BSP versions and also acts as a tagged pointer type for direct comparisons. This makes a lot of code paths simpler. I'm not entirely set on the wordings or usages yet, and maybe we can stuff boolean flags inside of them for different behaviors (for instance Q2, QBism and HL would have the "colored lightmap" boolean set to true, which replaces the check-for-all-three in the lightmapper)
Swapped arguments to ConvertBSPFormat to have the conversion target last instead of first
Finished rename of qbsp -> qbism
Tested:
 - bspinfo on various BSPs I had laying around (Q1, Q2, Qbism)
 - bsputil converting between Q2 and Qbism, and that they loaded in engine/roundtripped properly
Not tested:
 - vis/rad on anything major (I still can't run rad due to embree being weird)
 - bsputil conversion of Q1-esque maps

* Q2 VIS
Almost working, just in-game is not 100% functional

* PHS! Q2 VIS!

* Fix missing loadversion assignment
Fix missing \n

* Implement q2bsp -> mbsp visdata copy
fix sky lighting to use arghrad compat
2021-08-31 22:38:12 -06:00
Eric Wasylishen 968a840e47 light: make a certain degenerate face non-fatal
seen compiling ad_sepulcher.map with qbism q2 tools
2021-08-29 20:43:55 -06:00
Jonathan eaa86c71c6
Q2BSP + QBSP (#313)
* Add QBSP - the BSP2-esque variant to Q2BSP - to bspinfo, and all of its accompanying structures.

* pass around ident, since Q2 needs it - admittedly it's a bit ugly, but it works for now.
conversion for QBSP

* Fix light

* _qbsp_ -> _qbism_

* Introduced bspversion_t, a struct that holds pertinent information about different BSP versions and also acts as a tagged pointer type for direct comparisons. This makes a lot of code paths simpler. I'm not entirely set on the wordings or usages yet, and maybe we can stuff boolean flags inside of them for different behaviors (for instance Q2, QBism and HL would have the "colored lightmap" boolean set to true, which replaces the check-for-all-three in the lightmapper)
Swapped arguments to ConvertBSPFormat to have the conversion target last instead of first
Finished rename of qbsp -> qbism
Tested:
 - bspinfo on various BSPs I had laying around (Q1, Q2, Qbism)
 - bsputil converting between Q2 and Qbism, and that they loaded in engine/roundtripped properly
Not tested:
 - vis/rad on anything major (I still can't run rad due to embree being weird)
 - bsputil conversion of Q1-esque maps
2021-08-23 09:56:33 -06:00
Eric Wasylishen 3b17e577b5 build: fix linking to embree under vcpkg 2021-08-22 13:48:53 -06:00
Eric Wasylishen 2ff31d012e light: fix all rays missing on debian/ubuntu's embree builds 2021-08-05 20:11:44 -06:00
Eric Wasylishen ff5572f97d light: log number of bounce lights at the end of MakeBounceLights 2021-07-13 22:47:53 -06:00
Eric Wasylishen ffe90adc1c light: improve logging 2021-05-21 22:01:09 -06:00
Eric Wasylishen 6ecdd444ca light: optimize surface light generation 2021-05-21 22:01:09 -06:00
Eric Wasylishen 3f00d2fd00 light: add fixme 2021-05-21 20:47:25 -06:00
Eric Wasylishen fbde6065fa light: raise max verts in SubdividePolygon to 64 (for surface lights) 2021-04-11 20:57:30 -06:00
Eric Wasylishen fea7849315 common: preserve order of key/value pairs 2021-02-10 00:05:53 -07:00
Eric Wasylishen fcf0ebbbfe build: upgrade googletest 2021-02-07 14:42:12 -07:00
Eric Wasylishen b5fcdec19e cleanup: remove "byte" typedef 2021-02-07 14:02:35 -07:00
Eric Wasylishen f12e87f2b7 light: build fix. Glass/fence textures will need to be fixed. 2021-02-01 02:20:02 -07:00
Eric Wasylishen 9124653156 common: move EntData_ function to common 2021-01-30 21:11:25 -07:00
Eric Wasylishen a8be516bf4 light: embree3 port 2021-01-02 02:21:03 -07:00
Eric Wasylishen 94c30afac4 light: refactoring necessary to support embree3 2021-01-01 23:48:22 -07:00
Eric Wasylishen cce0fd98f9 light: document some intersection vs occlusion trace choices 2021-01-01 22:58:09 -07:00
Eric Wasylishen 09623934e8 light: q2: change sky lighting logic: only emit light if: sky flag set, light flag set, value nonzero
TODO: may need to use "value" more than just checking for nonzero
2021-01-01 00:30:40 -07:00
Eric Wasylishen 3b629f3ce9 light: fix q2 lightstyles 2021-01-01 00:14:52 -07:00
Eric Wasylishen 00e41688c3 light: quake2: arghrad-compatible phong support
(set face "value" to the same non-zero number, have light flag unset)
2020-12-31 12:39:17 -07:00
Eric Wasylishen d8b30c1080 light: don't throw an error on -v (passed by quark) 2020-12-29 16:40:09 -07:00
Eric Wasylishen 2d15d20410 light: q2: avoid black seams on geometry near sky 2020-12-29 15:58:40 -07:00
Eric Wasylishen eb842ba165 light: arghrad compat: preliminary sky_surface implementation 2020-12-29 13:43:06 -07:00
Julian Priestley 1b714108cd
Add ability to set phong in worldspawn #267 (#305) 2020-11-30 00:42:42 -07:00
Eric Wasylishen b6e6688ab4 light: use RTC_SCENE_HIGH_QUALITY. Fixes leaking through a joint
between 2 ceiling faces in a test case from 4LT
2020-08-20 18:02:38 -06:00
Eric Wasylishen b35cb8eb7e light: fixes for bjptools skip faces (which have no associated model) 2020-08-20 12:08:46 -06:00
Eric Wasylishen 5ca74ec8b3 light: don't apply AO when gathering light to bounce 2020-08-04 19:18:14 -06:00