Omicron Posted June 1, 2015 Posted June 1, 2015 I set up my skin with some textures with alpha applied in areas along with a shader so the parts aren't visible ingame. It works, only the textures that have this shader also show other things in the map through them. The skin has alpha and the shader on the head and legs to hide some parts (which works) but it also makes other shaders in the map (and players too I think) visible through it: The shader: models/players/mara_khaal/head { { map models/players/mara_khaal/head blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen lightingDiffuse } } models/players/mara_khaal/legs { { map models/players/mara_khaal/legs blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen lightingDiffuse } } Before, I was using blendFunc GL_ONE GL_ZERO (same as no blendFunc) and alphaFunc GE128, which worked fine, but Xycaleth said it wasn't good for performance
mrwonko Posted June 1, 2015 Posted June 1, 2015 You need depthWrite, but I don't think that works quite properly without an alphaFunc? It's been a while, consult the shader manual.
Omicron Posted June 1, 2015 Author Posted June 1, 2015 Yep, that worked, didn't seem to need an alphaGen. However, the legs have gone a bit weird, the back of the boot shafts are completely transparent: models/players/mara_khaal/boots { { map models/players/mara_khaal/boots blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen lightingDiffuse depthWrite } } models/players/mara_khaal/legs { { map models/players/mara_khaal/legs blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen lightingDiffuse depthWrite } } I think it has something to do with the fact that I used 2 textures for the legs: One for the 'skin' and boots' foot part (legs.png), the other for the boot boot shaft (boots.png).
Asgarath83 Posted June 2, 2015 Posted June 2, 2015 yes, i know the issue.instead ofblendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA use alphaFunc GE128rgbGen lightingDiffusedepthWrite this is good for raster surfaces, GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA is good for glasses.
Omicron Posted June 2, 2015 Author Posted June 2, 2015 I was trying to avoid using alphaFunc originally, but I'll take your suggestion and try it tomorrow
Omicron Posted June 3, 2015 Author Posted June 3, 2015 That fixed my problem when i added it to the legs stage, thanks! Asgarath83 likes this
Asgarath83 Posted June 3, 2015 Posted June 3, 2015 That fixed my problem when i added it to the legs stage, thanks!Any time I learn that in a fight with leaves of my plants and some old flags with holes. XD
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