adds multiple command buffers and bits of synchronization.
is not correct at all:
- no depth buffer barrier
- no ubo slots in render
- no proper render memory management
- no ray tracing support whatsoever
- ... etc
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.
- 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
1. make sure that it can find studio textures by name exactly (no wad or
other weird prefixes necessary)
2. do not apply HACK_reflective to chrome that already has a patched
material
1. Probabilistically let ray through material or reflect it based on
transparency probability (which is essentially just alpha for now).
2. Introduce opaque flag to be able to treat transparent objects as not
casting shadows. This is not very realistic, but oh well.
after we've updated how brush index buffer references vertices to allow
for draw call coalescing ray tracing broke on amd.
this is because amd cards expect a correct value in
VkAccelerationStructureGeometryTrianglesDataKHR::maxVertex. make sure we
fill a correct value there.
this is very proof-of-concept quality. it should be definitely done some other way
e.g. we should control reflectivity and transparency differently (and not together)
and they should be based on texture ids, not on render_mode
it's also unfortunate that transparency required a lot of bounces. we should probably control transparency bounces separately from light bounces.
alternatively, transparency effects (beams, sprites) should be done with custom intersection shaders and not based on transparent geometry