Commit Graph

6 Commits

Author SHA1 Message Date
Bill Currie cc4167668c Fix a pile of leaks and uninit errors
Still "some" more to go: a pile to do with transforms and temporary
entities, and a nasty one with host_cbuf. There's also all the static
block-alloc lists :/
2021-03-21 19:56:17 +09:00
Bill Currie bab3e0720f [vulkan] Implement real-time lighting
Light styles and shadows aren't implemented yet.

The map's entities are used to create the lights, and the PVS used to
determine which lights might be visible (ie, the surfaces they light).
That could do with some more improvements (eg, checking if a leaf is
outside a spotlight's cone), but the concept seems to work.
2021-03-20 16:08:44 +09:00
Bill Currie 4d8ce22c17 [vulkan] Load the map's lights into an array
It's not used yet as work needs to be done to better support generic
entities, but this is the next step to real-time lighting (though, to be
honest, I expect it will be too slow to be usable).
2021-03-03 18:14:16 +09:00
Bill Currie 33575f93d5 [vulkan] Implement deferred lighting for dlights
Static lights are yet to come (so the screen is black most of the time),
but dynamic lights work very nicely (and look very good) despite the
falloff being incorrect.
2021-02-25 15:51:54 +09:00
Bill Currie 918c3af095 [vulkan] Add a position buffer to the g-buffer
While I could reconstruct the position from the screen coords and depth,
this is easier and good enough for now. Reconstruction is an
optimization thing.
2021-02-25 13:46:33 +09:00
Bill Currie 10a1b99a92 [vulkan] Implement lighting and compose passes
Lighting doesn't actually do lights yet, but it's producing pixels.
Translucent seems to be working (2d draw uses it), and compose seems to
be working.
2021-02-24 19:58:31 +09:00