Home Technical Talk

Anyone good with Q3 shaders?

ngon master
Offline / Send Message
almighty_gir ngon master
ok, heres the deal. im trying to get the transparency shader working for one of my character model's hair. and it does. to some extent.

here is the current shader:
<font class="small">Code:</font><hr /><pre> models/players/sephiroth_jacket/hair
{
cull disable
{
map models/players/sephiroth_jacket/hair
blendFunc gl_src_alpha gl_one_minus_src_alpha
depthwrite
rgbGen lightingDiffuse
}
} </pre><hr />

now, if i remove the depthwrite function, the hair surface becomes completely translucent if it passes in front of any other shader, which happens to be just about anywhere in any given level.
if i leave the depthwrite function in, the alpha is generated the way i want it to be, and it works with a nice blend so that the hair looks the way it does in photoshop and max. the only problem is, that all the parts of the surface which are affected by the alpha, also affect any other alpha shaders in the level. for example a running stream of water becomes invisible, as does the skybox, and any fog etc.

i was wondering if anyone could possibly help me with this, i can grab some screenshots later if you need examples.

Replies

Sign In or Register to comment.