Still doesn't work for us, as we also have purely emissive/additive
polygons. wOIT doesn't seem to support that fundamentally, each surface
should still attenuate the background.
Didn't even get to the _weighted_ part of it because of that.
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.
That PR has more stuff in it which we decided to drop.
This commit only contains:
- Detection of func_wall models, and adding their lights as static
(fixes#415).
- Patching func_wall models offsets, #335. Does not yet patch them
visually, but patches their light sources. Will be addressed in next
commits. Patching is done via model name, not entity id, also will be
fixed.
- Does not address culling (#118). This is the part dropped from the PR.
Needs different approach. TBD
de_cbble contains a bunch of floating boxes, which makes sunlight leak if internal back-facing surfaces are culled.
Generally, we should not be culling ray traced triangles (unless absolutely necessary for correctness), as it makes the shader perform additional unnecessary checks.
Try disabling culling universally and see whether it breaks anything.
Fixes#507
Consolidate VkCommandBuffer management into a single entity. (somewhat
done for framectl, not done for staging)
Make sure that we pass enough metadata to be able to timestamp scopes in
cmdbuf.
It does compile, but it won't work: not all init code paths are used.
Also, there are many changes, so other failure modes are totally
possible.