Ivan 'provod' Avdeev
4935340432
rtx: add qrad light intensity scaling
2021-10-20 11:58:53 -07:00
Ivan 'provod' Avdeev
1b71237279
rtx: bring back naive point light implementation
...
- scale dlight intensity
- attenuate based on brdf
- early culling if color contribution is small
2021-10-20 11:58:53 -07:00
Ivan 'provod' Avdeev
832b719bed
rtx: remove direct sun sampling attempt
...
apparently there's no singular sun. there are spot_lights (+light_environment) that function like a sun (directional light).
2021-10-20 11:58:53 -07:00
Ivan 'provod' Avdeev
208d7528ad
rtx: move Lights buffer definition to common header
2021-10-20 11:58:53 -07:00
NightFox
119c73abfa
fix +0~TNNL_LGT1
2021-10-18 23:36:42 -07:00
NightFox
64626c1601
fix +0~LIGHT2A
2021-10-18 23:36:42 -07:00
NightFox
d3faaa59f1
Almost perfect
2021-10-18 23:36:42 -07:00
NightFox
b8a5b55795
More correct
2021-10-18 23:36:42 -07:00
NightFox
a9b7982ba5
More correct vagonchik, shlakbaum
2021-10-18 23:36:42 -07:00
NightFox
4d9f228769
fix c0a0c
2021-10-18 23:36:42 -07:00
Ivan Avdeev
03a7c00f06
do not upload vulkan_sdk.exe in CI builds
2021-10-14 10:17:05 -07:00
Ivan Avdeev
489d04f0ec
Merge pull request #109 from 0x4E69676874466F78/vulkan
...
Update rad
2021-10-13 23:53:37 -07:00
Ivan Avdeev
f3a213909f
Merge pull request #108 from w23/merge-master
...
Merge with latest master
2021-10-13 19:47:25 -07:00
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