Page 1 of 1

Need help with a shader...

Posted: Sat Nov 01, 2008 5:25 am
by megatog615
Here's my example shader(used many times):

Code: Select all

shaderpath
{
    {
        map texturemappath
        rgbGen lightingDiffuse
    }
    { // enable specular lighting
        map $whiteimage
        rgbGen lightingDiffuse
        blendFunc GL_DST_COLOR GL_SRC_ALPHA
        detail
        alphaGen lightingSpecular
    }
}
Obviously I don't want two rgbGen lightingDiffuse functions in the same shader, as it darkens it. However, if I enable r_vertexLight with one lightingDiffuse function only in the first stage, the shader becomes white. How can I get it to be compatible with r_vertexLight but still only use one rgbGen lightingDiffuse and still have the detail attribute? If the diffuse lighting function were only in the second stage, the shader would be fullbright if r_detailTextures was set to 0!