on amd gpus it won't draw anything at all unless you have the entire ray tracing pipeline set up fully and correctly:
- have at least rgen, rmiss and rchit shaders
- set up shader groups to reference them
- set up sbt to reference shader groups
it is not enough to just have a single rgen shader operating like a compute shader. amd will have a shader preamble that checks for something and exit early w/o actually running any shader code you wrote
meh
An incorrect range of used vertices was pased into `VkAccelerationStructureGeometryTrianglesDataKHR`.
`maxVertex` was being set to a count of vertices per geometry, not a maximum used vertex number.
The fix is to track `vertex_offset` of the first used vertex, which makes `maxVertex` correct.
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
TLAS creation pattern ended up allocating memory in a temporary region. It was later reused for BLAS data, and subsequently corrupted by TLAS rebuild.
Also fixed memory leak, added freeze-models command, added model debug code into shaders, etc.
Unfortunately Xash3D doesn't allow us to destroy models properly.
It doesn't call Mod_ProcessRenderData for all brush models (only map).
And by the time we get into R_Shutdown all models are already gone, so
we can't enumerate and destroy them properly.
Toilet contained brush model with presumably water surfaces which
were not loaded due to how we treat surface flags. That ended up
creating a model with no geometries, which is just rude.
We don't try to render those kind of models now.
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
This is a massive hack, because we hardcoded some valve/lights.rad file
right into vk_rtx.c, and this is most certainly is not correct data. We
expect maps to have more custom rad file entries.
TODO: consult https://github.com/MaestroFenix/Half-Life-Resized-Maps
Also, emissive surfaces are no importance sampled, so it's noise fest.