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.
Add another flag to kusochki for glow geometry. Move flags to a new kusok.flags field.
- [x] Fixes#231 (or at least makes it not stand out too much)
Fix the way we check for environment/skybox lights, explicitly look for closest hit instead of any.
- [x] Fixes#424 and #413
Doing tereminate-on-first-hit is incorrect, as we might accidentally hit the skybox geometry first, and consider this as no shadow.
Unfortunately we have to explicitly find a closest hit and check whether that was a skybox.
Maybe there's even a better way, e.g. querying for skybox-only geometry first, and only then checking for a terminate-on-first-hit for everything else. But it likely doesn't matter that much, and would need profiling anyway.
Fixes#424 and #413
vk rt: fix reprojection
Right way to put previous model matrix
Fix bad index of previous frame
Fallback to current frame if previous frames are outdated
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
Lerping between sprite frames means drawing two coplanar quads blended the right way. This is not something ray tracing can accommodate easily for all blending modes.
Disable lerping for now
Instead of passing model color around as an implicit global state, pass it per-model.
This makes it (a) easier to track, (b) easy to fix blending issues. E.g. this fixes incorrect coloring of brush and studio models, which is also different.
still not fully there:
- glow is slightly off
- TransAlpha has wrong blending mode
apparently pipeline settings for brushes, models, and sprites are substantially different, need different pipelines
change how device extensions are checked
make nv_checkpoint not depend on rt
split it logically from aftermath
don't crash when this extension is not available