Jump to content

  • Log In with Google      Sign In   
  • Create Account

Transparent textures?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Demon Lord   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 April 2000 - 03:24 AM

I want to apply a texture with transparent sections (i.e.: alpha values) on a polygon, without seeing the polygon where the texture is transparent (like the trees on Mario64, or the monsters in Doom). However, when I apply the texture on the poly, I see the poly''s own color where the texture is transparent. I tried to set the poly''s alpha to totally transparent, but now I can''t see the poly (which is nice) but I can''t see the texture either (which is not). How can it be done ? Eric Laberge

Sponsor:

#2 RedRicK   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 April 2000 - 04:03 AM

Try storing your textures in RGBA format and set the alpha to opaque in those pixels you want to see...

Or try some color keying

RedRicK

#3 Bad Monkey   Members   -  Reputation: 145

Like
Likes
Like

Posted 27 April 2000 - 03:57 PM

Hi Demon Lord,

Wild stab in the dark here, but try playing around with the blending function ( glBlendFunc(...) ). What you really want to do is over-write the polygon''s alpha value with that of the texture (yes?), so I assume changing the blending function to this effect will be what you need to do.

Hopefully I haven''t sent you off in the wrong direction

-------------
squirrels are a remarkable source of protein...

#4 Demon Lord   Members   -  Reputation: 122

Like
Likes
Like

Posted 28 April 2000 - 02:22 PM

Solved.

I had to use GL_REPLACE instead of GL_DECAL in glTexEnvi().

Eric Laberge




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS