Я подобрал новое компромиссное значение которое не требует clamp.
Это не идеально, но пока сойдёт. Может давать немного больше солнечных зайчиков чем с clamp.
Позже надо будет разобраться с самим kusok.emissive.
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.
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
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