Commit Graph

160 Commits

Author SHA1 Message Date
Ivan Avdeev
364b46ea87 [WIP] rtx: first build with ray tracing pipeline and black screen 2021-07-05 13:24:57 -07:00
Ivan Avdeev
34359e2f75 rtx: start splitting ray tracing into functional modules
move model management into vk_ray_model
2021-07-05 10:59:14 -07:00
Ivan Avdeev
750d3b7608 rtx: fix brush models being invisible
An incorrect range of used vertices was pased into `VkAccelerationStructureGeometryTrianglesDataKHR`.
 `maxVertex` was being set to a count of vertices per geometry, not a maximum used vertex number.

The fix is to track `vertex_offset` of the first used vertex, which makes `maxVertex` correct.
2021-07-04 12:48:32 -07:00
Ivan Avdeev
2034acbe76 rtx: fix build_ranges incorrect pointer indirection 2021-07-04 12:05:21 -07:00
Ivan Avdeev
3ed4d84653 rtx: add runtime toggle between ray tracing and traditional renderer
new command is `vk_rtx_toggle`
2021-07-04 11:18:28 -07:00
Ivan Avdeev
20d38fead5 fix ISO C90 mixing declaration and code 2021-06-23 17:04:26 -04:00
Ivan Avdeev
20c42a7815 fix ISO C90 mixing declarations and code 2021-06-23 17:04:26 -04:00
Ivan 'provod' Avdeev
f2e90cc420 rtx: fix cached blas mismatched size assert, fixes #10
apparently we also need to track max primitives per blas
2021-06-23 17:04:26 -04:00
Ivan 'provod' Avdeev
e272539136 enable crude beams and sprites support back 2021-06-23 17:04:26 -04:00
Ivan 'provod' Avdeev
5211c33cce rtx: add shader specialization 2021-06-23 17:04:26 -04:00
Ivan 'provod' Avdeev
01cd55641b fix oob mem access when parsing rad files 2021-06-23 17:04:26 -04:00
Ivan 'provod' Avdeev
355ebd8d23 rtx: add reflections for water; add sky as emissive surfaces 2021-06-19 12:52:13 -07:00
Ivan 'provod' Avdeev
0356013db6 update todo; add more diags for rtx as handling 2021-06-19 10:51:21 -07:00
Ivan 'provod' Avdeev
8321dda9d9 rtx: fix water normals performance and culling 2021-06-19 13:44:28 -04:00
Ivan 'provod' Avdeev
4e599b4070 cull water side surfaces 2021-06-19 13:44:28 -04:00
Ivan 'provod' Avdeev
531fcd9393 move water warping to vk_brush 2021-06-19 13:44:28 -04:00
Ivan 'provod' Avdeev
74e0fb2947 add initial water surfaces
still need to cull them, generate normals, etc.
2021-06-19 13:44:28 -04:00
Ivan Avdeev
f8dc37b0eb 🤦 2021-06-07 12:21:47 -07:00
Ivan Avdeev
a004656b57 ref_vk: remove verbose ci info; fix win23 func ptr 2021-06-07 12:05:47 -07:00
Ivan Avdeev
fd11b00469 ref_vk: add more debug around VULKAN_SDK for CI 2021-06-07 10:14:04 -07:00
Ivan Avdeev
cb7fb0a1c5 ref_vk: attempt to fix win32 glslc path 2021-06-07 09:55:33 -07:00
Ivan Avdeev
6cd543927c ref_vk: update merge 2021-06-07 00:39:40 -07:00
Ivan Avdeev
266f407b40 ref_vk: use poolhandle_t 2021-06-07 00:16:54 -07:00
Ivan Avdeev
1e82ae7103 ref_vk: try another way to disable it on android 2021-06-06 23:36:37 -07:00
Ivan Avdeev
c5bb450a5a ref_vk: yet anothe var def 2021-06-06 23:14:35 -07:00
Ivan Avdeev
ef1f88005f ref_vk: force disable on android for now 2021-06-06 23:13:53 -07:00
Ivan Avdeev
22eec42a60 ref_vk: --//-- 2021-06-06 23:00:05 -07:00
Ivan Avdeev
ab215f35b6 ref_vk: --//-- 2021-06-06 22:55:49 -07:00
Ivan Avdeev
388f684f12 ref_vk: another var declaration fix 2021-06-06 22:46:04 -07:00
Ivan Avdeev
735bfbb8db ref_vk: fix unused var declaration 2021-06-06 21:59:23 -07:00
Ivan 'provod' Avdeev
656c00d0b8 fix building and running on linux 2021-06-06 14:17:35 -07:00
Ivan 'provod' Avdeev
b58eb5b4b2 rtx: slightly improve fake poc lighting 2021-06-05 13:06:03 -07:00
Ivan 'provod' Avdeev
00518d3251 rtx: implement dynamic lights
track brush models movement and update lights grid clusters with model transform and stuff

also implement animated textures for rtx

and also increase per-cluster lights limits
2021-06-05 12:48:16 -07:00
Ivan 'provod' Avdeev
43175ae003 update todo 2021-05-28 10:27:16 -07:00
Ivan 'provod' Avdeev
eaaadf024e rtx: coalesce building blases in a single command buffer 2021-05-28 10:10:20 -07:00
Ivan 'provod' Avdeev
74e7a00604 rtx: add AS memory and models validation
also fix new map cache cleanup
2021-05-26 10:55:46 -07:00
Ivan 'provod' Avdeev
ad2405547b rtx: rename model creation and move tlas creation 2021-05-26 09:35:36 -07:00
Ivan 'provod' Avdeev
44909ccbe5 rtx: improve render-ray interop
make a vk_ray_model_t that stores everything ray-tracing related, and can also be cached directly
2021-05-24 11:14:03 -07:00
Ivan 'provod' Avdeev
5de30a4ff0 fix compilation warnings 2021-05-24 11:12:44 -07:00
Ivan 'provod' Avdeev
35275e0916 add aftermath sdk for gpu dump generation
unfortunately, it's not very helpful tho
2021-05-22 14:01:43 -07:00
Ivan 'provod' Avdeev
947ad9d7fa update todo 2021-05-17 10:57:16 -07:00
Ivan 'provod' Avdeev
6614a6935b add debug names to various objects 2021-05-17 10:36:40 -07:00
Ivan 'provod' Avdeev
ddd7403bd0 rtx: implement draft blas caching
It still crashes on some maps, tho
2021-05-17 09:24:15 -07:00
Anton Baskanov
1ae5cfe548 rtx: presumably fix gray textures
Modulate the subsequent bounces with texture color. This makes it
consistent with the way surface lights and dlights work.
2021-05-14 15:04:51 +07:00
Ivan 'provod' Avdeev
fb05afb24c rtx: don't recreate tlas on every frame. improve fps 2021-05-10 09:17:03 -07:00
Ivan 'provod' Avdeev
5ddeb6853d rtx: fix corrupted geometry
TLAS creation pattern ended up allocating memory in a temporary region. It was later reused for BLAS data, and subsequently corrupted by TLAS rebuild.

Also fixed memory leak, added freeze-models command, added model debug code into shaders, etc.
2021-05-08 14:34:42 -07:00
Ivan 'provod' Avdeev
354eef1c0a rtx: fix validation complaint, ask for more caps 2021-05-08 14:30:33 -07:00
Ivan 'provod' Avdeev
be42bd29a5 add ring temp allocator logic 2021-05-03 11:17:01 -07:00
Ivan 'provod' Avdeev
819540d5ec rtx: move descset stuff into vk_descriptor 2021-05-01 11:48:24 -07:00
Ivan 'provod' Avdeev
9e8ca13dcc rtx: add studio models
but they crash a lot kek
2021-04-24 12:53:42 -07:00