Page 1 of 1

shader error

Posted: Thu May 06, 2004 8:37 pm
by agentmad007
hi ,
i dont know if i have to ask here or scripting forum

its about shader ...i compiled my map and when i loaded it i had just the time to see 2 sec my wall before to get kicked

then i opend console and here is my errror:

Code: Select all

tableforfunc called with invalid function '8' in shader 'textures/sgcanims/evfront' 
and here the sgcanim's shader

Code: Select all

textures/sgcanims/evback
{
    qer_editorimage textures/sgcanims/evback.tga
    q3map_surfacelight 10
    surfaceparm nolightmap
    surfaceparm water
    deformVertexes wave 128 sin 0 1 0 0.75
    {
        map textures/sgcanims/evback.tga
        blendFunc GL_ONE GL_SRC_COLOR
        tcMod rotate 20
        tcMod stretch sin 1.05 0.05 0 0.5
    }
    {
        map textures/sgcanims/evback.tga
        blendFunc GL_ONE GL_ONE_MINUS_SRC_COLOR
        tcMod rotate -10
    }
    {
        map textures/sgcanims/evback.tga
        blendFunc GL_ONE GL_ONE_MINUS_SRC_COLOR
        tcMod rotate -40
        tcMod stretch sin 1.05 0.05 0 1
    }
}

textures/sgcanims/evfront
{
    qer_editorimage textures/sgcanims/evfront2.tga
    q3map_surfacelight 10
    surfaceparm nolightmap
    surfaceparm water
    deformVertexes wave 128 sin 0 1.5 0 0.75
    {
        map textures/sgcanims/evback.tga
        blendFunc GL_ONE GL_ZERO
    }
    {
        animMap 6 textures/sgcanims/evfront2.tga textures/sgcanims/evfront4.tga textures/sgcanims/evfront6.tga textures/sgcanims/evfront8.tga textures/sgcanims/evfront6.tga textures/sgcanims/evfront4.tga 
        blendFunc GL_ONE GL_ONE_MINUS_SRC_COLOR
        tcMod rotate 20
        tcMod stretch sin 1.05 0.05 0 0.3
    }
    {
        animMap 6 textures/sgcanims/evfront2.tga textures/sgcanims/evfront4.tga textures/sgcanims/evfront6.tga textures/sgcanims/evfront8.tga textures/sgcanims/evfront6.tga textures/sgcanims/evfront4.tga 
        blendFunc GL_ONE GL_ONE_MINUS_SRC_COLOR
        tcMod rotate -10
        tcMod stretch noise 1.1 0.1 0 1
    }
}

thankx for help i guess would not be so easy to help with such shader !!!!

ty

second layer

Posted: Thu May 06, 2004 8:56 pm
by tltrude
Try using this for the second layer (the one in the middle).

blendFunc GL_DST_COLOR GL_ZERO

I have no idea if it will work.

Posted: Fri May 07, 2004 2:45 am
by agentmad007
ok thanks for you help .......it dont work i tried several things ....i used a water shader as model ........

Posted: Fri May 07, 2004 7:53 am
by jv_map
Try commenting out this line
tcMod stretch noise 1.1 0.1 0 1

i.e., make it
// tcMod stretch noise 1.1 0.1 0 1

to temporarily disable it :)

Posted: Fri May 07, 2004 10:37 am
by crunch
Can a shader have an animMap command?
I have never tried it, but I have previously only seen animMap in .urc files......

Posted: Fri May 07, 2004 11:06 am
by agentmad007
thank you jv_ map i will try
and post if it work or no

crunch ==> yes you can add the command animap in a shader you can go in recycling bin of wacko( btw where is wacko??????) to download fire Torch and the moving belt ....there is animap inside ......very cool effect !

Posted: Fri May 07, 2004 11:51 am
by agentmad007
With jv_map solution i can access the game without get kicked but the effect looks very bad :( maybe i ll try to change value of this stretch noise i dont know how that work ......

TV

Posted: Fri May 07, 2004 11:53 am
by tltrude
Change "noise" to "sin" and it should work.

I used an animMap texture shader in my door2 map, for the TV. Click on my signature logo, if you don't have it.

Posted: Fri May 07, 2004 12:03 pm
by agentmad007
thanks tltrude i will try with sin instead of noise

and i have your animap form tv yes thank you ......i ll post the result in 10 minutes

Posted: Fri May 07, 2004 12:58 pm
by agentmad007
work but strange effect also another one ......hehe texture bouce like a kangoo ah ah (effect )

its funny!

the best is if someone now how work that deformvertexes shader and explain the value and what they do ......

i read some about q3 manual but they dont explain value and with my poor english i was totaly lost

thx