Custom light shaders and q3map2 ?


(stil) #1

I can’t get these to work! :slight_smile:

Here is my shader.

"
textures/pac_light/pac_light_A
{
//bright white KP light
q3map_lightimage textures/lights/light_c01.blend.tga
qer_editorimage textures/lights/light_c01.tga
q3map_surfacelight 900
surfaceparm nomarks
{
map $lightmap
rgbGen identity
}
{
map textures/lights/light_c01.tga
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
{
map textures/lights/light_c01.blend.tga
blendFunc GL_ONE GL_ONE
}
}
"
It’s just a quick copy of a rtcw light shader. I needed to adjust the brightness manually.
Anyway, this light texture works normally with vertex lit levels, but not in lightmapped q3map2 levels. I get the dreaded grey/black lines missing texture image slapped onto the light faces, instead of the light texture ?

The shader is listed in shaderlist.txt …and, yeah, I have no idea what else to check at the mo.


(FSF-Moses) #2

I don’t know if you’ve checked this but are the images in the correct paths as defined in your shader?


(stil) #3

Wel, they are id’s default paths, so I’m assuming that they are right :wink:


(Hewster) #4

Try copying the textures to a new folder,
and adjust your shader paths accordingly.

Hewster


(ydnar) #5

Change texture.blend.tga to texture_blend.tga. The double-suffix can bork the image loader.

y


(Hewster) #6

did you fix this problem stil ?

Hewster


(stil) #7

Yes, the texture works now :slight_smile:

Here’s the new shader.


textures/pac_light/mylight_A
{
    //bright white KP light
    q3map_lightimage textures/pac_light/mylight_A_blend.jpg
    qer_editorimage textures/lights/light_c01.tga
    q3map_surfacelight 1050
    q3map_backsplash 0.9 20
    surfaceparm nomarks
    {
        map $lightmap
        rgbGen identity
    }
    {
        map textures/pac_light/mylight_A.jpg
        blendFunc GL_DST_COLOR GL_ZERO
        rgbGen identity
    }
}

I change a few things at once, before I tried a new build. I’m unsure as to whaty exactly the problem was, but I’m happy anyway :>