Jump to content

Alpha shader


Delmi

Recommended Posts

Hey guys,

 

Can someone jog my memory as to how to do alpha channeling to make certain parts of a skin invisible without using the *off function?  Using Photoshop CS6 and I've gone through a few tutorials via Google (aka I'm not interested in some lulzy reply with a lmgtfy link) and I still can't get the parts to go away in ModView or ingame.  Any suggestions?

Link to comment

The only reasonable way to do transparency is with (effectively) a 1 bit alpha channel, i.e. either on or off. To this end you'd use an alphaFunc in your shader to define the cutoff point (e.g. GT0 to make alpha 1-255 visible, LT128 for 0-127, GE128 for 128-255 or GE192 for 192-255). You'd still use an ordinary blendFunc as with normal solid shaders, I believe, since the alphaFunc takes care of transparency, so I don't think an explicit depthWrite is required.

 

This will only be visible ingame; ModView completely ignores shaders, but you can enable alpha blending in the menu (which is more akin to blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA, with the same problems: there's no depth sorting, so you get visual glitches.)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...