Removing the black on textures...

Started by
1 comment, last by vincoof 19 years, 9 months ago
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...?
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.
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).

This topic is closed to new replies.

Advertisement