Jump to content

Alpha shader


Delmi

Recommended Posts

Posted

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?

Posted

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.)

Posted

ModView completely ignores shaders

that's wrong ,it reads shaders, atleast the version I have does - but it does not display the end result of the shader

Delmi likes this
Posted

ModView has always shown alpha shaders for me.

 

But my confusion isn't about the shaders anyways, it's about the process with the texture itself. 

Posted

Have an alpha channel, save as png or tga. Not sure where the problem is? Sorry, but this does sound like an excellent thing to google for. "How do I add an alpha channel in photoshop?" or whatever.

Posted

Yeah, I've tried alpha channel bit.  But as I remember, there was more to it than just creating a alpha channel and saving it.

 

 

I've gone through a few tutorials via Google

 

Posted

I don't think modview actually reads shaders, it likely just detects an alpha channel in a TGA or transparency in a PNG.

 

I always save my TGA's as 32-bit, RGB color & 8-bit channel.

 

 

*REMOVED SNIPPET DUE TO DAT SILLY DT. :P

Posted

No, that is a customizable color shader, DT85. In this case the alpha channel is used to mark the parts that change color, but the resulting shader is non-transparent.

Tempust85 likes this

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...