Commit Graph

1999 Commits

Author SHA1 Message Date
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
ade0fd4afa ci: stop generating vc2008 project files
If somebody needs them, they can revert this comment and send a PR
Or better use official msvs.py tool
2021-10-02 04:05:52 +03:00
ed7ed818bb Add .gitattributes to enforce Git write normal human file endings and show pretty diffs for C and Python 2021-10-02 03:47:32 +03:00
91f845c335 engine: client: fix paused icon drawn when levelshots are disabled 2021-09-30 16:43:21 +03:00
81ef12be9e Revert "ci: adding pvs-studio checking"
This reverts commit bd4979f5b0.
2021-09-30 16:38:32 +03:00
2aafe9df9f Revert "ci: try to create license file by ourselves"
This reverts commit dd90262db2.
2021-09-30 16:38:29 +03:00
3b933eabf5 engine: make test assert failure more pretty 2021-09-30 15:59:14 +03:00
f5ccf093d6 scripts: waifulib: fix build with sanitizers on 2021-09-30 15:58:50 +03:00
fe0da74e75 engine: fix build with tests on 2021-09-30 15:58:32 +03:00
Ivan Avdeev
8b704ed9a6 handle externally provided swapchain resolution, fix #53 2021-09-24 20:58:01 -07:00
Ivan 'provod' Avdeev
6b1eb26c24 improve screenshot performance, fix #87
make sure that we use host_cached memory, otherwise device_local will be picked by default, which is very slow to read from.
2021-09-22 20:29:31 -07:00
Ivan Avdeev
fe52ff3d1a
Merge pull request #84 from 0x4E69676874466F78/vulkan
Update rad files
2021-09-21 08:57:26 -07:00
Ivan Avdeev
16df678fd2 fix linux build 2021-09-20 23:35:49 -07:00
Ivan 'provod' Avdeev
100ba22f0e rtx: add broken sun sampling
i cant into math. sun direction is completely incorrect
2021-09-20 23:35:49 -07:00