- explicitly group cache-related fields
- move kusochki allocation to where it's actually used
this makes a step towards better blas management from bottom up
Draft the new accel/blas apis. Consolidate everything accel-related into
vk_ray_accel.c. Start splitting into more atomic functions. Prepare for
blas-model+kusochki split. etc etc.
The new code isn't really used yet.
1. Rename models passed to TLAS to instances.
2. Remove BLAS validation: old, doesn't make sense anymore.
3. Draft general blas mgmt approach in NOTES.md
Fixes blending differences in test_brush/test_sprite maps. They now look
fairly similar (modulo color correction).
OIT is still a bit off, but good enough for now
Known issues:
- apparently BLEND_MIX surfaces should also participate in lighting. Figure out how.
- sensitive to ray tracing order. Need proper OIT (or hacks)
This required uploaded kusochki only later during frame time, just before rendering the model. Otherwise they would get incorrect rendermode.
Also add blend mode debug colors.
They have mismatching frequencies. ModelMetadata should be per-Model, there should be only a few dozen of these.
There maybe hundreds (or even thousands) of materials, but one material can be still referenced by many kusochki.
This only moves fields into new structs, which still belong to Kusok. The real extraction will happen later, see #52.
Fixes#330
Also, fix incorrect patch application introduced by previous commit, it
would not read the patch color value, and could only switch the light
off.
Do not entangle brush model loading with loading surface lights.
Do a separate pass over brush model surfaces for the sole purpose of
finding light sources. Enables consistent live-reloading light data
after patching entities/surface/rad files.
this is not correct, but at least we get to see something
need to figure out how should blending work in rt:
- translucent materials that absorb light
- reflective+refractive
- etc