TheHusseler Posted April 16, 2020 Share Posted April 16, 2020 I ripped a hairstyle from another game, and it uses alpha transparency in some areas, essentially the texture is white/blank in those spots. Is there a way to use a shader to apply transparency to those areas? Link to comment
AshuraDX Posted April 17, 2020 Share Posted April 17, 2020 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now