render only non-black pixels
how can i render only non-black pixels in a texture (bmp)???
And I know you can mask, but isnt there another less expensive way??
You can give the texture an additional alpha channel, or test the color in your fragment shader and discard those fragments. To give a good advice, you have to tell us what OpenGL version you're targeting, and what you want to do exactly. Are shaders an option? Will the texture get filtered (will there be semi-transparent parts)? Do you have a lot of those textures so sorting (for alpha blending) could become a problem or is it just one texture for a GUI with fixed size? Is there a special reason to use one color as the alpha (e.g. image size, if so, why not compressed textures?) etc. etc.
Tags for this Thread