• Advertisement
Sign in to follow this  

Removing the black on textures...

This topic is 4943 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

I read NeHe lesson 09 and although it removes the black from the texture it also makes the other colors translucent...how do I only remove the black and keep everything else the same...?

Share this post


Link to post
Share on other sites
Advertisement
Whats being done is not removing the black it's doing a blending method. The simple explination is the colors are added, so a green + black = green, where a green + grey = a dull green.

There is no simple way just to ONLY remove a black (being 0 red, gren and blue values) via blending. You can check each pixel for a black value and set an alpha channel value to be 0, 1 other wise. and use alpha blending.

Share this post


Link to post
Share on other sites
Generally the best way is to create your own alpha channel and use either blending or alpha testing (the latter being better for your case IMHO).

You can also setup color keying but it's much more difficult to setup and uses more processing power on the GPU side. Color keying should be done only for specific cases such as streaming textures (imagine you want to remove the green screen behind an actor from realtime pictures).

Share this post


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

  • Advertisement