Need help with a shader...

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
megatog615
Posts: 13
Joined: Fri Nov 16, 2007 12:30 am

Need help with a shader...

Post 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!
Post Reply