Alright, I have this waterfall shader I’m trying to get to work in a map. All goes well so far except that the sides of the waterfall are all black like this:
When they should be fully transparent. These are the three images I am using, all of them are .tga’s and I did color to alpha with a color value of 000000 (black) so anything black should be transparent.
And here is the shader I’m using.
textures/batcave/waterfall
{
qer_editorimage textures/batcave/wf1
qer_trans 0.65
sort banner
surfaceparm nonsolid
surfaceparm nonopaque
surfaceparm trans
surfaceparm nomarks
surfaceparm water
q3map_material water
deformvertexes normal 0.1 0.1
deformvertexes wave 64 sin 0 0.75 0.2 1
cull none
{
map textures/batcave/wf3
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
tcMod scroll 0 -0.35
}
{
map textures/batcave/wf2
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
tcMod scroll 0 -0.75
}
{
map textures/batcave/wf1
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
tcMod scroll 0 -1
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}
I found that when I removed the lightmap the textures were fullbright and didn’t have any color but the black edges were gone. So this leads me to believe the problem is with the lightmap or it’s blend function. I opened the shader in shaderEd and looked through all the different blend functions but its hard to tell what it will look like in-game. Just taking the lightmap out is obviously not an option because a super bright glowing waterfall would just look weird.