Well since the search is borked… here we go with another thread about alpha blend trouble.
This is the shader for decal blending from socks simland stuff:
textures/terrain_example/dcl_moss1 // Decal blending
{
qer_editorimage textures/terrain_example/ter_moss1.tga
q3map_nonplanar
q3map_shadeangle 120
surfaceparm trans
surfaceparm nonsolid
surfaceparm nomarks
polygonoffset
{
map textures/terrain_example/ter_moss1.tga
alphaFunc GE128
rgbGen identity
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
depthFunc equal
}
}
If I use the map textures stage like that, I get a solid surface, and no fading against the markers since I use the stock tex temerate_sd/grass_dense1.tga (no difference if used with a 32bit and white alphachannel or just like it shipped with ET). I figure this is due to the totally white alphachannel or the fact that i used a 24 bit tga.
If I remove the alphaFunc like this:
{
map textures/temperate_sd/grass_dense1_a.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
//alphaFunc GE128
rgbGen identity
alphaGen vertex
}
I do get a smooth fading against the markers. Only it seems that the decal triangles don’t get a lightmap from the q3mapsun_ext from the skyshader (its emitting a blue light). The grass isn’t dark enough as you can see here:
So the question of the day is: How can I talk the non-transparent part of the blended stage into getting the same lightmap as the other terrain so I have the grass in the same blue-ed color?
Removing the depthfunc line does that trick, somehow… only the transparent areas of the blend will get the blue from the sky as well then, and the result are some dark blue triangles, which doesnt really look cool.
Any help is seriously appreciated!