Jump to content

Texture/Shader alpha transparency?


Recommended Posts

Yes there are multiple options to do that actually.

It largely depends on the type of alpha channel used in the texture.

One option for the hair shader stage that gives soft, fading transparency:

	{
		map models/mymodel/hair.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbGen lightingDiffuse
	}

The other which gives you crisp hard egded transparency:

    {
        map models/mymodel/hair.tga
        alphaFunc GE128
        blendFunc GL_ONE GL_ZERO
        rgbGen lightingDiffuse
    }

And a third, also hard edged transparency option for if the result you get is the inverse of what you want (transparent hair, visible white spots):

    {
        map models/mymodel/hair.tga
        alphaFunc LT128
        blendFunc GL_ONE GL_ZERO
        rgbGen lightingDiffuse
    }

 

let me know if you need more help with this, just @ me ?

 

Psyk0Sith and ooeJack like this
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...