Page 1 of 1

visible - invisible

Posted: Sat Jun 07, 2008 1:59 pm
by Rawing
i'm trying to make a klesk-skin: first it should be invisible but then it has to become visible.

models/players/klesk/nightmare
{
{
map models/players/klesk/[invisible picture here]
blendfunc blend
rgbgen lightingDiffuse
}
{
map models/players/klesk/nightmare.tga
blendfunc GL_ONE GL_ZERO
rgbGen identity
rgbGen wave triangle .5 1 0 .5
}
}
doesn't work. i tried something like 30 different methods of making it invisible, but nothing worked. help please.

Re: visible - invisible

Posted: Sat Jun 07, 2008 3:41 pm
by obsidian
I suppose by invisible, you mean just the second stage only and not the entire shader?

rgbGen modulates vertex colours. It doesn't have anything to do with transparency. I think you want to use alphaGen wave.

Also, you wouldn't have two rgbGen values anyway. Use one or the other, not both. You don't need to specify blendFunc GL_ONE GL_ZERO since that is essentially, no blending at all.

Re: visible - invisible

Posted: Mon Jun 16, 2008 1:25 pm
by Rawing
so, how would the correct version of the shader look like?

Re: visible - invisible

Posted: Mon Jun 16, 2008 5:38 pm
by obsidian
I'm not going to write it for you otherwise you won't learn anything. But I already told you everything you need to do to make the shader work.

Re: visible - invisible

Posted: Tue Jun 17, 2008 3:49 am
by Rawing
LOL?? if i would be able to write it myself, i wouldn't have asked how it would look like.