i have this problem:

some brushes have bad blending and i cant figure out why is that…
shader for compiler:
textures/rail/common/terrain_rail
{
q3map_terrain
surfaceparm nodraw
surfaceparm nomarks
surfaceparm nolightmap
}
textures/terrain/rail_base
{
q3map_lightmapsampleoffset 8.0
q3map_lightmapaxis z
q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
}
textures/terrain/rail_0
{
q3map_baseshader textures/terrain/rail_base
{
map textures/test_map/ground_old.jpg
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}
textures/terrain/rail_1
{
q3map_baseshader textures/terrain/rail_base
{
map textures/rail/railway.jpg
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}
textures/terrain/rail_0to1
{
q3map_baseshader textures/terrain/rail_base
{
map textures/test_map/ground_old.jpg
}
{
map textures/rail/railway.jpg
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}
textures/terrain/rail_1to0
{
q3map_baseshader textures/terrain/rail_base
{
map textures/rail/railway.jpg
}
{
map textures/test_map/ground_old.jpg
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}
shader for game engine:
[textures/terrain/rail_0]
[textures/terrain/rail_0_p_1]
param1=map textures/test_map/ground_old.jpg
param2=rgbgen vertex
[textures/terrain/rail_1]
[textures/terrain/rail_1_p_1]
param1=map textures/rail/railway.jpg
param2=rgbgen vertex
[textures/terrain/rail_0to1]
[textures/terrain/rail_0to1_p_1]
param1=map textures/test_map/ground_old.jpg
param2=rgbgen vertex
[textures/terrain/rail_0to1_p_2]
param1=map textures/rail/railway.jpg
param2=rgbgen vertex
param3=alphagen vertex
param5=blendfunc gl_src_alpha gl_one_minus_src_alpha
[textures/terrain/rail_1to0]
[textures/terrain/rail_1to0_p_1]
param1=map textures/rail/railway.jpg
param2=rgbgen vertex
[textures/terrain/rail_1to0_p_2]
param1=map textures/test_map/ground_old.jpg
param2=rgbgen vertex
param3=alphagen vertex
param5=blendfunc gl_src_alpha gl_one_minus_src_alpha
terrain has 2 layers (using indexmap)
… its not a Q3A engine (its our own engine), however it supports almost all standards of Q3A - old vertexlight terrain build with q3map work fine, problem appears now when i use lightmap terrain (q3map2)
i would be thankful for any ideas…


