- make staging/prep phase use separate command buffer
- flush this command buffer early if needed
- move command pool to its own module
- move shader loading stuff to pipeline module
- cleanup lots of command buffer passing for model loading, it can use staging explicitly now
this skips 40ms+ grid upload cost, and seems generally just a few ms more costly than sampling clusters.
however, there are sync glitches for reasons unknown.
for some reason joining them leads to "invalid spirv" validation errors (and broken lights).
split the bindings back making shaders essentially unchanged, while still keeping a single physical buffer
known issues:
- visible cluster boundaries which affect sampling outcomes
(essentially clusters act like very coarse shadows, and that's visible)
moving brush models are not supported yet, affects perf measurements
also change:
- pass plane equation instead of just normal
- pass area separately
- pack vertices offset+count into single integer
582us, 224(224)v, 97(128)v, 4096lds, 2/16o (-53v => +1)
also start refactoring light collection
broken:
- reloading lights after patching
- wagonchik lights (attached to non-static models)
missing:
- clustering the new poly lights
- proper sampling, only rough estimate for now
- shadows
probably a lot more
Light polygons that are:
- self-sufficient (no kusochki indirection needed).
- pre-transformed
- contain enough metadata (area, center, normal) for quick sampling
- are polygons with up to 7 vertices and not triangles (easier sampling)
Also move rad file reading to before brush model loading, as it now
requires lighting data.
Just increase point lights limit per light cell.
Also:
- update infotool to show point lights info
- move light cluster finalization to vk_scene to make sure infotool has
the recentmost data
Do not skip 0th leaf when iterating through R_FatPVS results.
Also:
- move infotool from camera.c to infotool.c
- add hit coords to infotool
- add limited light clusters info into infotool
- add a bit more debug info to light clusters
fixes#279
example:
```
{
"_xvk_surface_id" "489"
"_xvk_texture" "#maps/test_material.bsp:debug_normal1.mip"
}
```
if _xvk_texture is empty, then the surface will be deleted
surfaces can be deleted or their
- change how shadows for environment lights work: should cast light only when hitting SURF_SKY
- add SBT_RECORD_SIZE to specialization; need this for sky/shadow closest hit shader
fix#140