Just a few questions related to the $lightmap keyword:
a) The good old Shader Manual says “use $lightmap always together with rgbGen identity”. Why? And also have “rgbGen identity” with the next stage that uses the actual texture map?
b) In most shaders, you’ll find the map $lightmap stage first.
But some shaders have the lightmap stage in second or third place, or even as last stage, e.g. E.T. textures/liquids/water_calm2 and textures/liquids/water_dam.
Why?
Example for both questions:
textures/misc/test1
{
qer_editorimage textures/misc/test1
{
map $lightmap
rgbGen identity
}
{
map textures/misc/test1
blendfunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
{
map textures/misc/test1_glow
blendfunc GL_ONE GL_ONE
rgbGen identity
}
}