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
489d04f0ec
Merge pull request #109 from 0x4E69676874466F78/vulkan
...
Update rad
2021-10-13 23:53:37 -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
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
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
Ivan 'provod' Avdeev
f8b0b8c672
rtx: make light entity parsing extensible
...
x macros ftw
2021-09-20 23:35:49 -07:00
Ivan 'provod' Avdeev
fe931fcfd7
rtx: collect d/elights and static entity point lights
...
sample all of them unconditionally for now
2021-09-20 23:35:49 -07:00
Ivan 'provod' Avdeev
1953bf7b4f
rtx: install known rads into valve/maps
...
fix #76
2021-09-20 23:35:49 -07:00
NightFox
70ae807b3d
+0~TNNL_LGT4 for c0a0d
2021-09-20 12:40:59 +03:00
NightFox
5e97b4dd28
Correction +0~TNNL_LGT4 for c0a0c
...
Do not tune rad files under rays while it is still unfinished, check only with qrad
2021-09-20 12:24:54 +03:00
NightFox
b5f263d56a
Correction +0~TNNL_LGT4 for c0a0c
...
Do not tune rad files under rays while it is still unfinished, check only with qrad
2021-09-20 12:22:01 +03:00
NightFox
907310c5bd
Update rad files
...
More correct light for c0a0c and c0a0d + correct RED for other rads.
2021-09-20 12:09:08 +03:00