Jump to content
  • Advertisement
Sign in to follow this  
Extrakun

Transparent color in textures when rendering to a quad

This topic is 3647 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, Let say I have a bitmap in which the transparency colour is pink, and when I render the texture to a quad, I wish to eliminate any texel that is of that colour. How should I go about doing it, or do I have to use bitmaps with alpha channels all the time? Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
You can either use a shader to skip those fragments or set up the alpha channel when uploading the texture (i.e.
if(pixel == pink)
alpha = 0;
else
alpha = 1;).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!