Do you have the correct shader on the actual “foliage” models?
This is for the shader for my foliage models;
//foliage
models/mapobjects/flakcannon/fk_foliage01
{
surfaceparm trans
surfaceparm pointlight
cull disable
// distanceCull <inner&rt; <outer&rt; <alpha threshold&rt;
distanceCull 512 1024 0.4
{
map models/foliage/grassfoliage1.tga
alphaFunc GE128
rgbGen exactVertex
alphaGen vertex
}
}
models/mapobjects/flakcannon/fk_foliage02
{
surfaceparm trans
surfaceparm pointlight
cull disable
// distanceCull <inner&rt; <outer&rt; <alpha threshold&rt;
distanceCull 512 1024 0.4
{
map models/foliage/grassfoliage2.tga
alphaFunc GE128
rgbGen exactVertex
alphaGen vertex
}
}
models/mapobjects/flakcannon/fk_foliage03
{
surfaceparm trans
surfaceparm pointlight
cull disable
// distanceCull <inner&rt; <outer&rt; <alpha threshold&rt;
distanceCull 512 1024 0.4
{
map models/foliage/grassfoliage3.tga
alphaFunc GE128
rgbGen exactVertex
alphaGen vertex
}
}
At the top of my terrain shader (right under my _base section) I have this;
textures/flakcannon/terrain_foliage_base
{
q3map_baseShader textures/flakcannon/terrain_base
q3map_foliage models/mapobjects/flakcannon/fk_foliage01.ase 1.25 64 0.026 0
q3map_foliage models/mapobjects/flakcannon/fk_foliage02.ase 1.3 32 0.030 0
q3map_foliage models/mapobjects/flakcannon/fk_foliage03.ase 1 16 0.028 0
}
With that set up all I need to insert in my shader stages is;
q3map_baseshader textures/flakcannon/terrain_foliage_base
Example; this is one section of my terrain shader that I wanted foliage.
textures/flakcannon/terrain_1
{
q3map_baseshader textures/flakcannon/terrain_foliage_base
surfaceparm grasssteps
surfaceparm landmine
{
map textures/temperate_sd/master_grass_dirt3.tga
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbgen identity
}
}
Hope that helped.