1. add a way to enable only certain lights
2. add commented out code to highligh affected light clusters, culling
modes, etc.
3. add affected light clusters counter when collecting lights
xash tries to render a couple of frames after map has been destroyed and
before the new one was created (R_NewMap called). vk_light expects map
to be there at all times, so it tries to reference things that don't
exist.
boom
here we just check that map exists, and if it doesn't we just skip
referencing lights.
no boom.
we have a limited buffer for string when reading tokens and no way to
specify buffer space. just increase buffer size.
proper fix would be to change ref api to allow passing buffer size as an
argument.
Base lights.rad/valve.rad from worldcraft v2.0 or HLSDK (thx Valve).
Base c1a0.rad and c1a0d.rad from HLSDK (thx Valve).
Some texture name get from hl_lights.rad by Hezus (thx Hezus and SNMetamorph for file).
Others was mined by me manually through bspguy and etc.
File structure and formatting redesigned.
Some numbers have been rounded for convenience.
Added splitting by WAD files (for the present only for lights.rad).
See README.txt for codestyle.
New Vulkan SDK (1.2.189.2) has a new validation check that verifies that AS build scratch buffer has been created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT.
The core of the issue is that there are backfacing interpolated normals, NdotL and/or NdotV end up being negative for them.
Things we tried:
1. Explicitly using geometry normals for some things. Doesn't really work that well.
2. Clamping NdotX to some small value instead of just ignoring light contribution. Works better, but there are still some artifacts.
1. I suspect that we don't actually need to compute emissive contribution even for specular. Except when doing direct lighting.
2. Using emissive color as is looks orders of magnitude too bright. It should be scaled by something. But by what? Try to use to-metric mapping similar to direct lighting for testing.
It was missing msurface_t reference which is (unnecessarily) required for light clusters computation
Also add more verbose debug names for dynamic models.
how: we do not need to add emissive when doing diffuse gi bounce, as contribution from these lights will be computed in computeLighting.
They only need to be sampled for specular bounce.
The rest of the acne should be mitigated by denoiser i think.
Fix#51