Here is an example of how to map lightmap onto a transparent surface (i.e. graffiti, tree branches,...).
Code:
textures/ut_faks2/gr-ntr
{
surfaceparm nonsolid
surfaceparm trans
polygonOffset
nomipmaps
nopicmip
{
map textures/ut_faks2/gr-ntr.tga
blendfunc blend
alphafunc GE128
depthwrite
rgbgen identity
}
{
map $lightmap
rgbgen identity
blendfunc filter
depthfunc equal
}
}
polygonOffset is not needed for tree branches, but is needed for graffiti, cracks, stains, etc.
This example is from
ut_faks3 and is used for "NATIRIPS" graffiti.
This is what it can look like in-game (wall is one brush and graffiti is an overlapping brush that causes z-fighting in the editor but polygonOffset fixes z-fighting in-game):
Attachment:
shot0143_.jpg