This thread is meant to be a dump of info about VDrift lighting, materials, textures which will end up in the wiki in a more distilled form.
The second texture has been giving me some headaches. I will be reviewing the shader code and try to document what actually happens there.
RGB channels of the second texture store fresnel reflection at normal incidence (angle of incidence = 0°).
Fresnel reflectance describes the reflectivity of a surface in dependency of the view angle. It looks like this:
The reflectance will go up with increasing angle of incidence. VDrift is using Schlick's approximation, but with power of 3 instead of 5.
Why are 3 channels (RGB) used for it? It turns out that the reflectance is frequency dependent. For gold, silver and aluminium it looks like this:
What does that mean for an artist? With RGB set to 1.0 and A to 0.0 he should get a perfect mirror. This is unfortunately not what happens in VDrift currently, needs to be fixed.
So what is the deal with the A channel? The A channel stores the info about surface roughness. With higher values surface reflections should become blurrier, with reduced specular highlights. It will look more dull.
With higher roughness the diffuse component will be increased and the specular reduced: