18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 15:17:08 +01:00
Files
maszyna/rendering/vulkan14
maj00r 6c7ec65825 feat(render): the skinned parts of EU07M models moved by a compute shader in Vulkan
The skinning of stage 4 moved the vertices on the CPU and replaced the geometry of each instance. The Vulkan renderer moves
them in a compute shader now; GL 4.6 stays on the CPU.

- gfx::skin_cache: the walks only work out the palette of the joints; flush(), before the walks of the next frame, moves
  the vertices of the instances whose pose changed: through the new GfxRenderer->Skin_Geometry() where the renderer can,
  else on the CPU with Replace / Replace_Indexed as before. A chunk made or emptied makes the buffers of the bank anew from
  the vertices the CPU holds, so every instance skinned on the GPU is moved again then.
- Vulkan (rendering/vulkan14/vulkan14skinning.cpp, shaders/vk14/skin.comp): the bind pose with the weights of a skinned
  part goes to the GPU once, the palette in the ring of the frame; the kernel writes the moved vertices over those of the
  chunk of the instance in the buffer of its bank (gfx::basic_vertex), with barriers against the copies of the uploads and
  the draws of the frames before, and before the draws of the frame. The vertex buffers of the plain banks get the
  storage usage. The kernel is made the first time a part is skinned; without it the CPU moves them.
- eu07.ini: gfx.skinning.gpu (default yes); no moves them on the CPU in Vulkan too. Both give the same picture.

Checked in Vulkan: a tube of two joints turned by 60 degrees, GPU against CPU, with gfx.gpucull 0 and 1: no pixel
differs, and the log shows the kernel ran. Two instances, the second posed later: the first keeps its pose through the
rebuild of the bank, the same as on the CPU. A clip moving the tube every frame. GL 4.6 after the change of the cache:
both instances bent as before (time let run in the editor for the tests only). Unit tests 1200/1200. Not measured on a
large scene, not built with GCC here.
2026-11-29 01:17:01 +01:00
..
2026-11-17 01:02:52 +01:00
2026-10-26 15:51:56 +01:00
2026-10-26 15:51:56 +01:00
2026-11-17 01:38:17 +01:00