Commit Graph

28 Commits

Author SHA1 Message Date
Ivan 'provod' Avdeev 656c00d0b8 fix building and running on linux 2021-06-06 14:17:35 -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 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 ddd7403bd0 rtx: implement draft blas caching
It still crashes on some maps, tho
2021-05-17 09:24:15 -07:00
Ivan 'provod' Avdeev be42bd29a5 add ring temp allocator logic 2021-05-03 11:17:01 -07:00
Ivan 'provod' Avdeev 9e8ca13dcc rtx: add studio models
but they crash a lot kek
2021-04-24 12:53:42 -07:00
Ivan 'provod' Avdeev b1f85a05a4 rtx: make light clusters grid-based 2021-04-16 11:43:37 -07:00
Ivan 'provod' Avdeev ad7b210228 rtx: improve surface lights
use bsp/pvs-based visibility data for acceleration:
+ fps 5 -> 60
- correctness: some areas have too many lights, which ends up culling visible ones too

also fix shadow artefacts
2021-04-12 11:07:41 -07:00
Ivan 'provod' Avdeev 0407f12638 rtx: read kusochki data, add dynamic lights back
also add fps
2021-04-10 12:46:37 -07:00
Ivan 'provod' Avdeev 3a8f2ebc45 rtx: build blas and tlas only once 2021-04-09 14:59:04 -07:00
Ivan 'provod' Avdeev af5e20269d add persistent model api and use it for brushes
this needed for better rtx blas management
2021-04-07 12:11:20 -07:00
Ivan 'provod' Avdeev b81a36a850 rtx: make beams emissive 2021-03-15 10:49:45 -07:00
Ivan 'provod' Avdeev 379f6ee409 rtx: add static light entities
This was an attempt to add map lighting w/o lightmaps. Unfortunately
there are just not enought of them to explain all light in maps. We're
missing something else. A lot of it.
2021-03-13 16:33:17 -08:00
Ivan 'provod' Avdeev 7fa3f2dc8d render: split mvp matrix to separate model,view,projection matrices
This will help with RTX model transformations.
2021-03-13 13:35:50 -08:00
Ivan 'provod' Avdeev 77288a205b rtx: read vertex normals according to isec indexes
Had to align vec3 fields of vk_vertex_t.
2021-03-08 12:09:11 -08:00
Ivan 'provod' Avdeev cbed97948c add preliminary support for dlights
Move descriptors away from vk_core
Add UBO for dlights
Add test lighting in brush shader
Add brush normals
2021-03-06 16:40:35 -08:00
Ivan 'provod' Avdeev 28cdeaeb1d propagate proj/view matrices to rtx shader
And get RTX picture we deserve (i.e. glitchy and incorrect).
Will fix later.
2021-03-03 11:58:40 -08:00
Ivan 'provod' Avdeev e0ee4b756b rtx: make it draw yellow screen
this basically checks that acceleration structurs are building without
any vulkan errors (we still don't know whether they are bulding with
correct geometry though).

we also have compute shader pipeline ready for ray tracing (yay)
but it doesn't do any raytracing yet
2021-03-01 11:22:58 -08:00
Ivan Avdeev 5e3010489b rtx: blindly add tlas and compute rendering
it's unknown whether it works at all
no real ray tracing yet
2021-03-01 10:52:08 -08:00
Ivan Avdeev 9954288450 rtx: add blas building skeleton 2021-02-27 13:43:49 -08:00
Ivan Avdeev 973ef4c677 separate buffer space allocation from buffer uploading
Now each geometry is first allocated a slot with VK_RenderBufferAlloc,
and then VK_RenderBufferLock/Unlock are used to upload buffer contents.

This allow for two things:
1. Uploading buffer data to GPU memory on/after Unlock.
2. (Re)building BLAS for RTX on/after Unlock.

These buffers are now directly referenced by render_draw_t, which also
will be helpful in the future for both renderers.
2021-02-22 18:57:46 -08:00
Ivan Avdeev 3f70b76208 engage scene rendering in VK_RenderFrame and not in EndFrame
Rework a bit how matrices are computed. More global state dependencies
;_;

Buffer-up draw commands, and only schedule them for drawing at EndFrame.
2021-02-20 14:54:57 -08:00
Ivan Avdeev 8dc0d4256d add VK_RenderDebugLabelBegin/End calls; fix studio model labeling 2021-02-20 12:35:04 -08:00
Ivan Avdeev e66810a05b remove ubo management from "public" vk_render api
Now rendering submodules specify their colors and matrices using
VK_RenderState global stat api. This is a trade-off between making all
submodules track their state on their own, or managing that state
centrally.
2021-02-20 12:00:31 -08:00
Ivan Avdeev 3b1e7be112 add beams rendering
not all beam types are supported yet

also changes studio api init sequence, fixes missing cvars
vertex type struct is no longer names as brush-specific
uniform buffer allocation is now in vk_render

blending issues still remain
2021-02-17 13:26:09 -08:00
Ivan Avdeev 778cc60453 add broken studio models drawing
there are several issues with it:
- there are holes in models
- movement is jerky
- no lighting applied
2021-02-13 17:19:59 -08:00
Ivan Avdeev 5ebe36c54c move buffer allocation to vk_render.c from vk_bruh.c 2021-02-10 10:33:44 -08:00
Ivan Avdeev ad5d515200 move entity enumeration from vk_brush to vk_scene 2021-02-08 10:57:27 -08:00