For best result (and fastest for the renderer's multitexturing path), have the detail stage AFTER the lightmap.
If you use q3ase to build shaders, ignore its warnings about the detail layer. It knows nothing.
For example:
textures/base_floor/clang_floor
{
surfaceparm metalsteps
{
map textures/base_floor/clang_floor.tga
rgbGen identity
}
{
map $lightmap
blendfunc filter
rgbGen identity
tcGen lightmap
}
{
map gfx/fx/detail/d_met.tga
blendfunc gl_dst_color gl_src_color
rgbGen identity
tcMod scale 8 8
detail
}
}
Yeah, now I have to go back and fix a lot of my detail shaders. OA has so many textures to stick a detail on this is going to take a while, and some i'm not even sure what material to use (i.e. slimefac's abstract patterns).
Grates, and other alphatest stuffDon't forget your depthFunc equals on the detail stage
textures/base_support/x_support
{
surfaceparm metalsteps
{
map textures/base_support/x_support.tga
rgbGen identity
depthWrite
alphaFunc GE128
}
{
map $lightmap
blendfunc filter
rgbGen identity
tcGen lightmap
depthFunc equal
}
{
map gfx/fx/detail/d_met2.tga
blendfunc gl_dst_color gl_src_color
rgbGen identity
tcMod scale 8 8
depthFunc equal
detail
}
}