PDA

View Full Version : How do I make a Double sidded Shader?


zero427
06-07-2002, 12:03 PM
Hey guys I was wondering how do I make a double sided shader

I read the shader manual on the q3radient website and said that "cull none" or "cull disable" would do it but when I try these I loose both sides of the texture. Si I end up with a floating head cause hte body and legs that use the shader are invisable. here is what I have tried:

models/players/MyModel/legs
{
cull none
}

models/players/MyModel/body
{
cull none
}

I also tried:

models/players/MyModel/legs
{
cull disable
}

models/players/MyModel/body
{
cull disable
}




Both of the produce the same result. both sides are getting culled insted of the culling being disabled I think. My models is ready to release other than this problem. Please help if you can.

thanks,

zero

Autero
06-07-2002, 07:00 PM
You need to use these two lines to make something double sided. Hope it helps.

cull twosided
//nopicmip

zero427
06-07-2002, 08:00 PM
This is what I have and it didn't work:

models/players/MyModel/legs
{
cull twosided
//nopicmip
}

models/players/MyModel/body
{
cull twosided
//nopicmip

}

I get the same result the textures that apply this to "body and legs" disappear and i get nothing same as the cuul disable and cull none commands did>

Autero
06-08-2002, 01:09 AM
That's odd, cause that works in Team Arena which is what JK2 is built on. This is the code I used for a custom head I built for Team Arena.

models/players/heads/cell/crownred
{
cull twosided
//nopicmip
{
map models/players/heads/cell/crownred.tga
//depthWrite
}
}
models/players/heads/cell/crownblue
{
cull twosided
//nopicmip
{
map models/players/heads/cell/crownblue.tga
//depthWrite
}
}
See if using this code as a base for your shader works.