Hello there,
I’ve been working with alpha blending & dot product2 for long already and never had problems in my last projects. Though now I’ve come across something I really couldnt fix. I’ve created a simple shader for a stone to dirt blend which is also blending perfectly.
Only the lightmap seems to be ****ed up since the alpha blended brush is always alot brighter and ignores shadows which should be cast on it. I’ve added an example picture to this thread. The lightning works quite fine if there is no shadow casted on the brush, but once its in the shadow of e.g. a house its not getting any darker.
This is the shader I use:
textures/fischerdorf_terrain/marktpflaster_to_dirt
{
qer_editorimage textures/fischerdorf/courtyard_brick2.tga
surfaceparm landmine
q3map_nonplanar
q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
q3map_alphaMod dotproduct2 ( 0.0 0.0 0.75 )
q3map_shadeangle 120
{
map textures/fischerdorf/courtyard_brick2.tga
rgbgen identity
}
{
lightmap $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbgen identity
}
{
map textures/temperate_sd/dirt3.tga
tcmod scale .5 .5
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbgen identity
alphaGen vertex
}
}
Please give me some tips =(
Those are the same brushes just copy&pasted into the shadowed area of the house…

thx for your input!