Commit Graph

2012 Commits

Author SHA1 Message Date
NightFox
108ad4d226 UPPERCASE 2021-10-14 03:14:52 +03:00
NightFox
3e7abee0e3 UPPERCASE 2021-10-14 03:13:13 +03:00
NightFox
a06f8e1c26 corrected c1a0b, c1a0c, c1a0e 2021-10-14 02:58:25 +03:00
NightFox
a9a85c6584 corrected c1a0a 2 2021-10-14 01:32:38 +03:00
NightFox
98241a977f corrected c1a0a 2021-10-14 01:08:49 +03:00
Ivan Avdeev
de8a7e10e9 rtx: update to use safe COM_ParseFile 2021-10-13 12:42:20 -07:00
Ivan Avdeev
69cddf1767 Merge remote-tracking branch 'upstream/master' into vulkan 2021-10-13 12:36:11 -07:00
Ivan Avdeev
cb07b2ffaf rtx: remove comment 2021-10-13 12:27:24 -07:00
Ivan Avdeev
8ffab567b9 rtx: dynamically cull and add moving surface lights 2021-10-13 12:27:24 -07:00
Ivan Avdeev
157af769ff rtx: add vk_lights_dump command
It prints out light clusters debugging info.
2021-10-13 12:27:24 -07:00
Ivan Avdeev
af83e47f41 rtx: revert c0a0/YELLOW to original value 2021-10-13 12:27:24 -07:00
Ivan Avdeev
72fcf52837 rtx: simplify toggling light clusters debug visualization in shader 2021-10-13 12:27:24 -07:00
Ivan Avdeev
846651565c rtx: explictly disable light sources with zero intensity 2021-10-13 12:27:24 -07:00
Ivan Avdeev
46722c4a37 rtx: depend on throughput when culling 2021-10-13 12:27:24 -07:00
Ivan Avdeev
1eadd60587 rtx: implement late light culling
the idea is to not do very expensive shadow ray when the resulting color
won't affect the visible pixel anyway.
2021-10-13 12:27:24 -07:00
Ivan Avdeev
f4c75ec08c rtx: slight clean up surface light culling code 2021-10-13 12:27:24 -07:00
Ivan Avdeev
520fedde2b rtx: cull light clusters by plane normals
(note that real pdf culling doesn't seem to be necessary, as shader
confirms that it's usually not culled that much)
2021-10-13 12:27:24 -07:00
Ivan Avdeev
19b8025fc6 rtx: add light clusters debug helpers
1. add a way to enable only certain lights
2. add commented out code to highligh affected light clusters, culling
   modes, etc.
3. add affected light clusters counter when collecting lights
2021-10-13 12:27:24 -07:00
Ivan Avdeev
20369dd9ab rtx: move push constant definition to a common place; specialize shader constants 2021-10-13 12:27:24 -07:00
Ivan Avdeev
417caad50b rtx: work around crash on map load
xash tries to render a couple of frames after map has been destroyed and
before the new one was created (R_NewMap called). vk_light expects map
to be there at all times, so it tries to reference things that don't
exist.

boom

here we just check that map exists, and if it doesn't we just skip
referencing lights.

no boom.
2021-10-13 12:27:24 -07:00
Ivan Avdeev
53fd5b6b23 rtx: compute lighting in hl-native units, remap color in the end (#98) 2021-10-13 12:27:24 -07:00
Ivan Avdeev
8f7bc69cb2 rtx: cull surface lights based on estimated light intensity 2021-10-13 12:27:24 -07:00
Ivan Avdeev
869c21e42d rtx: fix bsp visibility based light cluster generation
1. fix indexiing (+1)
2. fix rle skipping (*8)
3. fix bbox ranges (floorf .. ceilf)
2021-10-13 12:27:24 -07:00
Ivan Avdeev
3f90408108 work around stack corruption when parsing entities
we have a limited buffer for string when reading tokens and no way to
specify buffer space. just increase buffer size.

proper fix would be to change ref api to allow passing buffer size as an
argument.
2021-10-13 12:27:24 -07:00
Ivan Avdeev
4b0033985d rtx: construct light grid based on bsp visibility data
unfortunately it's broken and ends up producing incorrect light lists
per grid cells. we'll fix it eventually
2021-10-13 12:27:24 -07:00
Ivan Avdeev
87cb23eb8b rtx: collect per-leaf emissive surfaces with pvs data 2021-10-13 12:27:24 -07:00
Ivan Avdeev
9006d679ec rtx: associate msurfaces with mleafs 2021-10-13 12:27:24 -07:00
Ivan Avdeev
436ab8709e rtx: start collecting light sources per leaf 2021-10-13 12:27:24 -07:00
Владислав Сухов
c9e4912a2a client: backport con_fontnum from old engine 2021-10-12 13:43:23 +03:00
e5e1570aed public: redeclare ParseFile flags to be exactly same as in exported API headers 2021-10-08 17:31:32 +03:00
621399c49b engine: add safe ParseFile to client MobilityAPI 2021-10-08 17:31:32 +03:00
c3684109bf mainui: update 2021-10-08 17:31:32 +03:00
f3fedbfdba engine: add safe ParseFile to menu extended API 2021-10-08 17:31:32 +03:00
29a8bfb1dc engine: common: fix ParseFile calls 2021-10-08 17:31:32 +03:00
004e190435 engine: common: test ParseFile length return value 2021-10-08 17:31:32 +03:00
378c4f30f3 public: ParseFile drops const qualifier, return -1 length on overflow
As we usually put allocated data to ParseFile, we don't need const qualifier
2021-10-08 17:31:32 +03:00
a8c877c841 engine: server: fix ParseFile calls 2021-10-08 17:31:32 +03:00
8ce448cc77 ref_gl: fix ParseFile calls 2021-10-08 17:31:32 +03:00
4ba95277b9 engine: client: fix ParseFile calls 2021-10-08 17:31:32 +03:00
cce7c7d782 public: declare unsafe ParseFile as ParseFileLegacy 2021-10-08 17:31:32 +03:00
9e5d5e0ea3 public: moved COM_ParseFileSafe to libpublic, added optional argument for length and overflow checking 2021-10-08 17:31:32 +03:00
a235bec5f1 engine: introduce COM_ParseFileSafe, add tests 2021-10-08 17:31:32 +03:00
a3a8acfe6c engine: sound: add DSP coeffecients table from Half-Life Alpha, minor fixes to DSP code 2021-10-04 05:43:35 +03:00
9e4e9cab04 engine: restore optional upscaling depending on SOUND_DMA_SPEED value :) 2021-10-04 05:43:35 +03:00
SNMetamorph
e4ad8def0d engine: filesystem: fixed current directory changing for Windows 2021-10-03 12:28:59 +03:00
SNMetamorph
ec95948b69 engine: server: implemented instant game library loading 2021-10-03 04:38:05 +03:00
ef6ff3cfa6 mainui: update 2021-10-03 04:26:56 +03:00
7bcfce5a7a ref_gl: use GCC provided offsetof implementation 2021-10-03 04:26:40 +03:00
08c04200fb engine: use GCC provided offsetof implementation 2021-10-03 04:26:22 +03:00
8bbd0d5119 ci: let's have a copy of original uploadtool instead of unsafe curl | sh 2021-10-03 03:53:06 +03:00